Class: QgsMeshContours

class qgis.analysis.QgsMeshContours(layer: QgsMeshLayer)

Bases: sip.wrapper

Constructs the mesh contours exporter. Caches the native and triangular mesh from data provider

Parameters

layer (QgsMeshLayer) – mesh layer to be associated with this exporter

QgsMeshContours(QgsMeshContours)

Exporter of contours lines or polygons from a mesh layer.

Methods

exportLines

Exports multi line string containing the contour line for particular dataset and value

exportPolygons

Exports multi polygons representing the areas with values in range for particular dataset

exportLines(self, index: QgsMeshDatasetIndex, value: float, method: QgsMeshRendererScalarSettings.DataInterpolationMethod, feedback: QgsFeedback = None) → QgsGeometry

Exports multi line string containing the contour line for particular dataset and value

Parameters
Return type

QgsGeometry

Returns

MultiLineString geometry containing contour lines

exportPolygons(self, index: QgsMeshDatasetIndex, min_value: float, max_value: float, method: QgsMeshRendererScalarSettings.DataInterpolationMethod, feedback: QgsFeedback = None) → QgsGeometry

Exports multi polygons representing the areas with values in range for particular dataset

Parameters
  • index (QgsMeshDatasetIndex) – dataset index

  • min_value (float) – minimum of the value interval for contour polygon

  • max_value (float) – maximum of the value interval for contour polygon

  • method (QgsMeshRendererScalarSettings.DataInterpolationMethod) – for datasets defined on faces, the method will be used to convert data to vertices

  • feedback (QgsFeedback = None) – optional feedback object for progress and cancellation support

Return type

QgsGeometry

Returns

MultiPolygon geometry containing contour polygons