gis.forms.GeometryField

class GeometryField

gis.forms.GeometryCollectionField

class GeometryCollectionField

gis.forms.Field.srid

Field.srid This is the SRID code that the field value should be transformed to. For example, if the map widget SRID is different from the SRID more generally used by your application or database, the field will automatically convert input values into that SRID.

gis.forms.Field.geom_type

Field.geom_type You generally shouldn’t have to set or change that attribute which should be setup depending on the field class. It matches the OpenGIS standard geometry name.

gis.feeds.W3CGeoFeed

class W3CGeoFeed [source] Note W3C Geo formatted feeds only support PointField geometries.

gis.feeds.GeoRSSFeed

class GeoRSSFeed [source]

gis.feeds.GeoAtom1Feed

class GeoAtom1Feed [source]

gis.feeds.Feed.item_geometry()

item_geometry(item) Set this to return the geometry for each item in the feed. This can be a GEOSGeometry instance, or a tuple that represents a point coordinate or bounding box. For example: class ZipcodeFeed(Feed): def item_geometry(self, obj): # Returns the polygon. return obj.poly

gis.feeds.Feed.geometry()

geometry(obj) Takes the object returned by get_object() and returns the feed’s geometry. Typically this is a GEOSGeometry instance, or can be a tuple to represent a point or a box. For example: class ZipcodeFeed(Feed): def geometry(self, obj): # Can also return: `obj.poly`, and `obj.poly.centroid`. return obj.poly.extent # tuple like: (X0, Y0, X1, Y1).

gis.feeds.Feed

class Feed [source] In addition to methods provided by the django.contrib.syndication.views.Feed base class, GeoDjango’s Feed class provides the following overrides. Note that these overrides may be done in multiple ways: from django.contrib.gis.feeds import Feed class MyFeed(Feed): # First, as a class attribute. geometry = ... item_geometry = ... # Also a function with no arguments def geometry(self): ... def item_geometry(self): ... # And as