QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Functions
QgsMeshUtils Namespace Reference

Functions

CORE_EXPORT QgsRasterBlockexportRasterBlock (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. More...
 
bool isInTriangleFace (const QgsPointXY point, const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
 Tests if point p is on the face defined with vertices. More...
 
CORE_EXPORT QSet< int > nativeEdgesFromEdges (const QList< int > &edgesIndexes, const QVector< int > &edgesToNativeEdges)
 Returns unique native faces indexes from list of triangle indexes. More...
 
CORE_EXPORT QSet< int > nativeFacesFromTriangles (const QList< int > &triangleIndexes, const QVector< int > &trianglesToNativeFaces)
 Returns unique native faces indexes from list of triangle indexes. More...
 
CORE_EXPORT QSet< int > nativeVerticesFromEdges (const QList< int > &edgesIndexes, const QVector< QgsMeshEdge > &edges)
 Returns unique native faces indexes from list of vertices of triangles. More...
 
CORE_EXPORT QSet< int > nativeVerticesFromTriangles (const QList< int > &triangleIndexes, const QVector< QgsMeshFace > &triangles)
 Returns unique native vertex indexes from list of vertices of triangles. More...
 
CORE_EXPORT QgsGeometry toGeometry (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
 Returns face as polygon geometry. More...
 
CORE_EXPORT std::unique_ptr< QgsPolygontoPolygon (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
 Returns face as polygon geometry, caller is responsible for delete. More...
 

Function Documentation

◆ exportRasterBlock()

QgsRasterBlock * QgsMeshUtils::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.

The function always fetches native mesh and dataset data from data provider and calculates triangular mesh

Parameters
layermesh layer
datasetIndexindex from layer defining group and dataset (time) to export
destinationCrsdestination/map CRS. Used to create triangular mesh from native mesh
transformContextTransform context to transform layer CRS to destination CRS
mapUnitsPerPixelmap units per pixel for block
extentextent of block in destination CRS
feedbackoptional raster feedback object for cancellation/preview
Returns
raster block with Float::64 values. nullptr on error
Since
QGIS 3.6

Definition at line 179 of file qgsmeshlayerinterpolator.cpp.

◆ isInTriangleFace()

bool QgsMeshUtils::isInTriangleFace ( const QgsPointXY  point,
const QgsMeshFace face,
const QVector< QgsMeshVertex > &  vertices 
)

Tests if point p is on the face defined with vertices.

Since
QGIS 3.12

Definition at line 563 of file qgstriangularmesh.cpp.

◆ nativeEdgesFromEdges()

QSet< int > QgsMeshUtils::nativeEdgesFromEdges ( const QList< int > &  edgesIndexes,
const QVector< int > &  edgesToNativeEdges 
)

Returns unique native faces indexes from list of triangle indexes.

Since
QGIS 3.14

Definition at line 545 of file qgstriangularmesh.cpp.

◆ nativeFacesFromTriangles()

QSet< int > QgsMeshUtils::nativeFacesFromTriangles ( const QList< int > &  triangleIndexes,
const QVector< int > &  trianglesToNativeFaces 
)

Returns unique native faces indexes from list of triangle indexes.

Since
QGIS 3.4

Definition at line 540 of file qgstriangularmesh.cpp.

◆ nativeVerticesFromEdges()

QSet< int > QgsMeshUtils::nativeVerticesFromEdges ( const QList< int > &  edgesIndexes,
const QVector< QgsMeshEdge > &  edges 
)

Returns unique native faces indexes from list of vertices of triangles.

Since
QGIS 3.14

Definition at line 595 of file qgstriangularmesh.cpp.

◆ nativeVerticesFromTriangles()

QSet< int > QgsMeshUtils::nativeVerticesFromTriangles ( const QList< int > &  triangleIndexes,
const QVector< QgsMeshFace > &  triangles 
)

Returns unique native vertex indexes from list of vertices of triangles.

Since
QGIS 3.14

Definition at line 581 of file qgstriangularmesh.cpp.

◆ toGeometry()

QgsGeometry QgsMeshUtils::toGeometry ( const QgsMeshFace face,
const QVector< QgsMeshVertex > &  vertices 
)

Returns face as polygon geometry.

Definition at line 524 of file qgstriangularmesh.cpp.

◆ toPolygon()

std::unique_ptr< QgsPolygon > QgsMeshUtils::toPolygon ( const QgsMeshFace face,
const QVector< QgsMeshVertex > &  vertices 
)

Returns face as polygon geometry, caller is responsible for delete.

Definition at line 509 of file qgstriangularmesh.cpp.