Class: QgsGeometryPartIterator

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

Added in version 3.6.

class qgis.core.QgsGeometryPartIterator[source]

Bases: object

__init__()
__init__(geometry: QgsAbstractGeometry | None)

Constructs iterator for the given geometry

Parameters:

geometry (Optional[QgsAbstractGeometry])

__init__(a0: QgsGeometryPartIterator)
Parameters:

a0 (QgsGeometryPartIterator)

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]