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 – mesh layer to be associated with this exporter
QgsMeshContours(
QgsMeshContours
)Exporter of contours lines or polygons from a mesh layer.
Methods
Exports multi line string containing the contour line for particular dataset and value.
Exports multi polygons representing the areas with values in range for particular dataset
- exportLines(self, index: QgsMeshDatasetIndex, value: float, method: QgsMeshRendererScalarSettings.DataResamplingMethod, feedback: QgsFeedback = None) → QgsGeometry¶
Exports multi line string containing the contour line for particular dataset and value.
- Parameters
index (QgsMeshDatasetIndex) – dataset index that is used to update the cache
value (float) – value of the contour line
method (QgsMeshRendererScalarSettings.DataResamplingMethod) – 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
- Returns
MultiLineString geometry containing contour lines
Note
not thread safe
- exportPolygons(self, index: QgsMeshDatasetIndex, min_value: float, max_value: float, method: QgsMeshRendererScalarSettings.DataResamplingMethod, 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.DataResamplingMethod) – 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
- Returns
MultiPolygon geometry containing contour polygons
Note
not thread safe