gis.geos.GeometryCollection

class GeometryCollection(*args, **kwargs)

GeometryCollection objects may be instantiated by passing in other GEOSGeometry as arguments, or a single sequence of GEOSGeometry objects:

>>> poly = Polygon( ((0, 0), (0, 1), (1, 1), (0, 0)) )
>>> gc = GeometryCollection(Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly)
>>> gc = GeometryCollection((Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly))
Changed in Django 1.10:

In previous versions, an empty GeometryCollection couldn’t be instantiated.

doc_Django
2016-10-09 18:38:16
Comments
Leave a Comment

Please login to continue.