Class: QgsMultiPoint

Multi point geometry collection.

Class Hierarchy

Inheritance diagram of qgis.core.QgsMultiPoint

Base classes

QgsGeometryCollection

Geometry collection.

QgsAbstractGeometry

Abstract base class for all geometries.

class qgis.core.QgsMultiPoint[source]

Bases: QgsGeometryCollection

__init__()

Constructor for an empty multipoint geometry.

__init__(points: Sequence[QgsPoint | QgsPointXY | Sequence[float]])

Construct a multipoint from a sequence of points (QgsPoint objects, QgsPointXY objects, or sequences of float values).

The multipoint Z and M type will be set based on the type of the first point in the sequence.

Added in version 3.34.

Parameters:

points (Sequence[Union[QgsPoint, QgsPointXY, Sequence[float]]])

__init__(x: Iterable[float], y: Iterable[float], z: Iterable[float] = [], m: Iterable[float] = [])

Construct a multipoint from arrays of coordinates. If the z or m arrays are non-empty then the resultant multipoint will have z and m types accordingly. This constructor is more efficient then calling addGeometry() repeatedly.

If the sizes of x and y are non-equal then the resultant multipoint will be created using the minimum size of these arrays.

Added in version 3.34.

Parameters:
  • x (Iterable[float])

  • y (Iterable[float])

  • z (Iterable[float] = [])

  • m (Iterable[float] = [])

__init__(a0: QgsMultiPoint)
Parameters:

a0 (QgsMultiPoint)

pointN(self, index: int) QgsPoint[source]

Returns the point with the specified index.

Raises:

IndexError – if no point with the specified index exists.

Added in version 3.16.

Parameters:

index (int)

Return type:

QgsPoint