Class: QgsMeshTriangulation

class qgis.analysis.QgsMeshTriangulation

Bases: PyQt5.QtCore.QObject

Constructor

Class that handles mesh creation with Delaunay constrained triangulation

Methods

addBreakLines

Adds break lines from a vector layer, return True if successful.

addVertices

Adds vertices to the triangulation from a feature iterator, return True if successful.

childEvent

connectNotify

customEvent

disconnectNotify

isSignalConnected

receivers

sender

senderSignalIndex

setCrs

Sets the coordinate reference system used for the triangulation

timerEvent

triangulatedMesh

Returns the triangulated mesh

addBreakLines(self, lineFeatureIterator: QgsFeatureIterator, valueAttribute: int, transformContext: QgsCoordinateTransform, feedback: QgsFeedback = None, featureCount: int = 1) → bool

Adds break lines from a vector layer, return True if successful.

Parameters
  • lineFeatureIterator (QgsFeatureIterator) – the feature iterator of break lines to insert

  • valueAttribute (int) – the index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices

  • transform – the coordinates transform used to transform coordinates

  • feedback (QgsFeedback = None) – feedback argument may be specified to allow cancellation and progress reports

  • featureCount (int = 1) – the count of feature to allow progress report of the feedback

Warning

if the feature iterator contains only point geometries, the vertices will be added only without treating them as breaklines

Parameters

transformContext (QgsCoordinateTransform) –

Return type

bool

addVertices(self, vertexFeatureIterator: QgsFeatureIterator, valueAttribute: int, transform: QgsCoordinateTransform, feedback: QgsFeedback = None, featureCount: int = 1) → bool

Adds vertices to the triangulation from a feature iterator, return True if successful.

Parameters
  • vertexFeatureIterator (QgsFeatureIterator) – the feature iterator of vertices to insert

  • valueAttribute (int) – the index of the attribute that represents the value of vertices, if -1 uses Z coordinate of vertices

  • transform (QgsCoordinateTransform) – the coordinates transform used to transform coordinates

  • feedback (QgsFeedback = None) – feedback argument may be specified to allow cancellation and progress reports

  • featureCount (int = 1) – the count of feature to allow progress report of the feedback

Return type

bool

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) → bool
receivers(self, PYQT_SIGNAL) → int
sender(self) → QObject
senderSignalIndex(self) → int
setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the coordinate reference system used for the triangulation

Parameters

crs (QgsCoordinateReferenceSystem) –

timerEvent(self, QTimerEvent)
triangulatedMesh(self)QgsMesh

Returns the triangulated mesh

Return type

QgsMesh