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

gis.db.models.Union

class Union(geo_field) Availability: PostGIS, Oracle, SpatiaLite This method returns a GEOSGeometry object comprising the union of every geometry in the queryset. Please note that use of Union is processor intensive and may take a significant amount of time on large querysets. Note If the computation time for using this method is too expensive, consider using Collect instead. Example: >>> u = Zipcode.objects.aggregate(Union(poly)) # This may take a long time. >>> u = Zip

gis.db.models.PolygonField

class PolygonField

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.db.models.MultiLineStringField

class MultiLineStringField

gis.db.models.GeoQuerySet.union()

GeoQuerySet.union(geom) Deprecated since version 1.9: Use the Union function instead. Returns the union of the geographic field with the given geometry in an union attribute on each element of the GeoQuerySet.

gis.db.models.LineStringField

class LineStringField

gis.db.models.MakeLine

class MakeLine(geo_field) Availability: PostGIS, SpatiaLite Returns a LineString constructed from the point field geometries in the QuerySet. Currently, ordering the queryset has no effect. Changed in Django 1.10: SpatiaLite support was added. Example: >>> qs = City.objects.filter(name__in=('Houston', 'Dallas')).aggregate(MakeLine('poly')) >>> print(qs['poly__makeline']) LINESTRING (-95.3631510000000020 29.7633739999999989, -96.8016109999999941 32.7820570000000018)

gis.db.models.MultiPointField

class MultiPointField

gis.db.models.MultiPolygonField

class MultiPolygonField