gis.db.models.GeoQuerySet.distance()

GeoQuerySet.distance(geom, **kwargs) Deprecated since version 1.9: Use the Distance function instead. This method takes a geometry as a parameter, and attaches a distance attribute to every model in the returned queryset that contains the distance (as a Distance object) to the given geometry. In the following example (taken from the GeoDjango distance tests), the distance from the Tasmanian city of Hobart to every other PointField in the AustraliaCity queryset is calculated: >>> p

gis.db.models.GeoQuerySet.difference()

GeoQuerySet.difference(geom) Deprecated since version 1.9: Use the Difference function instead. Returns the spatial difference of the geographic field with the given geometry in a difference attribute on each element of the GeoQuerySet.

gis.db.models.GeoQuerySet.centroid()

GeoQuerySet.centroid(**kwargs) Deprecated since version 1.9: Use the Centroid function instead. Availability: PostGIS, Oracle, SpatiaLite Returns the centroid value for the geographic field in a centroid attribute on each element of the GeoQuerySet.

gis.db.models.GeoQuerySet.area()

GeoQuerySet.area(**kwargs) Deprecated since version 1.9: Use the Area function instead. Returns the area of the geographic field in an area attribute on each element of this GeoQuerySet.

gis.db.models.GeoQuerySet

class GeoQuerySet(model=None)

gis.db.models.GeometryField.geography

GeometryField.geography If set to True, this option will create a database column of type geography, rather than geometry. Please refer to the geography type section below for more details. Note Geography support is limited to PostGIS and will force the SRID to be 4326.

gis.db.models.GeometryField.dim

GeometryField.dim This option may be used for customizing the coordinate dimension of the geometry field. By default, it is set to 2, for representing two-dimensional geometries. For spatial backends that support it, it may be set to 3 for three-dimensional support. Note At this time 3D support is limited to the PostGIS spatial backend.

gis.db.models.GeometryField

class GeometryField

gis.db.models.GeometryCollectionField

class GeometryCollectionField

gis.db.models.GeoManager

class GeoManager The GeoManager is required in order to use the legacy GeoQuerySet Methods. Deprecated since version 1.9: All GeoQuerySet methods have been deprecated and replaced by equivalent database functions. As soon as the legacy methods have been replaced in your code, you should be able to remove the special GeoManager from your GIS-enabled classes. Changed in Django 1.9: In older versions, the manager was required to conduct geographic queries. Without it, all geographic filters