Class: QgsPolygon¶
-
class
qgis.core.
QgsPolygon
¶ Bases:
qgis._core.QgsCurvePolygon
Polygon geometry type.
New in version 2.10: Enums
Methods
Returns the distance from a point to the boundary of the polygon (either the exterior ring or any closer interior rings).
Returns the geometry converted to the more generic curve type
QgsCurvePolygon
Signals
Attributes
-
addInteriorRing
(self, ring: QgsCurve)¶
-
asWkb
(self) → QByteArray¶
-
boundary
(self) → QgsAbstractGeometry¶
-
calculateBoundingBox
()¶
-
childCount
()¶
-
childGeometry
()¶
-
childPoint
()¶
-
clear
(self)¶
-
clearCache
()¶
-
clone
(self) → QgsPolygon¶
-
createEmptyWithSameType
(self) → QgsPolygon¶
-
fromWkb
(self, wkb: QgsConstWkbPtr) → bool¶
-
geometryType
(self) → str¶
-
hasChildGeometries
()¶
-
pointDistanceToBoundary
(self, x: float, y: float) → float¶ Returns the distance from a point to the boundary of the polygon (either the exterior ring or any closer interior rings). The returned distance will be negative if the point lies outside the polygon.
New in version 3.0.
-
setExteriorRing
(self, ring: QgsCurve)¶
-
setZMTypeFromSubGeometry
()¶
-
surfaceToPolygon
(self) → QgsPolygon¶
-
toCurveType
(self) → QgsCurvePolygon¶ Returns the geometry converted to the more generic curve type
QgsCurvePolygon
- Returns
the converted geometry. Caller takes ownership*
-