GDAL
Classes | Defines | Typedefs | Enumerations | Functions
ogr_core.h File Reference

Core portability services for cross-platform OGR code. More...

#include "cpl_port.h"
#include "gdal_version.h"

Go to the source code of this file.

Classes

class  OGREnvelope
 Simple container for a bounding region. More...
class  OGREnvelope3D
 Simple container for a bounding region in 3D. More...
union  OGRField
 OGRFeature field attribute value union. More...

Defines

#define OGRERR_NONE   0
#define OGRERR_NOT_ENOUGH_DATA   1 /* not enough data to deserialize */
#define OGRERR_NOT_ENOUGH_MEMORY   2
#define OGRERR_UNSUPPORTED_GEOMETRY_TYPE   3
#define OGRERR_UNSUPPORTED_OPERATION   4
#define OGRERR_CORRUPT_DATA   5
#define OGRERR_FAILURE   6
#define OGRERR_UNSUPPORTED_SRS   7
#define OGRERR_INVALID_HANDLE   8
#define OGRERR_NON_EXISTING_FEATURE   9 /* added in GDAL 2.0 */
#define wkbCurve   ((OGRwkbGeometryType)13)
 Curve (abstract type).
#define wkbSurface   ((OGRwkbGeometryType)14)
 Surface (abstract type).
#define wkb25DBit   0x80000000
#define wkbFlatten(x)   OGR_GT_Flatten((OGRwkbGeometryType)(x))
 Return the 2D geometry type corresponding to the specified geometry type.
#define wkbHasZ(x)   OGR_GT_HasZ(x)
 Return if the geometry type is a 3D geometry type.
#define wkbSetZ(x)   OGR_GT_SetZ(x)
 Return the 3D geometry type corresponding to the specified geometry type.
#define ogrZMarker   0x21125711
#define HACK_FOR_IBM_DB2_V72
#define DB2_V72_FIX_BYTE_ORDER(x)   ((((x) & 0x31) == (x)) ? (OGRwkbByteOrder) ((x) & 0x1) : (x))
#define DB2_V72_UNFIX_BYTE_ORDER(x)   ((unsigned char) (OGRGeometry::bGenerate_DB2_V72_BYTE_ORDER ? ((x) | 0x30) : (x)))
#define ALTER_NAME_FLAG   0x1
 Alter field name.
#define ALTER_TYPE_FLAG   0x2
 Alter field type.
#define ALTER_WIDTH_PRECISION_FLAG   0x4
 Alter field width and precision.
#define ALTER_NULLABLE_FLAG   0x8
 Alter field NOT NULL constraint.
#define ALTER_DEFAULT_FLAG   0x10
 Alter field DEFAULT value.
#define ALTER_ALL_FLAG   (ALTER_NAME_FLAG | ALTER_TYPE_FLAG | ALTER_WIDTH_PRECISION_FLAG | ALTER_NULLABLE_FLAG | ALTER_DEFAULT_FLAG)
 Alter all parameters of field definition.
#define OGR_F_VAL_NULL   0x00000001
 Validate that fields respect not-null constraints.
#define OGR_F_VAL_GEOM_TYPE   0x00000002
 Validate that geometries respect geometry column type.
#define OGR_F_VAL_WIDTH   0x00000004
 Validate that (string) fields respect field width.
#define OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT   0x00000008
 Allow fields that are null when there's an associated default value.
#define OGR_F_VAL_ALL   0xFFFFFFFF
 Enable all validation tests.
#define OGRNullFID   -1
#define OGRUnsetMarker   -21121
#define OGR_GET_MS(floatingpoint_sec)   (int)(((floatingpoint_sec) - (int)(floatingpoint_sec)) * 1000 + 0.5)
#define OLCRandomRead   "RandomRead"
#define OLCSequentialWrite   "SequentialWrite"
#define OLCRandomWrite   "RandomWrite"
#define OLCFastSpatialFilter   "FastSpatialFilter"
#define OLCFastFeatureCount   "FastFeatureCount"
#define OLCFastGetExtent   "FastGetExtent"
#define OLCCreateField   "CreateField"
#define OLCDeleteField   "DeleteField"
#define OLCReorderFields   "ReorderFields"
#define OLCAlterFieldDefn   "AlterFieldDefn"
#define OLCTransactions   "Transactions"
#define OLCDeleteFeature   "DeleteFeature"
#define OLCFastSetNextByIndex   "FastSetNextByIndex"
#define OLCStringsAsUTF8   "StringsAsUTF8"
#define OLCIgnoreFields   "IgnoreFields"
#define OLCCreateGeomField   "CreateGeomField"
#define OLCCurveGeometries   "CurveGeometries"
#define ODsCCreateLayer   "CreateLayer"
#define ODsCDeleteLayer   "DeleteLayer"
#define ODsCCreateGeomFieldAfterCreateLayer   "CreateGeomFieldAfterCreateLayer"
#define ODsCCurveGeometries   "CurveGeometries"
#define ODsCTransactions   "Transactions"
#define ODsCEmulatedTransactions   "EmulatedTransactions"
#define ODrCCreateDataSource   "CreateDataSource"
#define ODrCDeleteDataSource   "DeleteDataSource"
#define OLMD_FID64   "OLMD_FID64"
 Capability set to YES as metadata on a layer that has features with 64 bit identifiers.

