OGR
|
Go to the source code of this file.
Classes | |
class | OGREnvelope |
class | OGREnvelope3D |
union | OGRField |
Macros | |
#define | wkbCurve ((OGRwkbGeometryType)13) |
#define | wkbSurface ((OGRwkbGeometryType)14) |
#define | wkb25DBit 0x80000000 |
#define | wkbFlatten(x) OGR_GT_Flatten((OGRwkbGeometryType)(x)) |
#define | wkbHasZ(x) OGR_GT_HasZ(x) |
#define | wkbSetZ(x) OGR_GT_SetZ(x) |
#define | ALTER_NAME_FLAG 0x1 |
#define | ALTER_TYPE_FLAG 0x2 |
#define | ALTER_WIDTH_PRECISION_FLAG 0x4 |
#define | ALTER_NULLABLE_FLAG 0x8 |
#define | ALTER_DEFAULT_FLAG 0x10 |
#define | ALTER_ALL_FLAG (ALTER_NAME_FLAG | ALTER_TYPE_FLAG | ALTER_WIDTH_PRECISION_FLAG | ALTER_NULLABLE_FLAG | ALTER_DEFAULT_FLAG) |
#define | OGR_F_VAL_NULL 0x00000001 |
#define | OGR_F_VAL_GEOM_TYPE 0x00000002 |
#define | OGR_F_VAL_WIDTH 0x00000004 |
#define | OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT 0x00000008 |
#define | OGR_F_VAL_ALL 0xFFFFFFFF |
#define | OLMD_FID64 "OLMD_FID64" |
#define | GDAL_CHECK_VERSION(pszCallingComponentName) GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName) |
Typedefs | |
typedef enum ogr_style_tool_class_id | OGRSTClassId |
typedef enum ogr_style_tool_units_id | OGRSTUnitId |
typedef enum ogr_style_tool_param_pen_id | OGRSTPenParam |
typedef enum ogr_style_tool_param_brush_id | OGRSTBrushParam |
typedef enum ogr_style_tool_param_symbol_id | OGRSTSymbolParam |
typedef enum ogr_style_tool_param_label_id | OGRSTLabelParam |
Functions | |
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. More... | |
OGRwkbGeometryType | OGRMergeGeometryTypes (OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra) |
Find common geometry type. More... | |
OGRwkbGeometryType | OGRMergeGeometryTypesEx (OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra, int bAllowPromotingToCurves) |
Find common geometry type. More... | |
OGRwkbGeometryType | OGR_GT_Flatten (OGRwkbGeometryType eType) |
Returns the 2D geometry type corresponding to the passed geometry type. More... | |
OGRwkbGeometryType | OGR_GT_SetZ (OGRwkbGeometryType eType) |
Returns the 3D geometry type corresponding to the passed geometry type. More... | |
int | OGR_GT_HasZ (OGRwkbGeometryType eType) |
Return if the geometry type is a 3D geometry type. More... | |
int | OGR_GT_IsSubClassOf (OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) |
Returns if a type is a subclass of another one. More... | |
int | OGR_GT_IsCurve (OGRwkbGeometryType) |
Return if a geometry type is an instance of Curve. More... | |
int | OGR_GT_IsSurface (OGRwkbGeometryType) |
Return if a geometry type is an instance of Surface. More... | |
int | OGR_GT_IsNonLinear (OGRwkbGeometryType) |
Return if a geometry type is a non-linear geometry type. More... | |
OGRwkbGeometryType | OGR_GT_GetCollection (OGRwkbGeometryType eType) |
Returns the collection type that can contain the passed geometry type. More... | |
OGRwkbGeometryType | OGR_GT_GetCurve (OGRwkbGeometryType eType) |
Returns the curve geometry type that can contain the passed geometry type. More... | |
OGRwkbGeometryType | OGR_GT_GetLinear (OGRwkbGeometryType eType) |
Returns the non-curve geometry type that can contain the passed geometry type. More... | |
int CPL_STDCALL | GDALCheckVersion (int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName) |
Core portability services for cross-platform OGR code.
#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. Used by OGR_L_AlterFieldDefn().
#define ALTER_DEFAULT_FLAG 0x10 |
Alter field DEFAULT value. Used by OGR_L_AlterFieldDefn().
#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().
#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 GDAL_CHECK_VERSION | ( | pszCallingComponentName | ) | GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName) |
Helper macro for GDALCheckVersion
#define OGR_F_VAL_ALL 0xFFFFFFFF |
Enable all validation tests. 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().
Referenced by OGRFeature::Validate().
#define OGR_F_VAL_GEOM_TYPE 0x00000002 |
Validate that geometries respect geometry column type. Used by OGR_F_Validate().
Referenced by OGRFeature::Validate().
#define OGR_F_VAL_NULL 0x00000001 |
Validate that fields respect not-null constraints. Used by OGR_F_Validate().
Referenced by OGRFeature::Validate().
#define OGR_F_VAL_WIDTH 0x00000004 |
Validate that (string) fields respect field width. Used by OGR_F_Validate().
Referenced by OGRFeature::Validate().
#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 wkbCurve ((OGRwkbGeometryType)13) |
Curve (abstract type). SF-SQL 1.2
Referenced by OGR_GT_IsCurve(), and OGR_GT_IsSubClassOf().
#define wkbFlatten | ( | x | ) | OGR_GT_Flatten((OGRwkbGeometryType)(x)) |
Return the 2D geometry type corresponding to the specified geometry type
Referenced by OGRGeometry::Centroid(), OGRGeometryCollection::closeRings(), OGRCurvePolygon::Contains(), OGRGeometryFactory::createGeometry(), OGRGeometry::dumpReadable(), OGRSimpleCurve::exportToWkb(), OGRGeometryCollection::exportToWkb(), OGRGeometryFactory::forceTo(), OGRGeometryFactory::forceToLineString(), OGRGeometryFactory::forceToMultiLineString(), OGRGeometryFactory::forceToMultiPoint(), OGRGeometryFactory::forceToMultiPolygon(), OGRGeometryFactory::forceToPolygon(), OGRGeometryCollection::get_Area(), OGRGeometryCollection::get_Length(), OGRPolygon::getCurveGeometry(), OGRGeometry::getIsoGeometryType(), OGRMultiSurface::importFromWkt(), OGRMultiCurve::importFromWkt(), OGRPoint::Intersects(), OGRCurvePolygon::Intersects(), OGR_G_AddGeometry(), OGR_G_AddGeometryDirectly(), OGR_G_AddPoint(), OGR_G_AddPoint_2D(), OGR_G_Area(), OGR_G_Centroid(), OGR_G_GetGeometryCount(), OGR_G_GetGeometryRef(), OGR_G_GetPoint(), OGR_G_GetPointCount(), OGR_G_GetPoints(), OGR_G_GetX(), OGR_G_GetY(), OGR_G_GetZ(), OGR_G_Length(), OGR_G_PointOnSurface(), OGR_G_RemoveGeometry(), OGR_G_SetPoint(), OGR_G_SetPoint_2D(), OGR_G_SetPointCount(), OGR_G_SetPoints(), OGR_GT_GetCollection(), OGR_GT_GetCurve(), OGR_GT_GetLinear(), OGR_GT_IsNonLinear(), OGR_GT_IsSubClassOf(), OGRBuildPolygonFromEdges(), OGRGeometryTypeToName(), OGRMergeGeometryTypesEx(), OGRGeometryFactory::organizePolygons(), OGRGeometry::Polygonize(), and OGRPoint::Within().
#define wkbHasZ | ( | x | ) | OGR_GT_HasZ(x) |
Return if the geometry type is a 3D geometry type
Referenced by OGRSimpleCurve::exportToWkb(), OGRGeometryCollection::exportToWkb(), OGR_GT_GetCollection(), OGR_GT_GetCurve(), OGR_GT_GetLinear(), and OGRFeature::Validate().
#define wkbSetZ | ( | x | ) | OGR_GT_SetZ(x) |
Return the 3D geometry type corresponding to the specified geometry type.
Referenced by OGR_GT_GetCollection(), OGR_GT_GetCurve(), OGR_GT_GetLinear(), and OGRFeature::Validate().
#define wkbSurface ((OGRwkbGeometryType)14) |
Surface (abstract type). SF-SQL 1.2
Referenced by OGR_GT_IsSubClassOf(), and OGR_GT_IsSurface().
typedef enum ogr_style_tool_param_brush_id OGRSTBrushParam |
List of parameters for use with OGRStyleBrush.
typedef enum ogr_style_tool_class_id OGRSTClassId |
OGRStyleTool derived class types (returned by GetType()).
typedef enum ogr_style_tool_param_label_id OGRSTLabelParam |
List of parameters for use with OGRStyleLabel.
typedef enum ogr_style_tool_param_pen_id OGRSTPenParam |
List of parameters for use with OGRStylePen.
typedef enum ogr_style_tool_param_symbol_id OGRSTSymbolParam |
List of parameters for use with OGRStyleSymbol.
typedef enum ogr_style_tool_units_id OGRSTUnitId |
List of units supported by OGRStyleTools.
OGRStyleTool derived class types (returned by GetType()).
List of parameters for use with OGRStyleBrush.
List of parameters for use with OGRStyleLabel.
List of parameters for use with OGRStylePen.
List of parameters for use with OGRStyleSymbol.
List of units supported by OGRStyleTools.
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 OGRJustification |
Display justification for field values.
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 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
int CPL_STDCALL GDALCheckVersion | ( | int | nVersionMajor, |
int | nVersionMinor, | ||
const char * | pszCallingComponentName | ||
) |
Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.
The purpose of this method is to ensure that calling code will run with the GDAL version it is compiled for. It is primarly intented for external plugins.
nVersionMajor | Major version to be tested against |
nVersionMinor | Minor version to be tested against |
pszCallingComponentName | If not NULL, in case of version mismatch, the method will issue a failure mentionning the name of the calling component. |
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->wkbMultiPolygon, wkbCircularString->wkbMultiCurve, wkbCompoundCurve->wkbMultiCurve, wkbCurvePolygon->wkbMultiSurface. In other cases, wkbUnknown is returned
Passed Z flag is preserved.
eType | Input geometry type |
References OGR_GT_IsCurve(), OGR_GT_IsSurface(), wkbFlatten, wkbHasZ, wkbLineString, wkbMultiCurve, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbMultiSurface, wkbNone, wkbPoint, wkbPolygon, wkbSetZ, and wkbUnknown.
Referenced by OGRGeometryFactory::forceTo().
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 flag is preserved.
eType | Input geometry type |
References wkbCompoundCurve, wkbCurvePolygon, wkbFlatten, wkbHasZ, wkbLineString, wkbMultiCurve, wkbMultiLineString, wkbMultiPolygon, wkbMultiSurface, wkbPolygon, and wkbSetZ.
Referenced by OGRGeometryCollection::getCurveGeometry().
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 flag is preserved.
eType | Input geometry type |
References OGR_GT_IsCurve(), OGR_GT_IsSurface(), wkbFlatten, wkbHasZ, wkbLineString, wkbMultiCurve, wkbMultiLineString, wkbMultiPolygon, wkbMultiSurface, wkbPolygon, and wkbSetZ.
Referenced by OGRGeometryCollection::getLinearGeometry(), OGR_F_GetGeometryRef(), OGR_F_GetGeomFieldRef(), OGR_FD_GetGeomType(), OGR_GFld_GetType(), and OGR_L_GetGeomType().
int OGR_GT_HasZ | ( | OGRwkbGeometryType | eType | ) |
Return if the geometry type is a 3D geometry type.
eType | Input geometry type |
Referenced by OGR_GT_SetZ().
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.
eGeomType | the geometry type |
< Curve (abstract type). SF-SQL 1.2
References OGR_GT_IsSubClassOf(), and wkbCurve.
Referenced by OGRGeometryFactory::forceTo(), OGRGeometryFactory::forceToPolygon(), OGRGeometryCollection::get_Area(), OGRGeometryCollection::get_Length(), OGR_G_AddGeometry(), OGR_G_AddGeometryDirectly(), OGR_G_Area(), OGR_G_GetPointCount(), OGR_G_Length(), OGR_G_Value(), OGR_GT_GetCollection(), OGR_GT_GetLinear(), and OGRMergeGeometryTypesEx().
int OGR_GT_IsNonLinear | ( | OGRwkbGeometryType | eGeomType | ) |
Return if a geometry type is a non-linear geometry type.
Such geometry type are wkbCircularString, wkbCompoundCurve, wkbCurvePolygon, wkbMultiCurve, wkbMultiSurface and their 3D variant.
eGeomType | the geometry type |
References wkbCircularString, wkbCompoundCurve, wkbCurvePolygon, wkbFlatten, wkbMultiCurve, and wkbMultiSurface.
Referenced by OGR_F_GetGeometryRef(), OGR_F_GetGeomFieldRef(), OGR_FD_GetGeomType(), OGR_GFld_GetType(), and OGR_L_GetGeomType().
int OGR_GT_IsSubClassOf | ( | OGRwkbGeometryType | eType, |
OGRwkbGeometryType | eSuperType | ||
) |
Returns if a type is a subclass of another one.
eType | Type. |
eSuperType | Super type |
< Curve (abstract type). SF-SQL 1.2
< Surface (abstract type). SF-SQL 1.2
References wkbCircularString, wkbCompoundCurve, wkbCurve, wkbCurvePolygon, wkbFlatten, wkbGeometryCollection, wkbLineString, wkbMultiCurve, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbMultiSurface, wkbPolygon, wkbSurface, and wkbUnknown.
Referenced by OGRGeometryFactory::forceTo(), OGRGeometryCollection::get_Area(), OGRGeometryCollection::get_Length(), OGR_G_AddGeometry(), OGR_G_AddGeometryDirectly(), OGR_G_Area(), OGR_G_GetGeometryCount(), OGR_G_GetGeometryRef(), OGR_G_Length(), OGR_G_RemoveGeometry(), OGR_GT_IsCurve(), OGR_GT_IsSurface(), and OGRMergeGeometryTypesEx().
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 3D variant.
eGeomType | the geometry type |
< Surface (abstract type). SF-SQL 1.2
References OGR_GT_IsSubClassOf(), and wkbSurface.
Referenced by OGRGeometryCollection::get_Area(), OGR_G_Area(), OGR_GT_GetCollection(), and OGR_GT_GetLinear().
OGRwkbGeometryType OGR_GT_SetZ | ( | OGRwkbGeometryType | eType | ) |
Returns the 3D geometry type corresponding to the passed geometry type.
eType | Input geometry type |
References OGR_GT_HasZ(), wkbGeometryCollection, wkbNone, and wkbUnknown.
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. |
References wkbCircularString, wkbCompoundCurve, wkbCurvePolygon, wkbFlatten, wkbGeometryCollection, wkbLineString, wkbMultiCurve, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbMultiSurface, wkbNone, wkbPoint, wkbPolygon, and wkbUnknown.
Referenced by OGRFeature::Validate().
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 encounted will establish the preliminary type.
eMain | the first input geometry type. |
eExtra | the second input geometry type. |
References OGRMergeGeometryTypesEx().
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.
eMain | the first input geometry type. |
eExtra | the second input geometry type. |
bAllowPromotingToCurves | determine if promotion to curve type must be done. |
References OGR_GT_IsCurve(), OGR_GT_IsSubClassOf(), wkbCompoundCurve, wkbFlatten, wkbGeometryCollection, wkbNone, and wkbUnknown.
Referenced by OGRMergeGeometryTypes().