|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
#include <stdio.h>

Go to the source code of this file.
Data Structures | |
| struct | SAHooks |
| struct | SHPInfo |
| struct | SHPDate |
| struct | tagSHPObject |
| struct | shape_tree_node |
| struct | SHPTree |
| struct | DBFInfo |
Enumerations | |
| enum | DBFFieldType { FTString , FTInteger , FTDouble , FTLogical , FTDate , FTInvalid } |
| #define DISABLE_MULTIPATCH_MEASURE |
Definition at line 64 of file shapefil.h.
| #define MAX_DEFAULT_TREE_DEPTH 12 |
Definition at line 324 of file shapefil.h.
| #define MAX_SUBNODE 4 |
Definition at line 321 of file shapefil.h.
Definition at line 45 of file shapefil.h.
| #define SHAPELIB_MAKE_VERSION_NUMBER | ( | major, | |
| minor, | |||
| micro | |||
| ) | ((major) * 10000 + (minor) * 100 + (micro)) |
Definition at line 37 of file shapefil.h.
| #define SHAPELIB_VERSION_MAJOR 1 |
Definition at line 33 of file shapefil.h.
| #define SHAPELIB_VERSION_MICRO 2 |
Definition at line 35 of file shapefil.h.
| #define SHAPELIB_VERSION_MINOR 6 |
Definition at line 34 of file shapefil.h.
| #define SHAPELIB_VERSION_NUMBER |
Definition at line 40 of file shapefil.h.
| #define SHPAPI_CALL |
Definition at line 105 of file shapefil.h.
| #define SHPAPI_CALL1 | ( | x | ) | x SHPAPI_CALL |
Definition at line 110 of file shapefil.h.
| #define SHPP_FIRSTRING 4 |
Definition at line 225 of file shapefil.h.
| #define SHPP_INNERRING 3 |
Definition at line 224 of file shapefil.h.
| #define SHPP_OUTERRING 2 |
Definition at line 223 of file shapefil.h.
| #define SHPP_RING 5 |
Definition at line 226 of file shapefil.h.
| #define SHPP_TRIFAN 1 |
Definition at line 222 of file shapefil.h.
| #define SHPP_TRISTRIP 0 |
Definition at line 221 of file shapefil.h.
| #define SHPT_ARC 3 |
Definition at line 203 of file shapefil.h.
| #define SHPT_ARCM 23 |
Definition at line 211 of file shapefil.h.
| #define SHPT_ARCZ 13 |
Definition at line 207 of file shapefil.h.
| #define SHPT_MULTIPATCH 31 |
Definition at line 214 of file shapefil.h.
| #define SHPT_MULTIPOINT 8 |
Definition at line 205 of file shapefil.h.
| #define SHPT_MULTIPOINTM 28 |
Definition at line 213 of file shapefil.h.
| #define SHPT_MULTIPOINTZ 18 |
Definition at line 209 of file shapefil.h.
| #define SHPT_NULL 0 |
Definition at line 201 of file shapefil.h.
| #define SHPT_POINT 1 |
Definition at line 202 of file shapefil.h.
| #define SHPT_POINTM 21 |
Definition at line 210 of file shapefil.h.
| #define SHPT_POINTZ 11 |
Definition at line 206 of file shapefil.h.
| #define SHPT_POLYGON 5 |
Definition at line 204 of file shapefil.h.
| #define SHPT_POLYGONM 25 |
Definition at line 212 of file shapefil.h.
| #define SHPT_POLYGONZ 15 |
Definition at line 208 of file shapefil.h.
| #define TRIM_DBF_WHITESPACE |
Definition at line 57 of file shapefil.h.
| #define XBASE_FLD_MAX_WIDTH 255 |
Definition at line 475 of file shapefil.h.
| #define XBASE_FLDHDR_SZ 32 |
Definition at line 469 of file shapefil.h.
| #define XBASE_FLDNAME_LEN_READ 11 |
Definition at line 471 of file shapefil.h.
| #define XBASE_FLDNAME_LEN_WRITE 10 |
Definition at line 473 of file shapefil.h.
Definition at line 125 of file shapefil.h.
Definition at line 391 of file shapefil.h.
Definition at line 190 of file shapefil.h.
Definition at line 159 of file shapefil.h.
Definition at line 372 of file shapefil.h.
| Enumerator | |
|---|---|
| FTString | |
| FTInteger | |
| FTDouble | |
| FTLogical | |
| FTDate | |
| FTInvalid | |
Definition at line 459 of file shapefil.h.
| int DBFAddNativeFieldType | ( | DBFHandle | hDBF, |
| const char * | pszFieldName, | ||
| char | chType, | ||
| int | nWidth, | ||
| int | nDecimals | ||
| ) |
Definition at line 795 of file dbfopen.c.
References DBFUpdateHeader(), END_OF_FILE_CHARACTER, FALSE, UntypedStream::fp, free(), malloc(), SHPLIB_NULLPTR, STATIC_CAST, TRUE, XBASE_FLD_MAX_WIDTH, XBASE_FLDHDR_SZ, and XBASE_FLDNAME_LEN_WRITE.
Referenced by DBFAddField().
| int DBFAlterFieldDefn | ( | DBFHandle | psDBF, |
| int | iField, | ||
| const char * | pszFieldName, | ||
| char | chType, | ||
| int | nWidth, | ||
| int | nDecimals | ||
| ) |
Definition at line 2109 of file dbfopen.c.
References DBFUpdateHeader(), END_OF_FILE_CHARACTER, FALSE, UntypedStream::fp, free(), malloc(), STATIC_CAST, TRUE, XBASE_FLD_MAX_WIDTH, XBASE_FLDHDR_SZ, and XBASE_FLDNAME_LEN_WRITE.
Definition at line 1680 of file dbfopen.c.
References DBFClose(), DBFCreateLL(), DBFOpen(), malloc(), SHPLIB_NULLPTR, STATIC_CAST, TRUE, and XBASE_FLDHDR_SZ.
Definition at line 568 of file dbfopen.c.
References CPL_IGNORE_RET_VAL_INT, DBFUpdateHeader(), UntypedStream::fp, free(), and SHPLIB_NULLPTR.
Referenced by DBFCloneEmpty(), and DBFOpenLL().
Definition at line 616 of file dbfopen.c.
References DBFCreateEx().
Definition at line 627 of file dbfopen.c.
References DBFCreateLL(), and SASetupDefaultHooks().
Referenced by DBFCreate().
| DBFHandle DBFCreateLL | ( | const char * | pszDBFFile, |
| const char * | pszCodePage, | ||
| const SAHooks * | psHooks | ||
| ) |
Definition at line 643 of file dbfopen.c.
References CONST_CAST, DBFSetLastModifiedDate(), DBFSetWriteEndOfFileChar(), FALSE, UntypedStream::fp, free(), malloc(), SHPLIB_NULLPTR, STATIC_CAST, strcpy, TRUE, and XBASE_FILEHDR_SZ.
Referenced by DBFCloneEmpty(), and DBFCreateEx().
Definition at line 1847 of file dbfopen.c.
References DBFUpdateHeader(), END_OF_FILE_CHARACTER, FALSE, UntypedStream::fp, free(), malloc(), STATIC_CAST, TRUE, and XBASE_FLDHDR_SZ.
Definition at line 1834 of file dbfopen.c.
References SHPLIB_NULLPTR.
Definition at line 1253 of file dbfopen.c.
Referenced by DBFGetFieldIndex().
Definition at line 1756 of file dbfopen.c.
References DBFGetFieldCount(), DBFGetFieldInfo(), name, SHPLIB_NULLPTR, STRCASECMP, and XBASE_FLDNAME_LEN_READ.
| DBFFieldType DBFGetFieldInfo | ( | const DBFHandle | psDBF, |
| int | iField, | ||
| char * | pszFieldName, | ||
| int * | pnWidth, | ||
| int * | pnDecimals | ||
| ) |
Definition at line 1277 of file dbfopen.c.
References FTDate, FTDouble, FTInteger, FTInvalid, FTLogical, FTString, SHPLIB_NULLPTR, STATIC_CAST, XBASE_FLDHDR_SZ, and XBASE_FLDNAME_LEN_READ.
Referenced by DBFGetFieldIndex().
Definition at line 1235 of file dbfopen.c.
References DBFReadStringAttribute(), SHPLIB_NULLPTR, and TRUE.
Definition at line 300 of file dbfopen.c.
References DBFOpenLL(), and SASetupDefaultHooks().
Referenced by DBFCloneEmpty().
Definition at line 331 of file dbfopen.c.
References assert, DBFClose(), DBFSetLastModifiedDate(), DBFSetWriteEndOfFileChar(), FALSE, UntypedStream::fp, free(), HEADER_RECORD_TERMINATOR, malloc(), REINTERPRET_CAST, SHPLIB_NULLPTR, STATIC_CAST, strcpy, TRUE, XBASE_FILEHDR_SZ, and XBASE_FLDHDR_SZ.
Referenced by DBFOpen().
Definition at line 1146 of file dbfopen.c.
References SHPDate::day, SHPDate::month, SHPLIB_NULLPTR, STATIC_CAST, and SHPDate::year.
Definition at line 1102 of file dbfopen.c.
References SHPLIB_NULLPTR, and STATIC_CAST.
Definition at line 1084 of file dbfopen.c.
References SHPLIB_NULLPTR, and STATIC_CAST.
Definition at line 1134 of file dbfopen.c.
References STATIC_CAST.
Definition at line 1121 of file dbfopen.c.
References STATIC_CAST.
Referenced by DBFIsAttributeNULL().
Definition at line 1662 of file dbfopen.c.
References SHPLIB_NULLPTR, and STATIC_CAST.
Definition at line 1972 of file dbfopen.c.
References DBFUpdateHeader(), FALSE, UntypedStream::fp, free(), malloc(), SHPLIB_NULLPTR, STATIC_CAST, TRUE, and XBASE_FLDHDR_SZ.
Definition at line 286 of file dbfopen.c.
Referenced by DBFCreateLL(), and DBFOpenLL().
Definition at line 2357 of file dbfopen.c.
Referenced by DBFCreateLL(), and DBFOpenLL().
Definition at line 252 of file dbfopen.c.
References UntypedStream::fp, STATIC_CAST, and XBASE_FILEHDR_SZ.
Referenced by DBFAddNativeFieldType(), DBFAlterFieldDefn(), DBFClose(), DBFDeleteField(), and DBFReorderFields().
Definition at line 1451 of file dbfopen.c.
References FALSE, REINTERPRET_CAST, STATIC_CAST, and TRUE.
Referenced by DBFWriteDateAttribute().
| int DBFWriteDateAttribute | ( | DBFHandle | hDBF, |
| int | iShape, | ||
| int | iField, | ||
| const SHPDate * | dateFieldValue | ||
| ) |
Definition at line 1587 of file dbfopen.c.
References DBFWriteAttributeDirectly(), and SHPLIB_NULLPTR.
Definition at line 1520 of file dbfopen.c.
References STATIC_CAST.
Definition at line 1533 of file dbfopen.c.
References STATIC_CAST.
Definition at line 1573 of file dbfopen.c.
References CONST_CAST, and STATIC_CAST.
Definition at line 1562 of file dbfopen.c.
References SHPLIB_NULLPTR.
Definition at line 1548 of file dbfopen.c.
References CONST_CAST, and STATIC_CAST.
Definition at line 1611 of file dbfopen.c.
References FALSE, REINTERPRET_CAST, and TRUE.
Definition at line 91 of file safileio.c.
References SHPLIB_NULLPTR.
Referenced by DBFCreateEx(), DBFOpen(), SHPCreate(), and SHPOpen().
| void SBNCloseDiskTree | ( | SBNSearchHandle | hSBN | ) |
| SBNSearchHandle SBNOpenDiskTree | ( | const char * | pszSBNFilename, |
| const SAHooks * | psHooks | ||
| ) |
| int * SBNSearchDiskTree | ( | const SBNSearchHandle | hSBN, |
| const double * | padfBoundsMin, | ||
| const double * | padfBoundsMax, | ||
| int * | pnShapeCount | ||
| ) |
| int * SBNSearchDiskTreeInteger | ( | const SBNSearchHandle | hSBN, |
| int | bMinX, | ||
| int | bMinY, | ||
| int | bMaxX, | ||
| int | bMaxY, | ||
| int * | pnShapeCount | ||
| ) |
| int SHPCheckBoundsOverlap | ( | const double * | , |
| const double * | , | ||
| const double * | , | ||
| const double * | , | ||
| int | |||
| ) |
Definition at line 851 of file shpopen.c.
References free(), SHPLIB_NULLPTR, and SHPWriteHeader().
Referenced by SHPOpenLL().
| void SHPCloseDiskTree | ( | SHPTreeDiskHandle | hDiskTree | ) |
Definition at line 1147 of file shpopen.c.
Referenced by SHPCreateObject().
Definition at line 944 of file shpopen.c.
References SASetupDefaultHooks(), and SHPCreateLL().
Definition at line 960 of file shpopen.c.
References ByteCopy, FALSE, free(), malloc(), SHP_SWAP32, SHPLIB_NULLPTR, and STATIC_CAST.
Referenced by SHPCreate().
| SHPObject * SHPCreateObject | ( | int | nSHPType, |
| int | nShapeId, | ||
| int | nParts, | ||
| const int * | panPartStart, | ||
| const int * | panPartType, | ||
| int | nVertices, | ||
| const double * | padfX, | ||
| const double * | padfY, | ||
| const double * | padfZ, | ||
| const double * | padfM | ||
| ) |
Definition at line 1180 of file shpopen.c.
References FALSE, free(), malloc(), MAX, SHPComputeExtents(), SHPLIB_NULLPTR, SHPP_RING, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, STATIC_CAST, and TRUE.
Referenced by SHPCreateSimpleObject().
| SHPObject * SHPCreateSimpleObject | ( | int | nSHPType, |
| int | nVertices, | ||
| const double * | padfX, | ||
| const double * | padfY, | ||
| const double * | padfZ | ||
| ) |
Definition at line 1309 of file shpopen.c.
References SHPCreateObject(), and SHPLIB_NULLPTR.
| SHPTree * SHPCreateTree | ( | SHPHandle | hSHP, |
| int | nDimension, | ||
| int | nMaxDepth, | ||
| const double * | padfBoundsMin, | ||
| const double * | padfBoundsMax | ||
| ) |
Definition at line 2725 of file shpopen.c.
References FALSE, free(), and SHPLIB_NULLPTR.
Referenced by SHPReadObject().
| void SHPGetInfo | ( | const SHPHandle | hSHP, |
| int * | pnEntities, | ||
| int * | pnShapeType, | ||
| double * | padfMinBound, | ||
| double * | padfMaxBound | ||
| ) |
Definition at line 916 of file shpopen.c.
References SHPLIB_NULLPTR.
Definition at line 219 of file shpopen.c.
References SASetupDefaultHooks(), and SHPOpenLL().
| SHPTreeDiskHandle SHPOpenDiskTree | ( | const char * | pszQIXFilename, |
| const SAHooks * | psHooks | ||
| ) |
Definition at line 251 of file shpopen.c.
References FALSE, free(), malloc(), MAX, SHP_RESTORE_SHX_HINT_MESSAGE, SHP_SWAP32, SHP_SWAP64, SHPClose(), SHPLIB_NULLPTR, and STATIC_CAST.
Referenced by SHPOpen(), and SHPOpenLLEx().
| SHPHandle SHPOpenLLEx | ( | const char * | pszShapeFile, |
| const char * | pszAccess, | ||
| const SAHooks * | psHooks, | ||
| int | bRestoreSHX | ||
| ) |
Definition at line 602 of file shpopen.c.
References SHPLIB_NULLPTR, SHPOpenLL(), and SHPRestoreSHX().
Definition at line 2695 of file shpopen.c.
References SHPP_FIRSTRING, SHPP_INNERRING, SHPP_OUTERRING, SHPP_RING, SHPP_TRIFAN, and SHPP_TRISTRIP.
Definition at line 1852 of file shpopen.c.
References FALSE, SHP_SWAP32, SHP_SWAPDOUBLE_CPY, SHPDestroyObject(), SHPLIB_NULLPTR, SHPP_RING, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, STATIC_CAST, and TRUE.
Definition at line 623 of file shpopen.c.
References FALSE, free(), malloc(), SHP_SWAP32, SHPLIB_NULLPTR, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_NULL, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, STATIC_CAST, and TRUE.
Referenced by SHPOpenLLEx().
Definition at line 2856 of file shpopen.c.
References FALSE, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, and TRUE.
| int * SHPSearchDiskTree | ( | FILE * | fp, |
| double * | padfBoundsMin, | ||
| double * | padfBoundsMax, | ||
| int * | pnShapeCount | ||
| ) |
| int * SHPSearchDiskTreeEx | ( | const SHPTreeDiskHandle | hDiskTree, |
| double * | padfBoundsMin, | ||
| double * | padfBoundsMax, | ||
| int * | pnShapeCount | ||
| ) |
Definition at line 897 of file shpopen.c.
References assert, SHPInfo::bFastModeReadObject, SHPInfo::psCachedObject, SHPLIB_NULLPTR, and STATIC_CAST.
| int * SHPTreeFindLikelyShapes | ( | const SHPTree * | hTree, |
| double * | padfBoundsMin, | ||
| double * | padfBoundsMax, | ||
| int * | |||
| ) |
Definition at line 2641 of file shpopen.c.
References SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_NULL, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, and SHPT_POLYGONZ.
Definition at line 62 of file shpopen.c.
References ByteCopy, free(), malloc(), SHP_SWAP32, SHP_SWAP64, SHPLIB_NULLPTR, and STATIC_CAST.
Referenced by SHPClose().
Definition at line 1323 of file shpopen.c.
References assert, ByteCopy, DISABLE_MULTIPATCH_MEASURE, free(), malloc(), MAX, MIN, SHP_SWAP32, SHP_SWAP64, SHPLIB_NULLPTR, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPATCH, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_NULL, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, STATIC_CAST, and TRUE.