gis.gdal.Layer.num_feat

num_feat Returns the number of features in the layer. Same as len(layer): >>> layer.num_feat 3

gis.gdal.Layer.name

name Returns the name of this layer in the data source. >>> layer.name 'cities'

gis.gdal.Layer.field_precisions

field_precisions Returns a list of the numeric precisions for each of the fields in this layer. This is meaningless (and set to zero) for non-numeric fields: >>> layer.field_precisions [0, 0, 15, 0]

gis.gdal.Layer.extent

extent Returns the spatial extent of this layer, as an Envelope object: >>> layer.extent.tuple (-104.609252, 29.763374, -95.23506, 38.971823)

gis.gdal.Layer.field_widths

field_widths Returns a list of the maximum field widths for each of the fields in this layer: >>> layer.field_widths [80, 11, 24, 10]

gis.gdal.Layer.geom_type

geom_type Returns the geometry type of the layer, as an OGRGeomType object: >>> layer.geom_type.name 'Point'

gis.gdal.Layer.fields

fields Returns a list of the names of each of the fields in this layer: >>> layer.fields ['Name', 'Population', 'Density', 'Created'] Returns a list of the data types of each of the fields in this layer. These are subclasses of Field, discussed below: >>> [ft.__name__ for ft in layer.field_types] ['OFTString', 'OFTReal', 'OFTReal', 'OFTDate']

gis.gdal.GDALRaster.warp()

warp(ds_input, resampling='NearestNeighbour', max_error=0.0) New in Django 1.9. Returns a warped version of this raster. The warping parameters can be specified through the ds_input argument. The use of ds_input is analogous to the corresponding argument of the class constructor. It is a dictionary with the characteristics of the target raster. Allowed dictionary key values are width, height, SRID, origin, scale, skew, datatype, driver, and name (filename). By default, the warp functions k

gis.gdal.GeometryCollection.add()

add(geom) Adds a geometry to this geometry collection. Not applicable to other geometry types.

gis.gdal.Layer

class Layer Layer is a wrapper for a layer of data in a DataSource object. You never create a Layer object directly. Instead, you retrieve them from a DataSource object, which is essentially a standard Python container of Layer objects. For example, you can access a specific layer by its index (e.g. ds[0] to access the first layer), or you can iterate over all the layers in the container in a for loop. The Layer itself acts as a container for geometric features. Typically, all the features i