class documentation

class Feature(GDALBase):

View In Hierarchy

This class that wraps an OGR Feature, needs to be instantiated from a Layer object.
Method __eq__ Do equivalence testing on the features.
Method __getitem__ No summary
Method __init__ Initialize Feature from a pointer and its Layer object.
Method __len__ Return the count of fields in this feature.
Method __str__ The string name of the feature.
Method get Return the value of the field, instead of an instance of the Field object. May take a string of the field name or a Field object as parameters.
Method index Return the index of the given field name.
Instance Variable ​_layer Undocumented
Instance Variable ptr Undocumented
Property encoding Undocumented
Property fid Return the feature identifier.
Property fields Return a list of fields in the Feature.
Property geom Return the OGR Geometry for this Feature.
Property geom​_type Return the OGR Geometry Type for this Feature.
Property layer​_name Return the name of the layer for the feature.
Property num​_fields Return the number of fields in the Feature.

Inherited from CPointerBase (via GDALBase):

Method __del__ Free the memory used by the C++ object.
Method ptr.setter Undocumented
Class Variable destructor Undocumented
Instance Variable ​_ptr Undocumented
def __eq__(self, other):
Do equivalence testing on the features.
def __getitem__(self, index):
Get the Field object at the specified index, which may be either an integer or the Field's string label. Note that the Field object is not the field's _value_ -- use the get method instead to retrieve the value (e.g. an integer) instead of a Field instance.
def __init__(self, feat, layer):
Initialize Feature from a pointer and its Layer object.
def __len__(self):
Return the count of fields in this feature.
def __str__(self):
The string name of the feature.
def get(self, field):
Return the value of the field, instead of an instance of the Field object. May take a string of the field name or a Field object as parameters.
def index(self, field_name):
Return the index of the given field name.
_layer =

Undocumented

ptr =
@property
encoding =

Undocumented

@property
fid =
Return the feature identifier.
@property
fields =
Return a list of fields in the Feature.
@property
geom =
Return the OGR Geometry for this Feature.
@property
geom_type =
Return the OGR Geometry Type for this Feature.
@property
layer_name =
Return the name of the layer for the feature.
@property
num_fields =
Return the number of fields in the Feature.