OGR
Public Member Functions | List of all members
OGRGeomFieldDefn Class Reference

#include <ogr_feature.h>

Inheritance diagram for OGRGeomFieldDefn:
OGRGenSQLGeomFieldDefn OGRUnionLayerGeomFieldDefn

Public Member Functions

 OGRGeomFieldDefn (const char *pszNameIn, OGRwkbGeometryType eGeomTypeIn)
 Constructor. More...
 
 OGRGeomFieldDefn (OGRGeomFieldDefn *)
 Constructor. More...
 
void SetName (const char *)
 Reset the name of this field. More...
 
const char * GetNameRef ()
 Fetch name of this field. More...
 
OGRwkbGeometryType GetType ()
 Fetch geometry type of this field. More...
 
void SetType (OGRwkbGeometryType eTypeIn)
 Set the geometry type of this field. This should never be done to an OGRGeomFieldDefn that is already part of an OGRFeatureDefn. More...
 
virtual OGRSpatialReferenceGetSpatialRef ()
 Fetch spatial reference system of this field. More...
 
void SetSpatialRef (OGRSpatialReference *poSRS)
 Set the spatial reference of this field. More...
 
int IsIgnored ()
 Return whether this field should be omitted when fetching features. More...
 
void SetIgnored (int bIgnore)
 Set whether this field should be omitted when fetching features. More...
 
int IsSame (OGRGeomFieldDefn *)
 Test if the geometry field definition is identical to the other one. More...
 

Detailed Description

Definition of a geometry field of an OGRFeatureDefn. A geometry field is described by a name, a geometry type and a spatial reference system.

Since
OGR 2.0

Constructor & Destructor Documentation

OGRGeomFieldDefn::OGRGeomFieldDefn ( const char *  pszNameIn,
OGRwkbGeometryType  eGeomTypeIn 
)

Constructor.

Parameters
pszNameInthe name of the new field.
eGeomTypeInthe type of the new field.
Since
GDAL 1.11

Referenced by OGR_GFld_Create().

OGRGeomFieldDefn::OGRGeomFieldDefn ( OGRGeomFieldDefn poPrototype)

Constructor.

Create by cloning an existing geometry field definition.

Parameters
poPrototypethe geometry field definition to clone.
Since
GDAL 1.11

References GetNameRef(), GetSpatialRef(), GetType(), and SetSpatialRef().

Member Function Documentation

const char * OGRGeomFieldDefn::GetNameRef ( )
inline

Fetch name of this field.

This method is the same as the C function OGR_GFld_GetNameRef().

Returns
pointer to an internal name string that should not be freed or modified.
Since
GDAL 1.11

Referenced by OGRFeature::DumpReadable(), OGRDataSource::ExecuteSQL(), OGRLayer::GetGeometryColumn(), OGRUnionLayer::GetGeomType(), OGRUnionLayer::GetLayerDefn(), IsSame(), OGRGeomFieldDefn(), and OGRFeature::SetFrom().

OGRSpatialReference * OGRGeomFieldDefn::GetSpatialRef ( )
virtual

Fetch spatial reference system of this field.

This method is the same as the C function OGR_GFld_GetSpatialRef().

Returns
field spatial reference system.
Since
GDAL 1.11

Referenced by OGRUnionLayer::GetLayerDefn(), OGRUnionLayer::GetName(), OGRLayer::GetSpatialRef(), IsSame(), OGRGeomFieldDefn(), and OGRUnionLayer::ResetReading().

OGRwkbGeometryType OGRGeomFieldDefn::GetType ( )
inline

Fetch geometry type of this field.

This method is the same as the C function OGR_GFld_GetType().

Returns
field geometry type.
Since
GDAL 1.11

Referenced by OGRFeatureDefn::GetGeomType(), OGRUnionLayer::GetLayerDefn(), IsSame(), OGRGeomFieldDefn(), and OGRGenSQLResultsLayer::TestCapability().

int OGRGeomFieldDefn::IsIgnored ( )
inline

Return whether this field should be omitted when fetching features.

This method is the same as the C function OGR_GFld_IsIgnored().

Returns
ignore state
Since
GDAL 1.11

Referenced by OGRFeatureDefn::IsGeometryIgnored().

int OGRGeomFieldDefn::IsSame ( OGRGeomFieldDefn poOtherFieldDefn)

Test if the geometry field definition is identical to the other one.

Parameters
poOtherFieldDefnthe other field definition to compare to.
Returns
TRUE if the geometry field definition is identical to the other one.
Since
GDAL 1.11

References GetNameRef(), GetSpatialRef(), GetType(), and OGRSpatialReference::IsSame().

Referenced by OGRFeatureDefn::IsSame().

void OGRGeomFieldDefn::SetIgnored ( int  ignore)
inline

Set whether this field should be omitted when fetching features.

This method is the same as the C function OGR_GFld_SetIgnored().

Parameters
ignoreignore state
Since
GDAL 1.11

Referenced by OGRFeatureDefn::SetGeometryIgnored(), and OGRLayer::SetIgnoredFields().

void OGRGeomFieldDefn::SetName ( const char *  pszNameIn)

Reset the name of this field.

This method is the same as the C function OGR_GFld_SetName().

Parameters
pszNameInthe new name to apply.
Since
GDAL 1.11

References CPLStrdup().

void OGRGeomFieldDefn::SetSpatialRef ( OGRSpatialReference poSRSIn)

Set the spatial reference of this field.

This method is the same as the C function OGR_GFld_SetSpatialRef().

This method drops the reference of the previously set SRS object and acquires a new reference on the passed object (if non-NULL).

Parameters
poSRSInthe new SRS to apply.
Since
GDAL 1.11

References OGRSpatialReference::Reference(), and OGRSpatialReference::Release().

Referenced by OGRUnionLayer::GetLayerDefn(), and OGRGeomFieldDefn().

void OGRGeomFieldDefn::SetType ( OGRwkbGeometryType  eType)

Set the geometry type of this field. This should never be done to an OGRGeomFieldDefn that is already part of an OGRFeatureDefn.

This method is the same as the C function OGR_GFld_SetType().

Parameters
eTypethe new field geometry type.
Since
GDAL 1.11

Referenced by OGRUnionLayer::GetLayerDefn(), and OGRFeatureDefn::SetGeomType().


The documentation for this class was generated from the following files:

Generated for GDAL by doxygen 1.8.11.