Class: QgsMultiPolygon¶
Multi polygon geometry collection.
Class Hierarchy¶
Base classes¶
Multi surface geometry collection. |
|
Geometry collection. |
|
Abstract base class for all geometries. |
Abstract Methods
Returns the geometry converted to the more generic curve type |
Methods
Returns the polygon with the specified index. |
- class qgis.core.QgsMultiPolygon[source]¶
Bases:
QgsMultiSurface
- __init__()
Constructor for an empty multipolygon geometry.
- __init__(polygons: Iterable[QgsPolygon])
Constructor for a multipolygon containing the specified
polygons
.The
polygons
will be internally cloned.Added in version 3.38.
- Parameters:
polygons (Iterable[QgsPolygon])
- __init__(polygons: Iterable[QgsPolygon])
Constructor for a multipolygon containing the specified
polygons
.Ownership of the
polygons
will be transferred to the multipolygon.Added in version 3.38.
- Parameters:
polygons (Iterable[QgsPolygon])
- __init__(a0: QgsMultiPolygon)
- Parameters:
a0 (QgsMultiPolygon)
- polygonN(self, index: int) QgsPolygon [source]¶
Returns the polygon with the specified
index
.- Raises:
IndexError – if no polygon with the specified index exists.
Added in version 3.16.
- Parameters:
index (int)
- Return type:
- abstract toCurveType(self) QgsMultiSurface | None [source]¶
Returns the geometry converted to the more generic curve type
QgsMultiSurface
- Return type:
Optional[QgsMultiSurface]
- Returns:
the converted geometry. Caller takes ownership