|
QGIS API Documentation 3.44.0-Solothurn (5d9ba037df1)
|
Provides utility functions for working with mesh data. More...
#include <qgsmeshutils.h>
Static Public Member Functions | |
| static QgsMeshVertex | centroid (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
| Returns the centroid of the face. | |
| static QgsRasterBlock * | exportRasterBlock (const QgsMeshLayer &layer, const QgsMeshDatasetIndex &datasetIndex, const QgsCoordinateReferenceSystem &destinationCrs, const QgsCoordinateTransformContext &transformContext, double mapUnitsPerPixel, const QgsRectangle &extent, QgsRasterBlockFeedback *feedback=nullptr) |
| Exports mesh layer's dataset values as raster block. | |
| static QgsRasterBlock * | exportRasterBlock (const QgsTriangularMesh &triangularMesh, const QgsMeshDataBlock &datasetValues, const QgsMeshDataBlock &activeFlags, const QgsMeshDatasetGroupMetadata::DataType dataType, const QgsCoordinateTransform &transform, double mapUnitsPerPixel, const QgsRectangle &extent, QgsRasterBlockFeedback *feedback=nullptr) |
| Exports mesh layer's dataset values as raster block. | |
| static bool | isInTriangleFace (const QgsPointXY point, const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
| Tests if point p is on the face defined with vertices. | |
| static QSet< int > | nativeEdgesFromEdges (const QList< int > &edgesIndexes, const QVector< int > &edgesToNativeEdges) |
| Returns unique native faces indexes from list of triangle indexes. | |
| static QSet< int > | nativeFacesFromTriangles (const QList< int > &triangleIndexes, const QVector< int > &trianglesToNativeFaces) |
| Returns unique native faces indexes from list of triangle indexes. | |
| static QSet< int > | nativeVerticesFromEdges (const QList< int > &edgesIndexes, const QVector< QgsMeshEdge > &edges) |
| Returns unique native faces indexes from list of vertices of triangles. | |
| static QSet< int > | nativeVerticesFromTriangles (const QList< int > &triangleIndexes, const QVector< QgsMeshFace > &triangles) |
| Returns unique native vertex indexes from list of vertices of triangles. | |
| static void | setCounterClockwise (QgsMeshFace &triangle, const QgsMeshVertex &v0, const QgsMeshVertex &v1, const QgsMeshVertex &v2) |
| Checks if the triangle is counter clockwise, if not sets it counter clockwise. | |
| static QgsGeometry | toGeometry (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
| Returns face as polygon geometry. | |
| static std::unique_ptr< QgsPolygon > | toPolygon (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
| Returns face as polygon geometry, caller is responsible for delete. | |
Provides utility functions for working with mesh data.
Definition at line 59 of file qgsmeshutils.h.
|
static |
Returns the centroid of the face.
Definition at line 290 of file qgsmeshutils.cpp.
|
static |
Exports mesh layer's dataset values as raster block.
The function always fetches native mesh and dataset data from data provider and calculates triangular mesh
| layer | mesh layer |
| datasetIndex | index from layer defining group and dataset (time) to export |
| destinationCrs | destination/map CRS. Used to create triangular mesh from native mesh |
| transformContext | Transform context to transform layer CRS to destination CRS |
| mapUnitsPerPixel | map units per pixel for block |
| extent | extent of block in destination CRS |
| feedback | optional raster feedback object for cancellation/preview |
nullptr on errorDefinition at line 31 of file qgsmeshutils.cpp.
|
static |
Exports mesh layer's dataset values as raster block.
| triangularMesh | the triangular mesh of the mesh layer |
| datasetValues | dataset values used to build the raster block |
| activeFlags | active flag values |
| dataType | the data type iof the dataset values |
| transform | the coordinate transform used to export the raster block |
| mapUnitsPerPixel | map units per pixel for block |
| extent | extent of block in destination CRS |
| feedback | optional raster feedback object for cancellation/preview |
nullptr on errorDefinition at line 97 of file qgsmeshutils.cpp.
|
static |
Tests if point p is on the face defined with vertices.
Definition at line 194 of file qgsmeshutils.cpp.
|
static |
Returns unique native faces indexes from list of triangle indexes.
Definition at line 177 of file qgsmeshutils.cpp.
|
static |
Returns unique native faces indexes from list of triangle indexes.
Definition at line 172 of file qgsmeshutils.cpp.
|
static |
Returns unique native faces indexes from list of vertices of triangles.
Definition at line 226 of file qgsmeshutils.cpp.
|
static |
Returns unique native vertex indexes from list of vertices of triangles.
Definition at line 212 of file qgsmeshutils.cpp.
|
static |
Checks if the triangle is counter clockwise, if not sets it counter clockwise.
Definition at line 305 of file qgsmeshutils.cpp.
|
static |
Returns face as polygon geometry.
Definition at line 153 of file qgsmeshutils.cpp.
|
static |
Returns face as polygon geometry, caller is responsible for delete.
Definition at line 138 of file qgsmeshutils.cpp.