class Layer(GDALBase):
Method | __getitem__ |
Get the Feature at the specified index. |
Method | __init__ |
No summary |
Method | __iter__ |
Iterate over each Feature in the Layer. |
Method | __len__ |
The length is the number of features. |
Method | __str__ |
The string name of the layer. |
Method | _get_spatial_filter |
Undocumented |
Method | _make_feature |
No summary |
Method | _set_spatial_filter |
Undocumented |
Method | get_fields |
Return a list containing the given field name for every Feature in the Layer. |
Method | get_geoms |
Return a list containing the OGRGeometry for every Feature in the Layer. |
Method | test_capability |
No summary |
Class Variable | spatial_filter |
Undocumented |
Instance Variable | _ds |
Undocumented |
Instance Variable | _ldefn |
Undocumented |
Instance Variable | _random_read |
Undocumented |
Instance Variable | ptr |
Undocumented |
Property | extent |
Return the extent (an Envelope) of this layer. |
Property | field_precisions |
Return the field precisions for the features. |
Property | field_types |
Return a list of the types of fields in this Layer. For example, return the list [OFTInteger, OFTReal, OFTString] for an OGR layer that has an integer, a floating-point, and string fields. |
Property | field_widths |
Return a list of the maximum field widths for the features. |
Property | fields |
Return a list of string names corresponding to each of the Fields available in this Layer. |
Property | geom_type |
Return the geometry type (OGRGeomType) of the Layer. |
Property | name |
Return the name of this layer in the Data Source. |
Property | num_feat |
Return the number of features in the Layer. |
Property | num_fields |
Return the number of fields in the Layer. |
Property | srs |
Return the Spatial Reference used in this Layer. |
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 |
DataSource
object
that owns this layer. The DataSource
object is required so that a
reference to it is kept with this Layer. This prevents garbage
collection of the DataSource
while this Layer is still active.Return a bool indicating whether the this Layer supports the given capability (a string). Valid capability strings include:
'RandomRead', 'SequentialWrite', 'RandomWrite', 'FastSpatialFilter', 'FastFeatureCount', 'FastGetExtent', 'CreateField', 'Transactions', 'DeleteFeature', and 'FastSetNextByIndex'.