Class: QgsGeometryPartIterator

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

Added in version 3.6.

List of all members, including inherited members

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.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]