QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Member Functions | List of all members
QgsMeshContours Class Reference

Exporter of contours lines or polygons from a mesh layer. More...

#include <qgsmeshcontours.h>

Public Member Functions

 QgsMeshContours (QgsMeshLayer *layer)
 Constructs the mesh contours exporter. More...
 
 ~QgsMeshContours ()
 
QgsGeometry exportLines (const QgsMeshDatasetIndex &index, double value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback=nullptr)
 Exports multi line string containing the contour line for particular dataset and value. More...
 
QgsGeometry exportPolygons (const QgsMeshDatasetIndex &index, double min_value, double max_value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback=nullptr)
 Exports multi polygons representing the areas with values in range for particular dataset. More...
 

Detailed Description

Exporter of contours lines or polygons from a mesh layer.

Since
QGIS 3.12

Definition at line 50 of file qgsmeshcontours.h.

Constructor & Destructor Documentation

◆ QgsMeshContours()

QgsMeshContours::QgsMeshContours ( QgsMeshLayer layer)

Constructs the mesh contours exporter.

Caches the native and triangular mesh from data provider

Parameters
layermesh layer to be associated with this exporter

Definition at line 38 of file qgsmeshcontours.cpp.

◆ ~QgsMeshContours()

QgsMeshContours::~QgsMeshContours ( )
default

Member Function Documentation

◆ exportLines()

QgsGeometry QgsMeshContours::exportLines ( const QgsMeshDatasetIndex index,
double  value,
QgsMeshRendererScalarSettings::DataResamplingMethod  method,
QgsFeedback feedback = nullptr 
)

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

Parameters
indexdataset index
valuevalue of the contour line
methodfor datasets defined on faces, the method will be used to convert data to vertices
feedbackoptional feedback object for progress and cancellation support
Returns
MultiLineString geometry containing contour lines

Definition at line 255 of file qgsmeshcontours.cpp.

◆ exportPolygons()

QgsGeometry QgsMeshContours::exportPolygons ( const QgsMeshDatasetIndex index,
double  min_value,
double  max_value,
QgsMeshRendererScalarSettings::DataResamplingMethod  method,
QgsFeedback feedback = nullptr 
)

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

Parameters
indexdataset index
min_valueminimum of the value interval for contour polygon
max_valuemaximum of the value interval for contour polygon
methodfor datasets defined on faces, the method will be used to convert data to vertices
feedbackoptional feedback object for progress and cancellation support
Returns
MultiPolygon geometry containing contour polygons

Definition at line 57 of file qgsmeshcontours.cpp.


The documentation for this class was generated from the following files: