Class: QgsSurface

class qgis.core.QgsSurface

Bases: QgsAbstractGeometry

Surface geometry type.

Methods

boundingBox

rtype

QgsRectangle

calculateBoundingBox

Default calculator for the minimal bounding box for the geometry.

childCount

Returns number of child geometries (for geometries with child geometries) or child points (for geometries without child geometries - i.e. curve / point).

childGeometry

Returns pointer to child geometry (for geometries with child geometries - i.e. geom.

childPoint

Returns point at index (for geometries without child geometries - i.e. curve / point).

clearCache

hasChildGeometries

Returns whether the geometry has any child geometries (False for point / curve, True otherwise)

isValid

param flags

setZMTypeFromSubGeometry

Updates the geometry type based on whether sub geometries contain z or m values.

surfaceToPolygon

Gets a polygon representation of this surface.

boundingBox(self)QgsRectangle
Return type

QgsRectangle

calculateBoundingBox(self)QgsRectangle

Default calculator for the minimal bounding box for the geometry. Derived classes should override this method if a more efficient bounding box calculation is available.

childCount(self)int

Returns number of child geometries (for geometries with child geometries) or child points (for geometries without child geometries - i.e. curve / point)

Note

used for vertex_iterator implementation

New in version 3.0.

childGeometry(self, index: int)QgsAbstractGeometry

Returns pointer to child geometry (for geometries with child geometries - i.e. geom. collection / polygon)

Note

used for vertex_iterator implementation

New in version 3.0.

childPoint(self, index: int)QgsPoint

Returns point at index (for geometries without child geometries - i.e. curve / point)

Note

used for vertex_iterator implementation

New in version 3.0.

clearCache(self)
hasChildGeometries(self)bool

Returns whether the geometry has any child geometries (False for point / curve, True otherwise)

Note

used for vertex_iterator implementation

New in version 3.0.

isValid(self, flags: int = 0)Tuple[bool, str]
Parameters

flags (int = 0) –

Return type

Tuple[bool, str]

setZMTypeFromSubGeometry(self, subggeom: QgsAbstractGeometry, baseGeomType: QgsWkbTypes.Type)

Updates the geometry type based on whether sub geometries contain z or m values.

surfaceToPolygon(self)QgsPolygon

Gets a polygon representation of this surface. Ownership is transferred to the caller.

Return type

QgsPolygon