Class: QgsMultiCurve¶
- class qgis.core.QgsMultiCurve¶
Bases:
QgsGeometryCollection
Multi curve geometry collection.
New in version 2.10:
Methods
- param g:
- param doc:
- param doc:
- rtype:
QgsAbstractGeometry
Returns point at index (for geometries without child geometries - i.e. curve / point).
- rtype:
QgsMultiCurve
- rtype:
QgsMultiCurve
Returns the curve with the specified
index
.Reads a collection from a WKT string.
- param wkt:
- rtype:
str
Returns whether the geometry has any child geometries (
False
for point / curve,True
otherwise)- param g:
Returns a copy of the multi curve, where each component curve has had its line direction reversed.
Updates the geometry type based on whether sub geometries contain z or m values.
Returns the sort index for the geometry, used in the
compareTo()
method to compare geometries of different types.- rtype:
QgsMultiCurve
Returns whether child type names are omitted from Wkt representations of the collection
- 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:
- calculateBoundingBox(self) QgsRectangle ¶
- childCount(self) int ¶
- childGeometry(self, index: int) QgsAbstractGeometry ¶
- childPoint(self, index: int) QgsPoint ¶
Returns point at index (for geometries without child geometries - i.e. curve / point)
Note
used for vertex_iterator implementation
New in version 3.0.
- clear(self)¶
- clearCache(self)¶
- clone(self) QgsMultiCurve ¶
- Return type:
- compareToSameClass(self, other: QgsAbstractGeometry) int ¶
- createEmptyWithSameType(self) QgsMultiCurve ¶
- Return type:
- curveN(self, index: int) QgsCurve ¶
Returns the curve with the specified
index
.- Raises:
IndexError – if no curve with the specified index exists.
New in version 3.16.
- Parameters:
index (int) –
- Return type:
- fromCollectionWkt(self, wkt: str, subtypes: Iterable[QgsAbstractGeometry], defaultChildWkbType: str = '') bool ¶
Reads a collection from a WKT string.
- fromWkt(self, wkt: str) bool ¶
- Parameters:
wkt (str) –
- Return type:
bool
- geometryType(self) str ¶
- Return type:
str
- hasChildGeometries(self) bool ¶
Returns whether the geometry has any child geometries (
False
for point / curve,True
otherwise)Note
used for vertex_iterator implementation
New in version 3.0.
- insertGeometry(self, g: QgsAbstractGeometry, index: int) bool ¶
- Parameters:
g (QgsAbstractGeometry) –
index (int) –
- Return type:
bool
- reversed(self) QgsMultiCurve ¶
Returns a copy of the multi curve, where each component curve has had its line direction reversed.
New in version 2.14.
- Return type:
- setZMTypeFromSubGeometry(self, subggeom: QgsAbstractGeometry, baseGeomType: Qgis.WkbType)¶
Updates the geometry type based on whether sub geometries contain z or m values.
- sortIndex(self) int ¶
Returns the sort index for the geometry, used in the
compareTo()
method to compare geometries of different types.New in version 3.20.
- toCurveType(self) QgsMultiCurve ¶
- Return type:
- wktOmitChildType(self) bool ¶
Returns whether child type names are omitted from Wkt representations of the collection
New in version 2.12.