00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef OGR_P_H_INCLUDED
00032 #define OGR_P_H_INCLUDED
00033
00034
00035
00036
00037
00038
00039 #include "cpl_string.h"
00040 #include "cpl_conv.h"
00041 #include "cpl_minixml.h"
00042
00043 #include "ogr_core.h"
00044 #include "ogr_geometry.h"
00045
00046
00047 #define OGR_GEOMETRY_DEFAULT_NON_EMPTY_NAME "_ogr_geometry_"
00048
00049 #ifdef CPL_MSB
00050 # define OGR_SWAP(x) (x == wkbNDR)
00051 #else
00052 # define OGR_SWAP(x) (x == wkbXDR)
00053 #endif
00054
00055
00056 #define POSTGIS15_CURVEPOLYGON 13
00057 #define POSTGIS15_MULTICURVE 14
00058 #define POSTGIS15_MULTISURFACE 15
00059
00060
00061 #ifdef GDAL_COMPILATION
00062 #define wkb25DBitInternalUse 0x80000000
00063 #endif
00064
00065
00066
00067
00068
00069 #ifdef _OGR_GEOMETRY_H_INCLUDED
00070 #define OGR_WKT_TOKEN_MAX 64
00071
00072 const char CPL_DLL * OGRWktReadToken( const char * pszInput, char * pszToken );
00073
00074 const char CPL_DLL * OGRWktReadPoints( const char * pszInput,
00075 OGRRawPoint **ppaoPoints,
00076 double **ppadfZ,
00077 int * pnMaxPoints,
00078 int * pnReadPoints );
00079
00080 void CPL_DLL OGRMakeWktCoordinate( char *, double, double, double, int );
00081
00082 #endif
00083
00084 void OGRFormatDouble( char *pszBuffer, int nBufferLen, double dfVal, char chDecimalSep, int nPrecision = 15 );
00085
00086
00087
00088
00089
00090
00091
00092 int CPL_DLL OGRGetDayOfWeek(int day, int month, int year);
00093 int CPL_DLL OGRParseXMLDateTime( const char* pszXMLDateTime,
00094 OGRField* psField );
00095 int CPL_DLL OGRParseRFC822DateTime( const char* pszRFC822DateTime,
00096 OGRField* psField );
00097 char CPL_DLL * OGRGetRFC822DateTime(const OGRField* psField);
00098 char CPL_DLL * OGRGetXMLDateTime(const OGRField* psField);
00099 char CPL_DLL * OGRGetXML_UTF8_EscapedString(const char* pszString);
00100
00101 int OGRCompareDate( OGRField *psFirstTuple,
00102 OGRField *psSecondTuple );
00103
00104
00105 int CPL_DLL OGRGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, int nOptions );
00106
00107
00108
00109
00110 #define SPF_FID 0
00111 #define SPF_OGR_GEOMETRY 1
00112 #define SPF_OGR_STYLE 2
00113 #define SPF_OGR_GEOM_WKT 3
00114 #define SPF_OGR_GEOM_AREA 4
00115 #define SPECIAL_FIELD_COUNT 5
00116
00117 extern const char* SpecialFieldNames[SPECIAL_FIELD_COUNT];
00118
00119 #ifdef _SWQ_H_INCLUDED_
00120 extern const swq_field_type SpecialFieldTypes[SPECIAL_FIELD_COUNT];
00121 #endif
00122
00123
00124
00125
00126
00127 OGRErr CPL_DLL OSRGetEllipsoidInfo( int, char **, double *, double *);
00128
00129
00130 double OGRFastAtof(const char* pszStr);
00131
00132 OGRErr CPL_DLL OGRCheckPermutation(int* panPermutation, int nSize);
00133
00134
00135
00136 OGRGeometry *GML2OGRGeometry_XMLNode( const CPLXMLNode *psNode,
00137 int bGetSecondaryGeometryOption,
00138 int nRecLevel = 0,
00139 int nSRSDimension = 0,
00140 int bIgnoreGSG = FALSE,
00141 int bOrientation = TRUE,
00142 int bFaceHoleNegative = FALSE);
00143
00144
00145
00146
00147
00148 OGRGeometry CPL_DLL *OGRGeometryFromEWKB( GByte *pabyWKB, int nLength, int* pnSRID,
00149 int bIsPostGIS1_EWKB );
00150 OGRGeometry CPL_DLL *OGRGeometryFromHexEWKB( const char *pszBytea, int* pnSRID,
00151 int bIsPostGIS1_EWKB );
00152 char CPL_DLL * OGRGeometryToHexEWKB( OGRGeometry * poGeometry, int nSRSId,
00153 int bIsPostGIS1_EWKB );
00154
00155
00156
00157
00158
00159 OGRErr OGRReadWKBGeometryType( unsigned char * pabyData,
00160 OGRwkbVariant wkbVariant,
00161 OGRwkbGeometryType *eGeometryType, OGRBoolean *b3D );
00162
00163 #endif