Typedefs

typedef int OGRErr
typedef int OGRBoolean
typedef enum
ogr_style_tool_class_id 
OGRSTClassId
 OGRStyleTool derived class types (returned by GetType()).
typedef enum
ogr_style_tool_units_id 
OGRSTUnitId
 List of units supported by OGRStyleTools.
typedef enum
ogr_style_tool_param_pen_id 
OGRSTPenParam
 List of parameters for use with OGRStylePen.
typedef enum
ogr_style_tool_param_brush_id 
OGRSTBrushParam
 List of parameters for use with OGRStyleBrush.
typedef enum
ogr_style_tool_param_symbol_id 
OGRSTSymbolParam
 List of parameters for use with OGRStyleSymbol.
typedef enum
ogr_style_tool_param_label_id 
OGRSTLabelParam
 List of parameters for use with OGRStyleLabel.

Enumerations

enum  OGRwkbGeometryType {
  wkbUnknown = 0, wkbPoint = 1, wkbLineString = 2, wkbPolygon = 3,
  wkbMultiPoint = 4, wkbMultiLineString = 5, wkbMultiPolygon = 6, wkbGeometryCollection = 7,
  wkbCircularString = 8, wkbCompoundCurve = 9, wkbCurvePolygon = 10, wkbMultiCurve = 11,
  wkbMultiSurface = 12, wkbNone = 100, wkbLinearRing = 101, wkbCircularStringZ = 1008,
  wkbCompoundCurveZ = 1009, wkbCurvePolygonZ = 1010, wkbMultiCurveZ = 1011, wkbMultiSurfaceZ = 1012,
  wkbPoint25D = 0x80000001, wkbLineString25D = 0x80000002, wkbPolygon25D = 0x80000003, wkbMultiPoint25D = 0x80000004,
  wkbMultiLineString25D = 0x80000005, wkbMultiPolygon25D = 0x80000006, wkbGeometryCollection25D = 0x80000007
}
 List of well known binary geometry types. More...
enum  OGRwkbVariant { wkbVariantOldOgc, wkbVariantIso, wkbVariantPostGIS1 }
 Output variants of WKB we support. More...
enum  OGRwkbByteOrder { wkbXDR = 0, wkbNDR = 1 }
enum  OGRFieldType {
  OFTInteger = 0, OFTIntegerList = 1, OFTReal = 2, OFTRealList = 3,
  OFTString = 4, OFTStringList = 5, OFTWideString = 6, OFTWideStringList = 7,
  OFTBinary = 8, OFTDate = 9, OFTTime = 10, OFTDateTime = 11,
  OFTInteger64 = 12, OFTInteger64List = 13, OFTMaxType = 13
}
 List of feature field types. More...
enum  OGRFieldSubType {
  OFSTNone = 0, OFSTBoolean = 1, OFSTInt16 = 2, OFSTFloat32 = 3,
  OFSTMaxSubType = 3
}
 List of field subtypes. More...
enum  OGRJustification { OJUndefined = 0, OJLeft = 1, OJRight = 2 }
 Display justification for field values.
enum  ogr_style_tool_class_id {
  OGRSTCNone = 0, OGRSTCPen = 1, OGRSTCBrush = 2, OGRSTCSymbol = 3,
  OGRSTCLabel = 4, OGRSTCVector = 5
}
 OGRStyleTool derived class types (returned by GetType()).
enum  ogr_style_tool_units_id {
  OGRSTUGround = 0, OGRSTUPixel = 1, OGRSTUPoints = 2, OGRSTUMM = 3,
  OGRSTUCM = 4, OGRSTUInches = 5
}
 List of units supported by OGRStyleTools.
