6 |
* |
* |
7 |
* Project: Shapelib |
* Project: Shapelib |
8 |
* Purpose: Primary include file for Shapelib. |
* Purpose: Primary include file for Shapelib. |
9 |
* Author: Frank Warmerdam, [email protected] |
* Author: Frank Warmerdam, [email protected] |
10 |
* |
* |
11 |
****************************************************************************** |
****************************************************************************** |
12 |
* Copyright (c) 1999, Frank Warmerdam |
* Copyright (c) 1999, Frank Warmerdam |
37 |
****************************************************************************** |
****************************************************************************** |
38 |
* |
* |
39 |
* $Log$ |
* $Log$ |
40 |
* Revision 1.1 2003/08/19 21:29:25 jan |
* Revision 1.2 2003/10/02 15:15:16 bh |
41 |
* These files have been moved here from thuban/extensions/shapelib/ |
* Update to shapelib 1.2.10 |
42 |
* See there in the Attic for the older history. |
* |
43 |
* |
* Revision 1.26 2002/09/29 00:00:08 warmerda |
44 |
* Revision 1.4 2002/08/22 16:00:01 bh |
* added FTLogical and logical attribute read/write calls |
45 |
* * extensions/shapelib/shapefil.h (DBFCommit), |
* |
46 |
* extensions/shapelib/dbfopen.c (DBFCommit): New API function to |
* Revision 1.25 2002/05/07 13:46:30 warmerda |
47 |
* commit any changes made to the DBF file. |
* added DBFWriteAttributeDirectly(). |
48 |
* |
* |
49 |
* Revision 1.3 2002/05/07 14:09:45 bh |
* Revision 1.24 2002/04/10 16:59:54 warmerda |
50 |
* * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h, |
* added SHPRewindObject |
51 |
* extensions/shapelib/dbfopen.c: Really update to the versions of |
* |
52 |
* shapelib 1.2.9. For some reason it wasn't really done on |
* Revision 1.23 2002/01/15 14:36:07 warmerda |
53 |
* 2002-04-11. |
* updated email address |
54 |
|
* |
55 |
|
* Revision 1.22 2002/01/15 14:32:00 warmerda |
56 |
|
* try to improve SHPAPI_CALL docs |
57 |
|
* |
58 |
|
* Revision 1.21 2001/11/01 16:29:55 warmerda |
59 |
|
* move pabyRec into SHPInfo for thread safety |
60 |
* |
* |
61 |
* Revision 1.20 2001/07/20 13:06:02 warmerda |
* Revision 1.20 2001/07/20 13:06:02 warmerda |
62 |
* fixed SHPAPI attribute for SHPTreeFindLikelyShapes |
* fixed SHPAPI attribute for SHPTreeFindLikelyShapes |
127 |
extern "C" { |
extern "C" { |
128 |
#endif |
#endif |
129 |
|
|
|
#ifndef SHPAPI_CALL |
|
|
#define SHPAPI_CALL |
|
|
#endif |
|
|
|
|
|
#define SHPAPI_CALL1(x) * SHPAPI_CALL |
|
|
|
|
130 |
/************************************************************************/ |
/************************************************************************/ |
131 |
/* Configuration options. */ |
/* Configuration options. */ |
132 |
/************************************************************************/ |
/************************************************************************/ |
144 |
/* -------------------------------------------------------------------- */ |
/* -------------------------------------------------------------------- */ |
145 |
#define DISABLE_MULTIPATCH_MEASURE |
#define DISABLE_MULTIPATCH_MEASURE |
146 |
|
|
147 |
|
/* -------------------------------------------------------------------- */ |
148 |
|
/* SHPAPI_CALL */ |
149 |
|
/* */ |
150 |
|
/* The following two macros are present to allow forcing */ |
151 |
|
/* various calling conventions on the Shapelib API. */ |
152 |
|
/* */ |
153 |
|
/* To force __stdcall conventions (needed to call Shapelib */ |
154 |
|
/* from Visual Basic and/or Dephi I believe) the makefile could */ |
155 |
|
/* be modified to define: */ |
156 |
|
/* */ |
157 |
|
/* /DSHPAPI_CALL=__stdcall */ |
158 |
|
/* */ |
159 |
|
/* If it is desired to force export of the Shapelib API without */ |
160 |
|
/* using the shapelib.def file, use the following definition. */ |
161 |
|
/* */ |
162 |
|
/* /DSHAPELIB_DLLEXPORT */ |
163 |
|
/* */ |
164 |
|
/* To get both at once it will be necessary to hack this */ |
165 |
|
/* include file to define: */ |
166 |
|
/* */ |
167 |
|
/* #define SHPAPI_CALL __declspec(dllexport) __stdcall */ |
168 |
|
/* #define SHPAPI_CALL1 __declspec(dllexport) * __stdcall */ |
169 |
|
/* */ |
170 |
|
/* The complexity of the situtation is partly caused by the */ |
171 |
|
/* peculiar requirement of Visual C++ that __stdcall appear */ |
172 |
|
/* after any "*"'s in the return value of a function while the */ |
173 |
|
/* __declspec(dllexport) must appear before them. */ |
174 |
|
/* -------------------------------------------------------------------- */ |
175 |
|
|
176 |
|
#ifdef SHAPELIB_DLLEXPORT |
177 |
|
# define SHPAPI_CALL __declspec(dllexport) |
178 |
|
# define SHPAPI_CALL1(x) __declspec(dllexport) x |
179 |
|
#endif |
180 |
|
|
181 |
|
#ifndef SHPAPI_CALL |
182 |
|
# define SHPAPI_CALL |
183 |
|
#endif |
184 |
|
|
185 |
|
#ifndef SHPAPI_CALL1 |
186 |
|
# define SHPAPI_CALL1(x) x SHPAPI_CALL |
187 |
|
#endif |
188 |
|
|
189 |
/************************************************************************/ |
/************************************************************************/ |
190 |
/* SHP Support. */ |
/* SHP Support. */ |
191 |
/************************************************************************/ |
/************************************************************************/ |
207 |
double adBoundsMax[4]; |
double adBoundsMax[4]; |
208 |
|
|
209 |
int bUpdated; |
int bUpdated; |
210 |
|
|
211 |
|
unsigned char *pabyRec; |
212 |
|
int nBufSize; |
213 |
} SHPInfo; |
} SHPInfo; |
214 |
|
|
215 |
typedef SHPInfo * SHPHandle; |
typedef SHPInfo * SHPHandle; |
305 |
SHPCreateSimpleObject( int nSHPType, int nVertices, |
SHPCreateSimpleObject( int nSHPType, int nVertices, |
306 |
double * padfX, double * padfY, double * padfZ ); |
double * padfX, double * padfY, double * padfZ ); |
307 |
|
|
308 |
|
int SHPAPI_CALL |
309 |
|
SHPRewindObject( SHPHandle hSHP, SHPObject * psObject ); |
310 |
|
|
311 |
void SHPAPI_CALL |
void SHPAPI_CALL |
312 |
SHPClose( SHPHandle hSHP ); |
SHPClose( SHPHandle hSHP ); |
313 |
|
|
412 |
FTString, |
FTString, |
413 |
FTInteger, |
FTInteger, |
414 |
FTDouble, |
FTDouble, |
415 |
|
FTLogical, |
416 |
FTInvalid |
FTInvalid |
417 |
} DBFFieldType; |
} DBFFieldType; |
418 |
|
|
444 |
DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField ); |
DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField ); |
445 |
const char SHPAPI_CALL1(*) |
const char SHPAPI_CALL1(*) |
446 |
DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField ); |
DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField ); |
447 |
|
const char SHPAPI_CALL1(*) |
448 |
|
DBFReadLogicalAttribute( DBFHandle hDBF, int iShape, int iField ); |
449 |
int SHPAPI_CALL |
int SHPAPI_CALL |
450 |
DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField ); |
DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField ); |
451 |
|
|
461 |
int SHPAPI_CALL |
int SHPAPI_CALL |
462 |
DBFWriteNULLAttribute( DBFHandle hDBF, int iShape, int iField ); |
DBFWriteNULLAttribute( DBFHandle hDBF, int iShape, int iField ); |
463 |
|
|
464 |
|
int SHPAPI_CALL |
465 |
|
DBFWriteLogicalAttribute( DBFHandle hDBF, int iShape, int iField, |
466 |
|
const char lFieldValue); |
467 |
|
int SHPAPI_CALL |
468 |
|
DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, |
469 |
|
void * pValue ); |
470 |
const char SHPAPI_CALL1(*) |
const char SHPAPI_CALL1(*) |
471 |
DBFReadTuple(DBFHandle psDBF, int hEntity ); |
DBFReadTuple(DBFHandle psDBF, int hEntity ); |
472 |
int SHPAPI_CALL |
int SHPAPI_CALL |