Class: QgsGeometryConstPartIterator

Java-style iterator for const traversal of parts of a geometry.

Added in version 3.6.

Methods

hasNext

Find out whether there are more parts

next

Returns next part of the geometry (undefined behavior if hasNext() returns False before calling next())

class qgis.core.QgsGeometryConstPartIterator[source]

Bases: object

__init__()
__init__(geometry: QgsAbstractGeometry | None)

Constructs iterator for the given geometry

Parameters:

geometry (Optional[QgsAbstractGeometry])

__init__(a0: QgsGeometryConstPartIterator)
Parameters:

a0 (QgsGeometryConstPartIterator)

hasNext(self) bool[source]

Find out whether there are more parts

Return type:

bool

next(self) QgsAbstractGeometry | None[source]

Returns next part of the geometry (undefined behavior if hasNext() returns False before calling next())

Return type:

Optional[QgsAbstractGeometry]