enum  ogr_style_tool_param_pen_id {
  OGRSTPenColor = 0, OGRSTPenWidth = 1, OGRSTPenPattern = 2, OGRSTPenId = 3,
  OGRSTPenPerOffset = 4, OGRSTPenCap = 5, OGRSTPenJoin = 6, OGRSTPenPriority = 7,
  OGRSTPenLast = 8
}
 List of parameters for use with OGRStylePen.
enum  ogr_style_tool_param_brush_id {
  OGRSTBrushFColor = 0, OGRSTBrushBColor = 1, OGRSTBrushId = 2, OGRSTBrushAngle = 3,
  OGRSTBrushSize = 4, OGRSTBrushDx = 5, OGRSTBrushDy = 6, OGRSTBrushPriority = 7,
  OGRSTBrushLast = 8
}
 List of parameters for use with OGRStyleBrush.
enum  ogr_style_tool_param_symbol_id {
  OGRSTSymbolId = 0, OGRSTSymbolAngle = 1, OGRSTSymbolColor = 2, OGRSTSymbolSize = 3,
  OGRSTSymbolDx = 4, OGRSTSymbolDy = 5, OGRSTSymbolStep = 6, OGRSTSymbolPerp = 7,
  OGRSTSymbolOffset = 8, OGRSTSymbolPriority = 9, OGRSTSymbolFontName = 10, OGRSTSymbolOColor = 11,
  OGRSTSymbolLast = 12
}
 List of parameters for use with OGRStyleSymbol.
enum  ogr_style_tool_param_label_id {
  OGRSTLabelFontName = 0, OGRSTLabelSize = 1, OGRSTLabelTextString = 2, OGRSTLabelAngle = 3,
  OGRSTLabelFColor = 4, OGRSTLabelBColor = 5, OGRSTLabelPlacement = 6, OGRSTLabelAnchor = 7,
  OGRSTLabelDx = 8, OGRSTLabelDy = 9, OGRSTLabelPerp = 10, OGRSTLabelBold = 11,
  OGRSTLabelItalic = 12, OGRSTLabelUnderline = 13, OGRSTLabelPriority = 14, OGRSTLabelStrikeout = 15,
  OGRSTLabelStretch = 16, OGRSTLabelAdjHor = 17, OGRSTLabelAdjVert = 18, OGRSTLabelHColor = 19,
  OGRSTLabelOColor = 20, OGRSTLabelLast = 21
}
 List of parameters for use with OGRStyleLabel.

Functions

void * OGRMalloc (size_t)
void * OGRCalloc (size_t, size_t)
void * OGRRealloc (void *, size_t)
char * OGRStrdup (const char *)
void OGRFree (void *)
const char * OGRGeometryTypeToName (OGRwkbGeometryType eType)
 Fetch a human readable name corresponding to an OGRwkbGeometryType value.
OGRwkbGeometryType OGRMergeGeometryTypes (OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra)
 Find common geometry type.
OGRwkbGeometryType OGRMergeGeometryTypesEx (OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra, int bAllowPromotingToCurves)
 Find common geometry type.
OGRwkbGeometryType OGR_GT_Flatten (OGRwkbGeometryType eType)
 Returns the 2D geometry type corresponding to the passed geometry type.
OGRwkbGeometryType OGR_GT_SetZ (OGRwkbGeometryType eType)
 Returns the 3D geometry type corresponding to the passed geometry type.
OGRwkbGeometryType OGR_GT_SetModifier (OGRwkbGeometryType eType, int bSetZ, int bSetM)
int OGR_GT_HasZ (OGRwkbGeometryType eType)
 Return if the geometry type is a 3D geometry type.
int OGR_GT_IsSubClassOf (OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType)
 Returns if a type is a subclass of another one.
int OGR_GT_IsCurve (OGRwkbGeometryType)
 Return if a geometry type is an instance of Curve.
int OGR_GT_IsSurface (OGRwkbGeometryType)
 Return if a geometry type is an instance of Surface.
int OGR_GT_IsNonLinear (OGRwkbGeometryType)
 Return if a geometry type is a non-linear geometry type.
OGRwkbGeometryType OGR_GT_GetCollection (OGRwkbGeometryType eType)
 Returns the collection type that can contain the passed geometry type.
OGRwkbGeometryType OGR_GT_GetCurve (OGRwkbGeometryType eType)
 Returns the curve geometry type that can contain the passed geometry type.
