Class: QgsSurface¶
- class qgis.core.QgsSurface¶
Bases:
QgsAbstractGeometry
Surface geometry type.
Methods
- rtype
QgsRectangle
Default calculator for the minimal bounding box for the geometry.
Returns number of child geometries (for geometries with child geometries) or child points (for geometries without child geometries - i.e. curve / point).
Returns pointer to child geometry (for geometries with child geometries - i.e. geom.
Returns point at index (for geometries without child geometries - i.e. curve / point).
Returns whether the geometry has any child geometries (
False
for point / curve,True
otherwise)- param flags
Updates the geometry type based on whether sub geometries contain z or m values.
Gets a polygon representation of this surface.
- boundingBox(self) → QgsRectangle¶
- Return type
- 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