gis.geos.GEOSGeometry.clone()

GEOSGeometry.clone() This method returns a GEOSGeometry that is a clone of the original.

gis.geos.GEOSGeometry.contains()

GEOSGeometry.contains(other) Returns True if other.within(this) returns True.

gis.geos.GEOSGeometry.boundary

GEOSGeometry.boundary Returns the boundary as a newly allocated Geometry object.

gis.geos.GEOSGeometry.buffer()

GEOSGeometry.buffer(width, quadsegs=8) Returns a GEOSGeometry that represents all points whose distance from this geometry is less than or equal to the given width. The optional quadsegs keyword sets the number of segments used to approximate a quarter circle (defaults is 8).

gis.geos.GEOSGeometry.centroid

GEOSGeometry.centroid Returns a Point object representing the geometric center of the geometry. The point is not guaranteed to be on the interior of the geometry.

gis.geoip2.GeoIP2.lon_lat()

GeoIP2.lon_lat(query) Returns a coordinate tuple of (longitude, latitude).

gis.geos.fromstr()

fromstr(string, srid=None) Parameters: string (string) – string that contains spatial data srid (int) – spatial reference identifier Return type: a GEOSGeometry corresponding to the spatial data in the string fromstr(string, srid) is equivalent to GEOSGeometry(string, srid). Example: >>> from django.contrib.gis.geos import fromstr >>> pnt = fromstr('POINT(-90.5 29.5)', srid=4326)

gis.geos.fromfile()

fromfile(file_h) Parameters: file_h (a Python file object or a string path to the file) – input file that contains spatial data Return type: a GEOSGeometry corresponding to the spatial data in the file Example: >>> from django.contrib.gis.geos import fromfile >>> g = fromfile('/home/bob/geom.wkt')

gis.geos.GEOSGeometry

class GEOSGeometry(geo_input, srid=None) Parameters: geo_input – Geometry input value (string or buffer) srid (int) – spatial reference identifier This is the base class for all GEOS geometry objects. It initializes on the given geo_input argument, and then assumes the proper geometry subclass (e.g., GEOSGeometry('POINT(1 1)') will create a Point object). The following input formats, along with their corresponding Python types, are accepted: Format Input Type WKT / EWKT str or unicode

gis.geos.GEOSGeometry.area

GEOSGeometry.area This property returns the area of the Geometry.