#include <ogr_feature.h>
Public Member Functions | |
OGRFeatureDefn (const char *pszName=NULL) | |
const char * | GetName () |
int | GetFieldCount () |
OGRFieldDefn * | GetFieldDefn (int i) |
int | GetFieldIndex (const char *) |
void | AddFieldDefn (OGRFieldDefn *) |
OGRwkbGeometryType | GetGeomType () |
void | SetGeomType (OGRwkbGeometryType) |
OGRFeatureDefn * | Clone () |
int | Reference () |
int | Dereference () |
int | GetReferenceCount () |
This object contains schema information for a set of OGRFeatures. In table based systems, an OGRFeatureDefn is essentially a layer. In more object oriented approaches (such as SF CORBA) this can represent a class of features but doesn't necessarily relate to all of a layer, or just one layer.
This object also can contain some other information such as a name, the base geometry type and potentially other metadata.
It is reasonable for different translators to derive classes from OGRFeatureDefn with additional translator specific information.
|
Constructor The OGRFeatureDefn maintains a reference count, but this starts at zero. It is mainly intended to represent a count of OGRFeature's based on this definition. This method is the same as the C function OGR_FD_Create().
|
|
Add a new field definition. This method should only be called while there are no OGRFeature objects in existance based on this OGRFeatureDefn. The OGRFieldDefn passed in is copied, and remains the responsibility of the caller. This method is the same as the C function OGR_FD_AddFieldDefn().
|
|
Create a copy of this feature definition. Creates a deep copy of the feature definition.
|
|
Decrements the reference count by one. This method is the same as the C function OGR_FD_Dereference().
|
|
Fetch number of fields on this feature. This method is the same as the C function OGR_FD_GetFieldCount().
|
|
Fetch field definition. This method is the same as the C function OGR_FD_GetFieldDefn().
|
|
Find field by name. The field index of the first field matching the passed field name (case insensitively) is returned. This method is the same as the C function OGR_FD_GetFieldIndex().
|
|
Fetch the geometry base type. Note that some drivers are unable to determine a specific geometry type for a layer, in which case wkbUnknown is returned. A value of wkbNone indicates no geometry is available for the layer at all. Many drivers do not properly mark the geometry type as 25D even if some or all geometries are in fact 25D. A few (broken) drivers return wkbPolygon for layers that also include wkbMultiPolygon. This method is the same as the C function OGR_FD_GetGeomType().
|
|
Get name of this OGRFeatureDefn. This method is the same as the C function OGR_FD_GetName().
|
|
Fetch current reference count. This method is the same as the C function OGR_FD_GetReferenceCount().
|
|
Increments the reference count by one. The reference count is used keep track of the number of OGRFeature objects referencing this definition. This method is the same as the C function OGR_FD_Reference().
|
|
Assign the base geometry type for this layer. All geometry objects using this type must be of the defined type or a derived type. The default upon creation is wkbUnknown which allows for any geometry type. The geometry type should generally not be changed after any OGRFeatures have been created against this definition. This method is the same as the C function OGR_FD_SetGeomType().
|