Class: QgsMultiPoint

class qgis.core.QgsMultiPoint

Bases: QgsGeometryCollection

Multi point geometry collection.

New in version 2.10.

QgsMultiPoint() Constructor for an empty multipoint geometry.

QgsMultiPoint(QgsMultiPoint)

Methods

addGeometry

param g

asGml2

param doc

asGml3

param doc

boundary

rtype

QgsAbstractGeometry

clear

clone

rtype

QgsMultiPoint

createEmptyWithSameType

rtype

QgsMultiPoint

fromWkt

param wkt

geometryType

rtype

str

insertGeometry

param g

isValid

param flags

nCoordinates

rtype

int

pointN

Returns the point with the specified index.

segmentLength

param startVertex

toCurveType

rtype

QgsMultiPoint

vertexNumberFromVertexId

param id

wktOmitChildType

rtype

bool

addGeometry(self, g: QgsAbstractGeometry) bool
Parameters

g (QgsAbstractGeometry) –

Return type

bool

asGml2(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) QDomElement
Parameters
  • doc (QDomDocument) –

  • precision (int = 17) –

  • ns (str = '') –

  • axisOrder (QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) –

Return type

QDomElement

asGml3(self, doc: QDomDocument, precision: int = 17, ns: str = '', axisOrder: QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) QDomElement
Parameters
  • doc (QDomDocument) –

  • precision (int = 17) –

  • ns (str = '') –

  • axisOrder (QgsAbstractGeometry.AxisOrder = QgsAbstractGeometry.AxisOrder.XY) –

Return type

QDomElement

boundary(self) QgsAbstractGeometry
Return type

QgsAbstractGeometry

clear(self)
clone(self) QgsMultiPoint
Return type

QgsMultiPoint

createEmptyWithSameType(self) QgsMultiPoint
Return type

QgsMultiPoint

fromWkt(self, wkt: str) bool
Parameters

wkt (str) –

Return type

bool

geometryType(self) str
Return type

str

insertGeometry(self, g: QgsAbstractGeometry, index: int) bool
Parameters
Return type

bool

isValid(self, flags: Union[Qgis.GeometryValidityFlags, Qgis.GeometryValidityFlag] = Qgis.GeometryValidityFlags()) Tuple[bool, str]
Parameters

flags (Union[Qgis.GeometryValidityFlags) –

Return type

Tuple[bool, str]

nCoordinates(self) int
Return type

int

pointN(self, index: int) QgsPoint

Returns the point with the specified index.

Raises

IndexError – if no point with the specified index exists.

New in version 3.16.

Parameters

index (int) –

Return type

QgsPoint

segmentLength(self, startVertex: QgsVertexId) float
Parameters

startVertex (QgsVertexId) –

Return type

float

toCurveType(self) QgsMultiPoint
Return type

QgsMultiPoint

vertexNumberFromVertexId(self, id: QgsVertexId) int
Parameters

id (QgsVertexId) –

Return type

int

wktOmitChildType(self) bool
Return type

bool