gis.gdal.OGRGeometry.boundary()

boundary() The boundary of this geometry, as a new OGRGeometry object.

gis.gdal.LineString.y

y Returns a list of Y coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').y [2.0, 4.0]

gis.gdal.LineString

class LineString x Returns a list of X coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').x [1.0, 3.0] y Returns a list of Y coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').y [2.0, 4.0] z Returns a list of Z coordinates in this line, or None if the line does not have Z coordinates: >>> OGRGeometry('LINESTRING (1 2 3,4 5 6)').z [3.0, 6.0]

gis.gdal.Layer.srs

srs Property that returns the SpatialReference associated with this layer: >>> print(layer.srs) GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]] If the Layer has no spatial reference information associated with it, None is returned.

gis.gdal.LineString.x

x Returns a list of X coordinates in this line: >>> OGRGeometry('LINESTRING (1 2,3 4)').x [1.0, 3.0]

gis.gdal.Layer.test_capability()

test_capability(capability) Returns a boolean indicating whether this layer supports the given capability (a string). Examples of valid capability strings include: 'RandomRead', 'SequentialWrite', 'RandomWrite', 'FastSpatialFilter', 'FastFeatureCount', 'FastGetExtent', 'CreateField', 'Transactions', 'DeleteFeature', and 'FastSetNextByIndex'.

gis.gdal.Layer.spatial_filter

spatial_filter Property that may be used to retrieve or set a spatial filter for this layer. A spatial filter can only be set with an OGRGeometry instance, a 4-tuple extent, or None. When set with something other than None, only features that intersect the filter will be returned when iterating over the layer: >>> print(layer.spatial_filter) None >>> print(len(layer)) 3 >>> [feat.get('Name') for feat in layer] ['Pueblo', 'Lawrence', 'Houston'] >>> ks_exten

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.get_geoms()

get_geoms(geos=False) A method that returns a list containing the geometry of each feature in the layer. If the optional argument geos is set to True then the geometries are converted to GEOSGeometry objects. Otherwise, they are returned as OGRGeometry objects: >>> [pt.tuple for pt in layer.get_geoms()] [(-104.609252, 38.255001), (-95.23506, 38.971823), (-95.363151, 29.763374)]

gis.gdal.Layer.num_fields

num_fields Returns the number of fields in the layer, i.e the number of fields of data associated with each feature in the layer: >>> layer.num_fields 4