31 #ifndef OGR_CORE_H_INCLUDED 32 #define OGR_CORE_H_INCLUDED 35 #include "gdal_version.h" 47 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) 51 OGREnvelope() : MinX(0.0), MaxX(0.0), MinY(0.0), MaxY(0.0)
56 MinX(oOther.MinX),MaxX(oOther.MaxX), MinY(oOther.MinY), MaxY(oOther.MaxY)
66 #if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(_MSC_VER)) 67 #pragma GCC diagnostic push 68 #pragma GCC diagnostic ignored "-Wfloat-equal" 70 int IsInit()
const {
return MinX != 0 || MinY != 0 || MaxX != 0 || MaxY != 0; }
72 #if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined(_MSC_VER)) 73 #pragma GCC diagnostic pop 79 MinX = MIN(MinX,sOther.MinX);
80 MaxX = MAX(MaxX,sOther.MaxX);
81 MinY = MIN(MinY,sOther.MinY);
82 MaxY = MAX(MaxY,sOther.MaxY);
92 void Merge(
double dfX,
double dfY ) {
108 if(Intersects(sOther))
112 MinX = MAX(MinX,sOther.MinX);
113 MaxX = MIN(MaxX,sOther.MaxX);
114 MinY = MAX(MinY,sOther.MinY);
115 MaxY = MIN(MaxY,sOther.MaxY);
136 return MinX <= other.MaxX && MaxX >= other.MinX &&
137 MinY <= other.MaxY && MaxY >= other.MinY;
142 return MinX <= other.MinX && MinY <= other.MinY &&
143 MaxX >= other.MaxX && MaxY >= other.MaxY;
161 #if defined(__cplusplus) && !defined(CPL_SURESS_CPLUSPLUS) 171 MinZ(oOther.MinZ), MaxZ(oOther.MaxZ)
178 int IsInit()
const {
return MinX != 0 || MinY != 0 || MaxX != 0 || MaxY != 0 || MinZ != 0 || MaxZ != 0; }
182 MinX = MIN(MinX,sOther.MinX);
183 MaxX = MAX(MaxX,sOther.MaxX);
184 MinY = MIN(MinY,sOther.MinY);
185 MaxY = MAX(MaxY,sOther.MaxY);
186 MinZ = MIN(MinZ,sOther.MinZ);
187 MaxZ = MAX(MaxZ,sOther.MaxZ);
199 void Merge(
double dfX,
double dfY,
double dfZ ) {
202 MinX = MIN(MinX,dfX);
203 MaxX = MAX(MaxX,dfX);
204 MinY = MIN(MinY,dfY);
205 MaxY = MAX(MaxY,dfY);
206 MinZ = MIN(MinZ,dfZ);
207 MaxZ = MAX(MaxZ,dfZ);
218 if(Intersects(sOther))
222 MinX = MAX(MinX,sOther.MinX);
223 MaxX = MIN(MaxX,sOther.MaxX);
224 MinY = MAX(MinY,sOther.MinY);
225 MaxY = MIN(MaxY,sOther.MaxY);
226 MinZ = MAX(MinZ,sOther.MinZ);
227 MaxZ = MIN(MaxZ,sOther.MaxZ);
252 return MinX <= other.MaxX && MaxX >= other.MinX &&
253 MinY <= other.MaxY && MaxY >= other.MinY &&
254 MinZ <= other.MaxZ && MaxZ >= other.MinZ;
259 return MinX <= other.MinX && MinY <= other.MinY &&
260 MaxX >= other.MaxX && MaxY >= other.MaxY &&
261 MinZ <= other.MinZ && MaxZ >= other.MaxZ;
279 void CPL_DLL *OGRMalloc(
size_t );
280 void CPL_DLL *OGRCalloc(
size_t,
size_t );
281 void CPL_DLL *OGRRealloc(
void *,
size_t );
282 char CPL_DLL *OGRStrdup(
const char * );
283 void CPL_DLL OGRFree(
void * );
287 #define OGRERR_NONE 0 288 #define OGRERR_NOT_ENOUGH_DATA 1 289 #define OGRERR_NOT_ENOUGH_MEMORY 2 290 #define OGRERR_UNSUPPORTED_GEOMETRY_TYPE 3 291 #define OGRERR_UNSUPPORTED_OPERATION 4 292 #define OGRERR_CORRUPT_DATA 5 293 #define OGRERR_FAILURE 6 294 #define OGRERR_UNSUPPORTED_SRS 7 295 #define OGRERR_INVALID_HANDLE 8 297 typedef int OGRBoolean;
346 #define wkb25DBit 0x80000000 347 #define wkbFlatten(x) ((OGRwkbGeometryType) ((x) & (~wkb25DBit))) 349 #define ogrZMarker 0x21125711 361 #ifndef NO_HACK_FOR_IBM_DB2_V72 362 # define HACK_FOR_IBM_DB2_V72 365 #ifdef HACK_FOR_IBM_DB2_V72 366 # define DB2_V72_FIX_BYTE_ORDER(x) ((((x) & 0x31) == (x)) ? (OGRwkbByteOrder) ((x) & 0x1) : (x)) 367 # define DB2_V72_UNFIX_BYTE_ORDER(x) ((unsigned char) (OGRGeometry::bGenerate_DB2_V72_BYTE_ORDER ? ((x) | 0x30) : (x))) 369 # define DB2_V72_FIX_BYTE_ORDER(x) (x) 370 # define DB2_V72_UNFIX_BYTE_ORDER(x) (x) 373 #define ALTER_NAME_FLAG 0x1 374 #define ALTER_TYPE_FLAG 0x2 375 #define ALTER_WIDTH_PRECISION_FLAG 0x4 376 #define ALTER_ALL_FLAG (ALTER_NAME_FLAG | ALTER_TYPE_FLAG | ALTER_WIDTH_PRECISION_FLAG) 389 {
OFTInteger = 0,
OFTIntegerList = 1,
OFTReal = 2,
OFTRealList = 3,
OFTString = 4,
OFTStringList = 5,
OFTWideString = 6,
OFTWideStringList = 7,
OFTBinary = 8,
OFTDate = 9,
OFTTime = 10,
OFTDateTime = 11,
416 #define OGRNullFID -1 417 #define OGRUnsetMarker -21121 469 int CPL_DLL OGRParseDate(
const char *pszInput,
OGRField *psOutput,
475 #define OLCRandomRead "RandomRead" 476 #define OLCSequentialWrite "SequentialWrite" 477 #define OLCRandomWrite "RandomWrite" 478 #define OLCFastSpatialFilter "FastSpatialFilter" 479 #define OLCFastFeatureCount "FastFeatureCount" 480 #define OLCFastGetExtent "FastGetExtent" 481 #define OLCCreateField "CreateField" 482 #define OLCDeleteField "DeleteField" 483 #define OLCReorderFields "ReorderFields" 484 #define OLCAlterFieldDefn "AlterFieldDefn" 485 #define OLCTransactions "Transactions" 486 #define OLCDeleteFeature "DeleteFeature" 487 #define OLCFastSetNextByIndex "FastSetNextByIndex" 488 #define OLCStringsAsUTF8 "StringsAsUTF8" 489 #define OLCIgnoreFields "IgnoreFields" 490 #define OLCCreateGeomField "CreateGeomField" 492 #define ODsCCreateLayer "CreateLayer" 493 #define ODsCDeleteLayer "DeleteLayer" 494 #define ODsCCreateGeomFieldAfterCreateLayer "CreateGeomFieldAfterCreateLayer" 496 #define ODrCCreateDataSource "CreateDataSource" 497 #define ODrCDeleteDataSource "DeleteDataSource" 540 OGRSTPenPerOffset = 4,
543 OGRSTPenPriority = 7,
553 OGRSTBrushFColor = 0,
554 OGRSTBrushBColor = 1,
560 OGRSTBrushPriority = 7,
572 OGRSTSymbolAngle = 1,
573 OGRSTSymbolColor = 2,
579 OGRSTSymbolOffset = 8,
580 OGRSTSymbolPriority = 9,
581 OGRSTSymbolFontName = 10,
582 OGRSTSymbolOColor = 11,
592 OGRSTLabelFontName = 0,
594 OGRSTLabelTextString = 2,
596 OGRSTLabelFColor = 4,
597 OGRSTLabelBColor = 5,
598 OGRSTLabelPlacement = 6,
599 OGRSTLabelAnchor = 7,
604 OGRSTLabelItalic = 12,
605 OGRSTLabelUnderline = 13,
606 OGRSTLabelPriority = 14,
607 OGRSTLabelStrikeout = 15,
608 OGRSTLabelStretch = 16,
609 OGRSTLabelAdjHor = 17,
610 OGRSTLabelAdjVert = 18,
611 OGRSTLabelHColor = 19,
612 OGRSTLabelOColor = 20,
623 #ifndef GDAL_VERSION_INFO_DEFINED 624 #define GDAL_VERSION_INFO_DEFINED 625 const char CPL_DLL * CPL_STDCALL GDALVersionInfo(
const char * );
628 #ifndef GDAL_CHECK_VERSION 641 int CPL_DLL CPL_STDCALL
GDALCheckVersion(
int nVersionMajor,
int nVersionMinor,
642 const char* pszCallingComponentName);
645 #define GDAL_CHECK_VERSION(pszCallingComponentName) \ 646 GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName) Definition: ogr_core.h:322
Definition: ogr_core.h:343
enum ogr_style_tool_param_symbol_id OGRSTSymbolParam
ogr_style_tool_param_label_id
Definition: ogr_core.h:590
Definition: ogr_core.h:329
Definition: ogr_core.h:328
Definition: ogr_core.h:314
Definition: ogr_core.h:400
Definition: ogr_core.h:323
Definition: ogr_core.h:399
enum ogr_style_tool_param_brush_id OGRSTBrushParam
Definition: ogr_core.h:325
enum ogr_style_tool_param_label_id OGRSTLabelParam
ogr_style_tool_param_pen_id
Definition: ogr_core.h:534
Definition: ogr_core.h:393
ogr_style_tool_param_symbol_id
Definition: ogr_core.h:569
Definition: ogr_core.h:320
Definition: ogr_core.h:312
Definition: ogr_core.h:392
Definition: ogr_core.h:310
Definition: ogr_core.h:330
Definition: ogr_core.h:317
enum ogr_style_tool_class_id OGRSTClassId
Definition: ogr_core.h:398
Definition: ogr_core.h:327
enum ogr_style_tool_param_pen_id OGRSTPenParam
enum ogr_style_tool_units_id OGRSTUnitId
OGRwkbGeometryType
Definition: ogr_core.h:308
OGRwkbGeometryType OGRMergeGeometryTypes(OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra)
Find common geometry type.
Definition: ogrgeometry.cpp:1738
Definition: ogr_core.h:326
Definition: ogr_core.h:318
OGRJustification
Definition: ogr_core.h:409
ogr_style_tool_units_id
Definition: ogr_core.h:521
Definition: ogr_core.h:342
Definition: ogr_core.h:397
Definition: ogr_core.h:311
OGRFieldType
Definition: ogr_core.h:388
Definition: ogr_core.h:401
Definition: ogr_core.h:162
int CPL_STDCALL GDALCheckVersion(int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName)
OGRwkbVariant
Definition: ogr_core.h:340
Definition: ogr_core.h:396
ogr_style_tool_param_brush_id
Definition: ogr_core.h:551
Definition: ogr_core.h:48
Definition: ogr_core.h:427
ogr_style_tool_class_id
Definition: ogr_core.h:508
Definition: ogr_core.h:319
Definition: ogr_core.h:394
Definition: ogr_core.h:324
const char * OGRGeometryTypeToName(OGRwkbGeometryType eType)
Fetch a human readable name corresponding to an OGRwkBGeometryType value. The returned value should n...
Definition: ogrgeometry.cpp:1642
Definition: ogr_core.h:395
Definition: ogr_core.h:391
Definition: ogr_core.h:390