|
OGR
|
#include <ogr_feature.h>
Public Member Functions | |
| OGRGeomFieldDefn (const char *pszNameIn, OGRwkbGeometryType eGeomTypeIn) | |
| Constructor. More... | |
| OGRGeomFieldDefn (const OGRGeomFieldDefn *) | |
| Constructor. More... | |
| void | SetName (const char *) |
| Reset the name of this field. More... | |
| const char * | GetNameRef () const |
| Fetch name of this field. More... | |
| OGRwkbGeometryType | GetType () const |
| 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 OGRSpatialReference * | GetSpatialRef () const |
| Fetch spatial reference system of this field. More... | |
| void | SetSpatialRef (OGRSpatialReference *poSRSIn) |
| Set the spatial reference of this field. More... | |
| int | IsIgnored () const |
| Return whether this field should be omitted when fetching features. More... | |
| void | SetIgnored (int bIgnoreIn) |
| Set whether this field should be omitted when fetching features. More... | |
| int | IsNullable () const |
| Return whether this geometry field can receive null values. More... | |
| void | SetNullable (int bNullableIn) |
| Set whether this geometry field can receive null values. More... | |
| int | IsSame (const OGRGeomFieldDefn *) const |
| Test if the geometry field definition is identical to the other one. More... | |
Static Public Member Functions | |
| static OGRGeomFieldDefnH | ToHandle (OGRGeomFieldDefn *poGeomFieldDefn) |
| static OGRGeomFieldDefn * | FromHandle (OGRGeomFieldDefnH hGeomFieldDefn) |
Definition of a geometry field of an OGRFeatureDefn. A geometry field is described by :
| OGRGeomFieldDefn::OGRGeomFieldDefn | ( | const char * | pszNameIn, |
| OGRwkbGeometryType | eGeomTypeIn | ||
| ) |
Constructor.
| pszNameIn | the name of the new field. |
| eGeomTypeIn | the type of the new field. |
|
explicit |
Constructor.
Create by cloning an existing geometry field definition.
| poPrototype | the geometry field definition to clone. |
References OGRSpatialReference::Clone(), GetNameRef(), GetSpatialRef(), GetType(), IsNullable(), SetNullable(), and SetSpatialRef().
|
inlinestatic |
Convert a OGRGeomFieldDefnH to a OGRGeomFieldDefn*.
Referenced by OGR_FD_AddGeomFieldDefn(), OGR_GFld_Destroy(), OGR_GFld_GetNameRef(), OGR_GFld_GetSpatialRef(), OGR_GFld_GetType(), OGR_GFld_IsIgnored(), OGR_GFld_IsNullable(), OGR_GFld_SetIgnored(), OGR_GFld_SetName(), OGR_GFld_SetNullable(), OGR_GFld_SetSpatialRef(), OGR_GFld_SetType(), and OGR_L_CreateGeomField().
|
inline |
Fetch name of this field.
This method is the same as the C function OGR_GFld_GetNameRef().
Referenced by OGRFeature::DumpReadable(), OGRLayer::GetGeometryColumn(), OGRFeatureDefn::GetGeomFieldIndex(), IsSame(), OGR_GFld_GetNameRef(), OGRGeomFieldDefn(), and OGRFeature::SetFrom().
|
virtual |
Fetch spatial reference system of this field.
This method is the same as the C function OGR_GFld_GetSpatialRef().
Referenced by OGRLayer::GetSpatialRef(), IsSame(), OGR_GFld_GetSpatialRef(), and OGRGeomFieldDefn().
|
inline |
Fetch geometry type of this field.
This method is the same as the C function OGR_GFld_GetType().
Referenced by OGRFeatureDefn::GetGeomType(), IsSame(), OGR_GFld_GetType(), and OGRGeomFieldDefn().
|
inline |
Return whether this field should be omitted when fetching features.
This method is the same as the C function OGR_GFld_IsIgnored().
Referenced by OGRFeatureDefn::IsGeometryIgnored(), and OGR_GFld_IsIgnored().
|
inline |
Return whether this geometry field can receive null values.
By default, fields are nullable.
Even if this method returns FALSE (i.e not-nullable field), it doesn't mean that OGRFeature::IsFieldSet() will necessary return TRUE, as fields can be temporary unset and null/not-null validation is usually done when OGRLayer::CreateFeature()/SetFeature() is called.
Note that not-nullable geometry fields might also contain 'empty' geometries.
This method is the same as the C function OGR_GFld_IsNullable().
Referenced by IsSame(), OGR_GFld_IsNullable(), OGRGeomFieldDefn(), and OGRFeature::Validate().
| int OGRGeomFieldDefn::IsSame | ( | const OGRGeomFieldDefn * | poOtherFieldDefn | ) | const |
Test if the geometry field definition is identical to the other one.
| poOtherFieldDefn | the other field definition to compare to. |
References GetNameRef(), GetSpatialRef(), GetType(), IsNullable(), and OGRSpatialReference::IsSame().
Referenced by OGRFeatureDefn::IsSame().
|
inline |
Set whether this field should be omitted when fetching features.
This method is the same as the C function OGR_GFld_SetIgnored().
| ignore | ignore state |
Referenced by OGR_GFld_SetIgnored(), 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().
| pszNameIn | the new name to apply. |
References CPLFree, and CPLStrdup().
Referenced by OGR_GFld_SetName().
|
inline |
Set whether this geometry field can receive null values.
By default, fields are nullable, so this method is generally called with FALSE to set a not-null constraint.
Drivers that support writing not-null constraint will advertize the GDAL_DCAP_NOTNULL_GEOMFIELDS driver metadata item.
This method is the same as the C function OGR_GFld_SetNullable().
| bNullableIn | FALSE if the field must have a not-null constraint. |
Referenced by OGR_GFld_SetNullable(), and OGRGeomFieldDefn().
| 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).
| poSRSIn | the new SRS to apply. |
References OGRSpatialReference::Reference().
Referenced by OGRGeomFieldDefn().
| void OGRGeomFieldDefn::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.
This method is the same as the C function OGR_GFld_SetType().
| eTypeIn | the new field geometry type. |
Referenced by OGR_GFld_SetType(), and OGRFeatureDefn::SetGeomType().
|
inlinestatic |
Convert a OGRGeomFieldDefn* to a OGRGeomFieldDefnH.
Referenced by OGR_F_GetGeomFieldDefnRef(), OGR_FD_GetGeomFieldDefn(), and OGR_GFld_Create().
1.8.14.