GeometryCollection
This class represents a collection of geometry objects and provides functionality to manage them as a single geometric entity. It supports initialization from sequences of geometries, iteration over its members, and coordinate access via properties. The class also provides compatibility for list-like operations and KML representation of the entire collection.
Attributes
| Attribute | Type | Description |
|---|---|---|
| coords | tuple | Alias that returns a tuple of all coordinates for every geometry contained within this collection. |
Constructor
Signature
def GeometryCollection(
*args: any,
**kwargs: any
)
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | A sequence of Geometry objects, or a single list/tuple containing Geometry objects. |
| **kwargs | any | Keyword arguments passed to the GEOSGeometry parent constructor. |
Methods
kml()
@classmethod
def kml() - > string
Return the KML for this Geometry Collection.
Returns
| Type | Description |
|---|---|
string | A KML string representation of the collection wrapped in MultiGeometry tags |
tuple()
@classmethod
def tuple() - > tuple
Return a tuple of all the coordinates in this Geometry Collection
Returns
| Type | Description |
|---|---|
tuple | A nested tuple containing the coordinate data for every geometry in the collection |