OGRwkbGeometryType OGR_GT_GetLinear (OGRwkbGeometryType eType)
 Returns the non-curve geometry type that can contain the passed geometry type.
int OGRParseDate (const char *pszInput, OGRField *psOutput, int nOptions)

Detailed Description

Core portability services for cross-platform OGR code.


Define Documentation

Alter all parameters of field definition.

Used by OGR_L_AlterFieldDefn().

#define ALTER_DEFAULT_FLAG   0x10

Alter field DEFAULT value.

Used by OGR_L_AlterFieldDefn().

Since:
GDAL 2.0
#define ALTER_NAME_FLAG   0x1

Alter field name.

Used by OGR_L_AlterFieldDefn().

#define ALTER_NULLABLE_FLAG   0x8

Alter field NOT NULL constraint.

Used by OGR_L_AlterFieldDefn().

Since:
GDAL 2.0
#define ALTER_TYPE_FLAG   0x2

Alter field type.

Used by OGR_L_AlterFieldDefn().

#define ALTER_WIDTH_PRECISION_FLAG   0x4

Alter field width and precision.

Used by OGR_L_AlterFieldDefn().

#define OGR_F_VAL_ALL   0xFFFFFFFF

Enable all validation tests.

Used by OGR_F_Validate().

Since:
GDAL 2.0
#define OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT   0x00000008

Allow fields that are null when there's an associated default value.

This can be used for drivers where the low-level layers will automatically set the field value to the associated default value. This flag only makes sense if OGR_F_VAL_NULL is set too. Used by OGR_F_Validate().

Since:
GDAL 2.0
#define OGR_F_VAL_GEOM_TYPE   0x00000002

Validate that geometries respect geometry column type.

Used by OGR_F_Validate().

Since:
GDAL 2.0
#define OGR_F_VAL_NULL   0x00000001

Validate that fields respect not-null constraints.

Used by OGR_F_Validate().

Since:
GDAL 2.0
#define OGR_F_VAL_WIDTH   0x00000004

Validate that (string) fields respect field width.

Used by OGR_F_Validate().

Since:
GDAL 2.0
#define OLMD_FID64   "OLMD_FID64"

Capability set to YES as metadata on a layer that has features with 64 bit identifiers.

Since:
GDAL 2.0
#define wkb25DBit   0x80000000
Deprecated:
in GDAL 2.0.

Use wkbHasZ() or wkbSetZ() instead

#define wkbCurve   ((OGRwkbGeometryType)13)

Curve (abstract type).

SF-SQL 1.2

#define wkbHasZ (   x)    OGR_GT_HasZ(x)

Return if the geometry type is a 3D geometry type.

Since:
GDAL 2.0
#define wkbSetZ (   x)    OGR_GT_SetZ(x)

Return the 3D geometry type corresponding to the specified geometry type.

Since:
GDAL 2.0
#define wkbSurface   ((OGRwkbGeometryType)14)

Surface (abstract type).

SF-SQL 1.2


Enumeration Type Documentation

List of field subtypes.

A subtype represents a hint, a restriction of the main type, that is not strictly necessary to consult. This list is likely to be extended in the future ... avoid coding applications based on the assumption that all field types can be known. Most subtypes only make sense for a restricted set of main types.

Since:
GDAL 2.0
Enumerator:
OFSTNone 

No subtype.

This is the default value

OFSTBoolean 

Boolean integer.

Only valid for OFTInteger and OFTIntegerList.

OFSTInt16 

Signed 16-bit integer.

Only valid for OFTInteger and OFTIntegerList.

OFSTFloat32 

Single precision (32 bit) floatint point.

Only valid for OFTReal and OFTRealList.

List of feature field types.

This list is likely to be extended in the future ... avoid coding applications based on the assumption that all field types can be known.

Enumerator:
OFTInteger 

Simple 32bit integer.

OFTIntegerList 

List of 32bit integers.

OFTReal 

Double Precision floating point.

OFTRealList 

List of doubles.

OFTString 

String of ASCII chars.

OFTStringList 

Array of strings.

OFTWideString 

deprecated

OFTWideStringList 

deprecated

OFTBinary 

Raw Binary data.

OFTDate 

Date.

OFTTime 

Time.

OFTDateTime 

Date and Time.

OFTInteger64 

Single 64bit integer.

OFTInteger64List 

List of 64bit integers.

List of well known binary geometry types.

These are used within the BLOBs but are also returned from OGRGeometry::getGeometryType() to identify the type of a geometry object.

