31#ifndef OGR_P_H_INCLUDED
32#define OGR_P_H_INCLUDED
48#define OGR_GEOMETRY_DEFAULT_NON_EMPTY_NAME "_ogr_geometry_"
51#define OGR_SWAP(x) (x == wkbNDR)
53#define OGR_SWAP(x) (x == wkbXDR)
57#define POSTGIS15_CURVEPOLYGON 13
58#define POSTGIS15_MULTICURVE 14
59#define POSTGIS15_MULTISURFACE 15
62#ifdef GDAL_COMPILATION
63#define wkb25DBitInternalUse 0x80000000
70#ifdef OGR_GEOMETRY_H_INCLUDED
71#define OGR_WKT_TOKEN_MAX 64
73const char CPL_DLL *OGRWktReadToken(
const char *pszInput,
char *pszToken);
75const char CPL_DLL *OGRWktReadPoints(
const char *pszInput,
77 int *pnMaxPoints,
int *pnReadPoints);
80OGRWktReadPointsM(
const char *pszInput,
OGRRawPoint **ppaoPoints,
81 double **ppadfZ,
double **ppadfM,
84 int *pnMaxPoints,
int *pnReadPoints);
86void CPL_DLL OGRMakeWktCoordinate(
char *,
double,
double,
double,
int);
87std::string CPL_DLL OGRMakeWktCoordinate(
double,
double,
double,
int,
89void CPL_DLL OGRMakeWktCoordinateM(
char *,
double,
double,
double,
double,
91std::string CPL_DLL OGRMakeWktCoordinateM(
double,
double,
double,
double,
97void CPL_DLL OGRFormatDouble(
char *pszBuffer,
int nBufferLen,
double dfVal,
98 char chDecimalSep,
int nPrecision = 15,
99 char chConversionSpecifier =
'f');
100std::string CPL_DLL OGRFormatDouble(
double val,
const OGRWktOptions &opts);
102int OGRFormatFloat(
char *pszBuffer,
int nBufferLen,
float fVal,
int nPrecision,
103 char chConversionSpecifier);
111int CPL_DLL OGRGetDayOfWeek(
int day,
int month,
int year);
112int CPL_DLL OGRParseXMLDateTime(
const char *pszXMLDateTime,
OGRField *psField);
113int CPL_DLL OGRParseRFC822DateTime(
const char *pszRFC822DateTime,
115char CPL_DLL *OGRGetRFC822DateTime(
const OGRField *psField);
116char CPL_DLL *OGRGetXMLDateTime(
const OGRField *psField);
117char CPL_DLL *OGRGetXMLDateTime(
const OGRField *psField,
118 bool bAlwaysMillisecond);
119char CPL_DLL *OGRGetXML_UTF8_EscapedString(
const char *pszString);
120bool CPL_DLL OGRParseDateTimeYYYYMMDDTHHMMSSZ(
const char *pszInput,
size_t nLen,
122bool CPL_DLL OGRParseDateTimeYYYYMMDDTHHMMSSsssZ(
const char *pszInput,
126int OGRCompareDate(
const OGRField *psFirstTuple,
131int CPL_DLL OGRGeneralCmdLineProcessor(
int nArgc,
char ***ppapszArgv,
138#define SPF_OGR_GEOMETRY 1
139#define SPF_OGR_STYLE 2
140#define SPF_OGR_GEOM_WKT 3
141#define SPF_OGR_GEOM_AREA 4
142#define SPECIAL_FIELD_COUNT 5
144extern const char *
const SpecialFieldNames[SPECIAL_FIELD_COUNT];
146#ifdef SWQ_H_INCLUDED_
147extern const swq_field_type SpecialFieldTypes[SPECIAL_FIELD_COUNT];
154OGRErr CPL_DLL OSRGetEllipsoidInfo(
int,
char **,
double *,
double *);
157double OGRFastAtof(
const char *pszStr);
159OGRErr CPL_DLL OGRCheckPermutation(
const int *panPermutation,
int nSize);
164 int nPseudoBoolGetSecondaryGeometryOption,
165 int nRecLevel = 0,
int nSRSDimension = 0,
166 bool bIgnoreGSG =
false,
167 bool bOrientation =
true,
168 bool bFaceHoleNegative =
false);
175 int *pnSRID,
int bIsPostGIS1_EWKB);
176OGRGeometry CPL_DLL *OGRGeometryFromHexEWKB(
const char *pszBytea,
int *pnSRID,
177 int bIsPostGIS1_EWKB);
178char CPL_DLL *OGRGeometryToHexEWKB(
OGRGeometry *poGeometry,
int nSRSId,
179 int nPostGISMajor,
int nPostGISMinor);
185OGRErr CPL_DLL OGRReadWKBGeometryType(
const unsigned char *pabyData,
193OGRErr CPL_DLL OGRReadWKTGeometryType(
const char *pszWKT,
Definition of an attribute of an OGRFeatureDefn.
Definition ogr_feature.h:104
Abstract base class for all geometry classes.
Definition ogr_geometry.h:335
Simple container for a position.
Definition ogr_geometry.h:105
Various convenience functions for CPL.
Definitions for CPL mini XML Parser/Serializer.
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:205
Various convenience functions for working with strings and string lists.
Core portability services for cross-platform OGR code.
int OGRBoolean
Type for a OGR boolean.
Definition ogr_core.h:395
OGRFieldSubType
List of field subtypes.
Definition ogr_core.h:800
OGRwkbVariant
Output variants of WKB we support.
Definition ogr_core.h:541
OGRFieldType
List of feature field types.
Definition ogr_core.h:772
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:407
int OGRErr
Type for a OGR error.
Definition ogr_core.h:378
Simple feature geometry classes.
Document node structure.
Definition cpl_minixml.h:70
Options for formatting WKT output.
Definition ogr_geometry.h:70
OGRFeature field attribute value union.
Definition ogr_core.h:866