gis.gdal.Point.x

x Returns the X coordinate of this point: >>> OGRGeometry('POINT (1 2)').x 1.0

gis.gdal.OGRGeomType.num

num Returns the number corresponding to the OGR geometry type: >>> gt1.num 3

gis.gdal.OGRGeometry.__len__()

__len__() Returns the number of points in a LineString, the number of rings in a Polygon, or the number of geometries in a GeometryCollection. Not applicable to other geometry types.

gis.gdal.OGRGeomType.name

name Returns a short-hand string form of the OGR Geometry type: >>> gt1.name 'Polygon'

gis.gdal.OGRGeomType

class OGRGeomType(type_input) This class allows for the representation of an OGR geometry type in any of several ways: >>> from django.contrib.gis.gdal import OGRGeomType >>> gt1 = OGRGeomType(3) # Using an integer for the type >>> gt2 = OGRGeomType('Polygon') # Using a string >>> gt3 = OGRGeomType('POLYGON') # It's case-insensitive >>> print(gt1 == 3, gt1 == 'Polygon') # Equivalence works w/non-OGRGeomType objects True True

gis.gdal.OGRGeomType.django

django Returns the Django field type (a subclass of GeometryField) to use for storing this OGR type, or None if there is no appropriate Django type: >>> gt1.django 'PolygonField'

gis.gdal.OGRGeometry.wkb_size

wkb_size Returns the size of the WKB buffer needed to hold a WKB representation of this geometry: >>> OGRGeometry('POINT(1 2)').wkb_size 21

gis.gdal.OGRGeometry.wkb

wkb Returns a buffer containing a WKB representation of this geometry.

gis.gdal.OGRGeometry.wkt

wkt Returns a string representation of this geometry in WKT format.

gis.gdal.OGRGeometry.__getitem__()

__getitem__() Returns the point at the specified index for a LineString, the interior ring at the specified index for a Polygon, or the geometry at the specified index in a GeometryCollection. Not applicable to other geometry types.