Enumerator:
wkbUnknown 

unknown type, non-standard

wkbPoint 

0-dimensional geometric object, standard WKB

wkbLineString 

1-dimensional geometric object with linear interpolation between Points, standard WKB

wkbPolygon 

planar 2-dimensional geometric object defined by 1 exterior boundary and 0 or more interior boundaries, standard WKB

wkbMultiPoint 

GeometryCollection of Points, standard WKB.

wkbMultiLineString 

GeometryCollection of LineStrings, standard WKB.

wkbMultiPolygon 

GeometryCollection of Polygons, standard WKB.

wkbGeometryCollection 

geometric object that is a collection of 1 or more geometric objects, standard WKB

wkbCircularString 

one or more circular arc segments connected end to end, ISO SQL/MM Part 3.

GDAL >= 2.0

wkbCompoundCurve 

sequence of contiguous curves, ISO SQL/MM Part 3.

GDAL >= 2.0

wkbCurvePolygon 

planar surface, defined by 1 exterior boundary and zero or more interior boundaries, that are curves.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbMultiCurve 

GeometryCollection of Curves, ISO SQL/MM Part 3.

GDAL >= 2.0

wkbMultiSurface 

GeometryCollection of Surfaces, ISO SQL/MM Part 3.

GDAL >= 2.0

wkbNone 

non-standard, for pure attribute records

wkbLinearRing 

non-standard, just for createGeometry()

wkbCircularStringZ 

wkbCircularString with Z component.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbCompoundCurveZ 

wkbCompoundCurve with Z component.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbCurvePolygonZ 

wkbCurvePolygon with Z component.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbMultiCurveZ 

wkbMultiCurve with Z component.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbMultiSurfaceZ 

wkbMultiSurface with Z component.

ISO SQL/MM Part 3. GDAL >= 2.0

wkbPoint25D 

2.5D extension as per 99-402

wkbLineString25D 

2.5D extension as per 99-402

wkbPolygon25D 

2.5D extension as per 99-402

wkbMultiPoint25D 

2.5D extension as per 99-402

wkbMultiLineString25D 

2.5D extension as per 99-402

wkbMultiPolygon25D 

2.5D extension as per 99-402

wkbGeometryCollection25D 

2.5D extension as per 99-402

Output variants of WKB we support.

99-402 was a short-lived extension to SFSQL 1.1 that used a high-bit flag to indicate the presence of Z coordiantes in a WKB geometry.

SQL/MM Part 3 and SFSQL 1.2 use offsets of 1000 (Z), 2000 (M) and 3000 (ZM) to indicate the present of higher dimensional coordinates in a WKB geometry. Reference: 09-009_Committee_Draft_ISOIEC_CD_13249-3_SQLMM_Spatial.pdf, ISO/IEC JTC 1/SC 32 N 1820, ISO/IEC CD 13249-3:201x(E), Date: 2009-01-16. The codes are also found in §8.2.3 of OGC 06-103r4 "OpenGIS® Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture", v1.2.1

Enumerator:
wkbVariantOldOgc 

Old-style 99-402 extended dimension (Z) WKB types.

wkbVariantIso 

SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M) WKB types.

wkbVariantPostGIS1 

PostGIS 1.X has different codes for CurvePolygon, MultiCurve and MultiSurface.


Function Documentation

Returns the 2D geometry type corresponding to the passed geometry type.

This function is intended to work with geometry types as old-style 99-402 extended dimension (Z) WKB types, as well as with newer SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M) WKB types.

Parameters:
eTypeInput geometry type
Returns:
2D geometry type corresponding to the passed geometry type.
Since:
GDAL 2.0

Returns the collection type that can contain the passed geometry type.

Handled conversions are : wkbNone->wkbNone, wkbPoint -> wkbMultiPoint, wkbLineString->wkbMultiLineString, wkbPolygon->wkbMultiPolygon, wkbCircularString->wkbMultiCurve, wkbCompoundCurve->wkbMultiCurve, wkbCurvePolygon->wkbMultiSurface. In other cases, wkbUnknown is returned

Passed Z flag is preserved.

Parameters:
eTypeInput geometry type
Returns:
the collection type that can contain the passed geometry type or wkbUnknown
Since:
GDAL 2.0

Returns the curve geometry type that can contain the passed geometry type.

