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 #ifndef OGR_P_H_INCLUDED
00031 #define OGR_P_H_INCLUDED
00032
00033
00034
00035
00036
00037
00038 #include "cpl_string.h"
00039 #include "cpl_conv.h"
00040 #include "cpl_minixml.h"
00041
00042 #include "ogr_core.h"
00043 #include "ogr_geometry.h"
00044
00045 #ifdef CPL_MSB
00046 # define OGR_SWAP(x) (x == wkbNDR)
00047 #else
00048 # define OGR_SWAP(x) (x == wkbXDR)
00049 #endif
00050
00051
00052
00053
00054
00055 #ifdef _OGR_GEOMETRY_H_INCLUDED
00056 #define OGR_WKT_TOKEN_MAX 64
00057
00058 const char CPL_DLL * OGRWktReadToken( const char * pszInput, char * pszToken );
00059
00060 const char CPL_DLL * OGRWktReadPoints( const char * pszInput,
00061 OGRRawPoint **ppaoPoints,
00062 double **ppadfZ,
00063 int * pnMaxPoints,
00064 int * pnReadPoints );
00065
00066 void CPL_DLL OGRMakeWktCoordinate( char *, double, double, double, int );
00067
00068 #endif
00069
00070 void OGRFormatDouble( char *pszBuffer, int nBufferLen, double dfVal, char chDecimalSep, int nPrecision = 15 );
00071
00072
00073
00074
00075
00076
00077
00078 int CPL_DLL OGRGetDayOfWeek(int day, int month, int year);
00079 int CPL_DLL OGRParseXMLDateTime( const char* pszXMLDateTime,
00080 int *pnYear, int *pnMonth, int *pnDay,
00081 int *pnHour, int *pnMinute, float* pfSecond, int *pnTZ);
00082 int CPL_DLL OGRParseRFC822DateTime( const char* pszRFC822DateTime,
00083 int *pnYear, int *pnMonth, int *pnDay,
00084 int *pnHour, int *pnMinute, int *pnSecond, int *pnTZ);
00085 char CPL_DLL * OGRGetRFC822DateTime(int year, int month, int day,
00086 int hour, int minute, int second, int TZ);
00087 char CPL_DLL * OGRGetXMLDateTime(int year, int month, int day,
00088 int hour, int minute, int second, int TZFlag);
00089 char CPL_DLL * OGRGetXML_UTF8_EscapedString(const char* pszString);
00090
00091 int OGRCompareDate( OGRField *psFirstTuple,
00092 OGRField *psSecondTuple );
00093
00094
00095 int CPL_DLL OGRGeneralCmdLineProcessor( int nArgc, char ***ppapszArgv, int nOptions );
00096
00097
00098
00099
00100 #define SPF_FID 0
00101 #define SPF_OGR_GEOMETRY 1
00102 #define SPF_OGR_STYLE 2
00103 #define SPF_OGR_GEOM_WKT 3
00104 #define SPF_OGR_GEOM_AREA 4
00105 #define SPECIAL_FIELD_COUNT 5
00106
00107 extern const char* SpecialFieldNames[SPECIAL_FIELD_COUNT];
00108
00109 #ifdef _SWQ_H_INCLUDED_
00110 extern const swq_field_type SpecialFieldTypes[SPECIAL_FIELD_COUNT];
00111 #endif
00112
00113
00114
00115
00116
00117 OGRErr CPL_DLL OSRGetEllipsoidInfo( int, char **, double *, double *);
00118
00119
00120 double OGRFastAtof(const char* pszStr);
00121
00122 OGRErr CPL_DLL OGRCheckPermutation(int* panPermutation, int nSize);
00123
00124
00125
00126 OGRGeometry *GML2OGRGeometry_XMLNode( const CPLXMLNode *psNode,
00127 int bGetSecondaryGeometryOption,
00128 int nRecLevel = 0,
00129 int bIgnoreGSG = FALSE,
00130 int bOrientation = TRUE,
00131 int bFaceHoleNegative = FALSE );
00132
00133 #endif