GDAL
|
Core portability services for cross-platform OGR code. More...
Go to the source code of this file.
Classes | |
class | OGREnvelope |
Simple container for a bounding region (rectangle) More... | |
class | OGREnvelope3D |
Simple container for a bounding region in 3D. More... | |
union | OGRField |
OGRFeature field attribute value union. More... | |
struct | OGRCodedValue |
Associates a code and a value. More... | |
Macros | |
#define | OGRERR_NONE 0 |
Success. | |
#define | OGRERR_NOT_ENOUGH_DATA 1 |
Not enough data to deserialize. | |
#define | OGRERR_NOT_ENOUGH_MEMORY 2 |
Not enough memory. | |
#define | OGRERR_UNSUPPORTED_GEOMETRY_TYPE 3 |
Unsupported geometry type. | |
#define | OGRERR_UNSUPPORTED_OPERATION 4 |
Unsupported operation. | |
#define | OGRERR_CORRUPT_DATA 5 |
Corrupt data. | |
#define | OGRERR_FAILURE 6 |
Failure. | |
#define | OGRERR_UNSUPPORTED_SRS 7 |
Unsupported SRS. | |
#define | OGRERR_INVALID_HANDLE 8 |
Invalid handle. | |
#define | OGRERR_NON_EXISTING_FEATURE 9 |
Non existing feature. | |
#define | wkb25DBit 0x80000000 |
#define | wkbFlatten(x) OGR_GT_Flatten(static_cast<OGRwkbGeometryType>(x)) |
Return the 2D geometry type corresponding to the specified geometry type. | |
#define | wkbHasZ(x) (OGR_GT_HasZ(x) != 0) |
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 | wkbHasM(x) (OGR_GT_HasM(x) != 0) |
Return if the geometry type is a measured geometry type. | |
#define | wkbSetM(x) OGR_GT_SetM(x) |
Return the measured geometry type corresponding to the specified geometry type. | |
#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_UNIQUE_FLAG 0x20 |
Alter field UNIQUE constraint. | |
#define | ALTER_DOMAIN_FLAG 0x40 |
Alter field domain name. | |
#define | ALTER_ALTERNATIVE_NAME_FLAG 0x80 |
Alter field alternative name. | |
#define | ALTER_COMMENT_FLAG 0x100 |
Alter field comment. | |
#define | ALTER_ALL_FLAG |
Alter all parameters of field definition. | |
#define | ALTER_GEOM_FIELD_DEFN_NAME_FLAG 0x1000 |
Alter geometry field name. | |
#define | ALTER_GEOM_FIELD_DEFN_TYPE_FLAG 0x2000 |
Alter geometry field type. | |
#define | ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG 0x4000 |
Alter geometry field nullable state. | |
#define | ALTER_GEOM_FIELD_DEFN_SRS_FLAG 0x8000 |
Alter geometry field spatial reference system (except its coordinate epoch) Used by OGR_L_AlterGeomFieldDefn(). | |
#define | ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG 0x10000 |
Alter geometry field coordinate epoch Used by OGR_L_AlterGeomFieldDefn(). | |
#define | ALTER_GEOM_FIELD_DEFN_ALL_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_ALLOW_DIFFERENT_GEOM_DIM 0x00000010 |
Allow geometry fields to have a different coordinate dimension that their geometry column type. | |
#define | OGR_F_VAL_ALL (0x7FFFFFFF & ~OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM) |
Enable all validation tests (except OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM) Used by OGR_F_Validate(). | |
#define | OGRNullFID -1 |
Special value for a unset FID. | |
#define | OGRUnsetMarker -21121 |
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a unset field. | |
#define | OGRNullMarker -21122 |
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a null field. | |
#define | OGR_TZFLAG_UNKNOWN 0 |
Time zone flag indicating unknown timezone. | |
#define | OGR_TZFLAG_LOCALTIME 1 |
Time zone flag indicating local time. | |
#define | OGR_TZFLAG_MIXED_TZ 2 |
Time zone flag only returned by OGRFieldDefn::GetTZFlag() to indicate that all values in the field have a known time zone (ie different from OGR_TZFLAG_UNKNOWN and OGR_TZFLAG_LOCALTIME), but it may be different among features. | |
#define | OGR_TZFLAG_UTC 100 |
Time zone flag indicating UTC. | |
#define | OGRPARSEDATE_OPTION_LAX 1 |
Option for OGRParseDate() to ask for lax checks on the input format. | |
#define | OLCRandomRead "RandomRead" |
Layer capability for random read. | |
#define | OLCSequentialWrite "SequentialWrite" |
Layer capability for sequential write. | |
#define | OLCRandomWrite "RandomWrite" |
Layer capability for random write. | |
#define | OLCFastSpatialFilter "FastSpatialFilter" |
Layer capability for fast spatial filter. | |
#define | OLCFastFeatureCount "FastFeatureCount" |
Layer capability for fast feature count retrieval . | |
#define | OLCFastGetExtent "FastGetExtent" |
Layer capability for fast extent retrieval. | |
#define | OLCFastGetExtent3D "FastGetExtent3D" |
Layer capability for fast 3D extent retrieval. | |
#define | OLCCreateField "CreateField" |
Layer capability for field creation . | |
#define | OLCDeleteField "DeleteField" |
Layer capability for field deletion . | |
#define | OLCReorderFields "ReorderFields" |
Layer capability for field reordering. | |
#define | OLCAlterFieldDefn "AlterFieldDefn" |
Layer capability for field alteration. | |
#define | OLCAlterGeomFieldDefn "AlterGeomFieldDefn" |
Layer capability for geometry field alteration . | |
#define | OLCTransactions "Transactions" |
Layer capability for transactions . | |
#define | OLCDeleteFeature "DeleteFeature" |
Layer capability for feature deletion. | |
#define | OLCUpsertFeature "UpsertFeature" |
Layer capability for feature upsert. | |
#define | OLCUpdateFeature "UpdateFeature" |
Layer capability for specialized \ UpdateFeature() implementation. | |
#define | OLCFastSetNextByIndex "FastSetNextByIndex" |
Layer capability for setting next feature index . | |
#define | OLCStringsAsUTF8 "StringsAsUTF8" |
Layer capability for strings returned with UTF-8 \ encoding. | |
#define | OLCIgnoreFields "IgnoreFields" |
Layer capability for field ignoring. | |
#define | OLCCreateGeomField "CreateGeomField" |
Layer capability for geometry field creation. | |
#define | OLCCurveGeometries "CurveGeometries" |
Layer capability for curve geometries support. | |
#define | OLCMeasuredGeometries "MeasuredGeometries" |
Layer capability for measured geometries support . | |
#define | OLCZGeometries "ZGeometries" |
Layer capability for geometry with Z dimension support. | |
#define | OLCRename "Rename" |
Layer capability for a layer that supports Rename() | |
#define | OLCFastGetArrowStream "FastGetArrowStream" |
Layer capability for fast GetArrowStream() \ implementation. | |
#define | OLCFastWriteArrowBatch "FastWriteArrowBatch" |
Layer capability for fast WriteArrowBatch() \ implementation. | |
#define | ODsCCreateLayer "CreateLayer" |
Dataset capability for layer creation. | |
#define | ODsCDeleteLayer "DeleteLayer" |
Dataset capability for layer deletion. | |
#define | ODsCCreateGeomFieldAfterCreateLayer "CreateGeomFieldAfterCreateLayer" |
Dataset capability for geometry \ field creation support. | |
#define | ODsCCurveGeometries "CurveGeometries" |
Dataset capability for curve geometries support. | |
#define | ODsCTransactions "Transactions" |
Dataset capability for dataset transcations. | |
#define | ODsCEmulatedTransactions "EmulatedTransactions" |
Dataset capability for emulated dataset \ transactions. | |
#define | ODsCMeasuredGeometries "MeasuredGeometries" |
Dataset capability for measured geometries \ support. | |
#define | ODsCZGeometries "ZGeometries" |
Dataset capability for geometry with Z dimension \ support. | |
#define | ODsCRandomLayerRead "RandomLayerRead" |
Dataset capability for GetNextFeature() returning \ features from random layers. | |
#define | ODsCRandomLayerWrite "RandomLayerWrite " |
Dataset capability for supporting CreateFeature \ on layer in random order. | |
#define | ODsCAddFieldDomain "AddFieldDomain" |
Dataset capability for supporting AddFieldDomain() \ (at least partially) | |
#define | ODsCDeleteFieldDomain "DeleteFieldDomain" |
Dataset capability for supporting \ DeleteFieldDomain() | |
#define | ODsCUpdateFieldDomain "UpdateFieldDomain" |
Dataset capability for supporting \ UpdateFieldDomain() | |
#define | ODrCCreateDataSource "CreateDataSource" |
Driver capability for datasource creation. | |
#define | ODrCDeleteDataSource "DeleteDataSource" |
Driver capability for datasource deletion. | |
#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 |
Type for a OGR error. | |
typedef int | OGRBoolean |
Type for a OGR boolean. | |
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. | |
Functions | |
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_SetM (OGRwkbGeometryType eType) |
Returns the measured geometry type corresponding to the passed geometry type. | |
OGRwkbGeometryType | OGR_GT_SetModifier (OGRwkbGeometryType eType, int bSetZ, int bSetM) |
Returns a XY, XYZ, XYM or XYZM geometry type depending on parameter. | |
int | OGR_GT_HasZ (OGRwkbGeometryType eType) |
Return if the geometry type is a 3D geometry type. | |
int | OGR_GT_HasM (OGRwkbGeometryType eType) |
Return if the geometry type is a measured 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 | OGR_GET_MS (float fSec) |
Return the number of milliseconds from a datetime with decimal seconds. | |
int | OGRParseDate (const char *pszInput, OGRField *psOutput, int nOptions) |
Parse date string. | |
Core portability services for cross-platform OGR code.
#define ALTER_ALL_FLAG |
Alter all parameters of field definition.
Used by OGR_L_AlterFieldDefn().
#define ALTER_ALTERNATIVE_NAME_FLAG 0x80 |
#define ALTER_COMMENT_FLAG 0x100 |
#define ALTER_DEFAULT_FLAG 0x10 |
#define ALTER_DOMAIN_FLAG 0x40 |
#define ALTER_GEOM_FIELD_DEFN_ALL_FLAG |
Alter all parameters of field definition.
Used by OGR_L_AlterGeomFieldDefn().
#define ALTER_GEOM_FIELD_DEFN_NAME_FLAG 0x1000 |
#define ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG 0x4000 |
#define ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG 0x10000 |
Alter geometry field coordinate epoch Used by OGR_L_AlterGeomFieldDefn().
#define ALTER_GEOM_FIELD_DEFN_SRS_FLAG 0x8000 |
Alter geometry field spatial reference system (except its coordinate epoch) Used by OGR_L_AlterGeomFieldDefn().
#define ALTER_GEOM_FIELD_DEFN_TYPE_FLAG 0x2000 |
#define ALTER_NAME_FLAG 0x1 |
Alter field name.
Used by OGR_L_AlterFieldDefn().
#define ALTER_NULLABLE_FLAG 0x8 |
#define ALTER_TYPE_FLAG 0x2 |
Alter field type.
Used by OGR_L_AlterFieldDefn().
#define ALTER_UNIQUE_FLAG 0x20 |
#define ALTER_WIDTH_PRECISION_FLAG 0x4 |
Alter field width and precision.
Used by OGR_L_AlterFieldDefn().
#define ODsCZGeometries "ZGeometries" |
Dataset capability for geometry with Z dimension \ support.
Since GDAL 3.6.
#define OGR_F_VAL_ALL (0x7FFFFFFF & ~OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM) |
Enable all validation tests (except OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM) Used by OGR_F_Validate().
#define OGR_F_VAL_ALLOW_DIFFERENT_GEOM_DIM 0x00000010 |
Allow geometry fields to have a different coordinate dimension that their geometry column type.
This flag only makes sense if OGR_F_VAL_GEOM_TYPE is set too. Used by OGR_F_Validate().
#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().
#define OGR_F_VAL_GEOM_TYPE 0x00000002 |
#define OGR_F_VAL_NULL 0x00000001 |
#define OGR_F_VAL_WIDTH 0x00000004 |
#define OGR_TZFLAG_UNKNOWN 0 |
Time zone flag indicating unknown timezone.
For the OGRFieldDefn::GetTZFlag() property, this may also indicate a mix of unknown, localtime or known time zones in the same field.
#define OGR_TZFLAG_UTC 100 |
Time zone flag indicating UTC.
Used to derived other time zone flags with the following logic:
#define OGRERR_NON_EXISTING_FEATURE 9 |
Non existing feature.
Added in GDAL 2.0
#define OGRNullMarker -21122 |
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a null field.
Direct use of this value is strongly discouraged. Use OGR_RawField_SetNull() or OGR_RawField_IsNull() instead.
#define OGRUnsetMarker -21121 |
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a unset field.
Direct use of this value is strongly discouraged. Use OGR_RawField_SetUnset() or OGR_RawField_IsUnset() instead.
#define OLCZGeometries "ZGeometries" |
Layer capability for geometry with Z dimension support.
\ Since GDAL 3.6.
#define OLMD_FID64 "OLMD_FID64" |
Capability set to YES as metadata on a layer that has features with 64 bit identifiers.
#define wkb25DBit 0x80000000 |
#define wkbHasM | ( | x | ) | (OGR_GT_HasM(x) != 0) |
Return if the geometry type is a measured geometry type.
#define wkbHasZ | ( | x | ) | (OGR_GT_HasZ(x) != 0) |
Return if the geometry type is a 3D geometry type.
#define wkbSetM | ( | x | ) | OGR_GT_SetM(x) |
Return the measured geometry type corresponding to the specified geometry type.
#define wkbSetZ | ( | x | ) | OGR_GT_SetZ(x) |
Return the 3D geometry type corresponding to the specified geometry type.
OGRStyleTool derived class types (returned by GetType()).
Enumerator | |
---|---|
OGRSTCNone | None. |
OGRSTCPen | Pen. |
OGRSTCBrush | Brush. |
OGRSTCSymbol | Symbol. |
OGRSTCLabel | Label. |
OGRSTCVector | Vector. |
List of parameters for use with OGRStyleLabel.
List of parameters for use with OGRStyleSymbol.
Merge policy for field domains.
When a feature is built by merging two features, defines how the value of attributes following the domain are computed.
Enumerator | |
---|---|
OFDMP_DEFAULT_VALUE | Default value. |
OFDMP_SUM | Sum. |
OFDMP_GEOMETRY_WEIGHTED | New values are computed as the weighted average of the source values. |
Split policy for field domains.
When a feature is split in two, defines how the value of attributes following the domain are computed.
enum OGRFieldDomainType |
enum OGRFieldSubType |
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.
enum OGRFieldType |
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.
enum OGRwkbByteOrder |
enum OGRwkbGeometryType |
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.
enum OGRwkbVariant |
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 coordinates 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
OGRwkbGeometryType OGR_GT_Flatten | ( | OGRwkbGeometryType | eType | ) |
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.
eType | Input geometry type |
OGRwkbGeometryType OGR_GT_GetCollection | ( | OGRwkbGeometryType | eType | ) |
Returns the collection type that can contain the passed geometry type.
Handled conversions are : wkbNone->wkbNone, wkbPoint -> wkbMultiPoint, wkbLineString->wkbMultiLineString, wkbPolygon/wkbTriangle/wkbPolyhedralSurface/wkbTIN->wkbMultiPolygon, wkbCircularString->wkbMultiCurve, wkbCompoundCurve->wkbMultiCurve, wkbCurvePolygon->wkbMultiSurface. In other cases, wkbUnknown is returned
Passed Z, M, ZM flag is preserved.
eType | Input geometry type |
OGRwkbGeometryType OGR_GT_GetCurve | ( | OGRwkbGeometryType | eType | ) |
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, M, ZM flag is preserved.
eType | Input geometry type |
OGRwkbGeometryType OGR_GT_GetLinear | ( | OGRwkbGeometryType | eType | ) |
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, M, ZM flag is preserved.
eType | Input geometry type |
int OGR_GT_HasM | ( | OGRwkbGeometryType | eType | ) |
Return if the geometry type is a measured type.
eType | Input geometry type |
int OGR_GT_HasZ | ( | OGRwkbGeometryType | eType | ) |
Return if the geometry type is a 3D geometry type.
eType | Input geometry type |
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 Z/M/ZM variant.
eGeomType | the geometry type |
int OGR_GT_IsNonLinear | ( | OGRwkbGeometryType | eGeomType | ) |
Return if a geometry type is a non-linear geometry type.
Such geometry type are wkbCurve, wkbCircularString, wkbCompoundCurve, wkbSurface, wkbCurvePolygon, wkbMultiCurve, wkbMultiSurface and their Z/M variants.
eGeomType | the geometry type |
int OGR_GT_IsSubClassOf | ( | OGRwkbGeometryType | eType, |
OGRwkbGeometryType | eSuperType | ||
) |
Returns if a type is a subclass of another one.
eType | Type. |
eSuperType | Super type |
int OGR_GT_IsSurface | ( | OGRwkbGeometryType | eGeomType | ) |
Return if a geometry type is an instance of Surface.
Such geometry type are wkbCurvePolygon and wkbPolygon and their Z/M/ZM variant.
eGeomType | the geometry type |
OGRwkbGeometryType OGR_GT_SetM | ( | OGRwkbGeometryType | eType | ) |
Returns the measured geometry type corresponding to the passed geometry type.
eType | Input geometry type |
OGRwkbGeometryType OGR_GT_SetModifier | ( | OGRwkbGeometryType | eType, |
int | bHasZ, | ||
int | bHasM | ||
) |
Returns a XY, XYZ, XYM or XYZM geometry type depending on parameter.
eType | Input geometry type |
bHasZ | TRUE if the output geometry type must be 3D. |
bHasM | TRUE if the output geometry type must be measured. |
OGRwkbGeometryType OGR_GT_SetZ | ( | OGRwkbGeometryType | eType | ) |
Returns the 3D geometry type corresponding to the passed geometry type.
eType | Input geometry type |
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.
eType | the geometry type. |
OGRwkbGeometryType OGRMergeGeometryTypes | ( | OGRwkbGeometryType | eMain, |
OGRwkbGeometryType | eExtra | ||
) |
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 encountered will establish the preliminary type.
eMain | the first input geometry type. |
eExtra | the second input 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 encountered 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.
eMain | the first input geometry type. |
eExtra | the second input geometry type. |
bAllowPromotingToCurves | determine if promotion to curve type must be done. |
int OGRParseDate | ( | const char * | pszInput, |
OGRField * | psField, | ||
int | nOptions | ||
) |
Parse date string.
This function attempts to parse a date string in a variety of formats into the OGRField.Date format suitable for use with OGR. Generally speaking this function is expecting values like:
YYYY-MM-DD HH:MM:SS(.sss)?+nn or YYYY-MM-DDTHH:MM:SS(.sss)?Z (ISO 8601 format) or YYYY-MM-DDZ or THH:MM(:SS(.sss)?)?Z? (ISO 8601 extended format) or THHMM(SS(.sss)?)?Z? (ISO 8601 basic format)
The seconds may also have a decimal portion (parsed as milliseconds). And just dates (YYYY-MM-DD) or just times (HH:MM:SS[.sss]) are also supported. The date may also be in YYYY/MM/DD format. If the year is less than 100 and greater than 30 a "1900" century value will be set. If it is less than 30 and greater than -1 then a "2000" century value will be set. In the future this function may be generalized, and additional control provided through nOptions, but an nOptions value of "0" should always do a reasonable default form of processing.
The value of psField will be indeterminate if the function fails (returns FALSE).
pszInput | the input date string. |
psField | the OGRField that will be updated with the parsed result. |
nOptions | parsing options. 0 or OGRPARSEDATE_OPTION_LAX |