Handled conversions are : wkbPolygon -> wkbCurvePolygon, wkbLineString->wkbCompoundCurve, wkbMultiPolygon->wkbMultiSurface and wkbMultiLineString->wkbMultiCurve. In other cases, the passed geometry is returned.

Passed Z flag is preserved.

Parameters:
eTypeInput geometry type
Returns:
the curve type that can contain the passed geometry type
Since:
GDAL 2.0

Returns the non-curve geometry type that can contain the passed geometry type.

Handled conversions are : wkbCurvePolygon -> wkbPolygon, wkbCircularString->wkbLineString, wkbCompoundCurve->wkbLineString, wkbMultiSurface->wkbMultiPolygon and wkbMultiCurve->wkbMultiLineString. In other cases, the passed geometry is returned.

Passed Z flag is preserved.

Parameters:
eTypeInput geometry type
Returns:
the non-curve type that can contain the passed geometry type
Since:
GDAL 2.0

Return if the geometry type is a 3D geometry type.

Parameters:
eTypeInput geometry type
Returns:
TRUE if the geometry type is a 3D geometry type.
Since:
GDAL 2.0
int OGR_GT_IsCurve ( OGRwkbGeometryType  eGeomType)

Return if a geometry type is an instance of Curve.

Such geometry type are wkbLineString, wkbCircularString, wkbCompoundCurve and their 3D variant.

Parameters:
eGeomTypethe geometry type
Returns:
TRUE if the geometry type is an instance of Curve
Since:
GDAL 2.0

Return if a geometry type is a non-linear geometry type.

Such geometry type are wkbCircularString, wkbCompoundCurve, wkbCurvePolygon, wkbMultiCurve, wkbMultiSurface and their 3D variant.

Parameters:
eGeomTypethe geometry type
Returns:
TRUE if the geometry type is a non-linear geometry type.
Since:
GDAL 2.0

Returns if a type is a subclass of another one.

Parameters:
eTypeType.
eSuperTypeSuper type
Returns:
TRUE if eType is a subclass of eSuperType.
Since:
GDAL 2.0

Return if a geometry type is an instance of Surface.

Such geometry type are wkbCurvePolygon and wkbPolygon and their 3D variant.

Parameters:
eGeomTypethe geometry type
Returns:
TRUE if the geometry type is an instance of Surface
Since:
GDAL 2.0

Returns the 3D geometry type corresponding to the passed geometry type.

Parameters:
eTypeInput geometry type
Returns:
3D geometry type corresponding to the passed geometry type.
Since:
GDAL 2.0
const char* OGRGeometryTypeToName ( OGRwkbGeometryType  eType)

Fetch a human readable name corresponding to an OGRwkbGeometryType value.

The returned value should not be modified, or freed by the application.

This function is C callable.

Parameters:
eTypethe geometry type.
Returns:
internal human readable string, or NULL on failure.

Find common geometry type.

Given two geometry types, find the most specific common type. Normally used repeatedly with the geometries in a layer to try and establish the most specific geometry type that can be reported for the layer.

NOTE: wkbUnknown is the "worst case" indicating a mixture of geometry types with nothing in common but the base geometry type. wkbNone should be used to indicate that no geometries have been encountered yet, and means the first geometry encounted will establish the preliminary type.

Parameters:
eMainthe first input geometry type.
eExtrathe second input geometry type.
Returns:
the merged geometry type.
OGRwkbGeometryType OGRMergeGeometryTypesEx ( OGRwkbGeometryType  eMain,
OGRwkbGeometryType  eExtra,
int  bAllowPromotingToCurves 
)

Find common geometry type.

Given two geometry types, find the most specific common type. Normally used repeatedly with the geometries in a layer to try and establish the most specific geometry type that can be reported for the layer.

NOTE: wkbUnknown is the "worst case" indicating a mixture of geometry types with nothing in common but the base geometry type. wkbNone should be used to indicate that no geometries have been encountered yet, and means the first geometry encounted will establish the preliminary type.

If bAllowPromotingToCurves is set to TRUE, mixing Polygon and CurvePolygon will return CurvePolygon. Mixing LineString, CircularString, CompoundCurve will return CompoundCurve. Mixing MultiPolygon and MultiSurface will return MultiSurface. Mixing MultiCurve and MultiLineString will return MultiCurve.

Parameters:
eMainthe first input geometry type.
eExtrathe second input geometry type.
bAllowPromotingToCurvesdetermine if promotion to curve type must be done.
Returns:
the merged geometry type.
Since:
GDAL 2.0

Generated for GDAL by doxygen 1.7.6.1.