QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
Functions | |
CORE_EXPORT QgsMeshVertex | centroid (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
Returns the centroid of the face. More... | |
CORE_EXPORT 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. More... | |
CORE_EXPORT 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. 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... | |
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. More... | |
CORE_EXPORT QgsGeometry | toGeometry (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
Returns face as polygon geometry. More... | |
CORE_EXPORT std::unique_ptr< QgsPolygon > | toPolygon (const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices) |
Returns face as polygon geometry, caller is responsible for delete. More... | |
QgsMeshVertex QgsMeshUtils::centroid | ( | const QgsMeshFace & | face, |
const QVector< QgsMeshVertex > & | vertices | ||
) |
Returns the centroid of the face.
Definition at line 960 of file qgstriangularmesh.cpp.
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
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 211 of file qgsmeshlayerinterpolator.cpp.
QgsRasterBlock * QgsMeshUtils::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.
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 277 of file qgsmeshlayerinterpolator.cpp.
bool QgsMeshUtils::isInTriangleFace | ( | const QgsPointXY | point, |
const QgsMeshFace & | face, | ||
const QVector< QgsMeshVertex > & | vertices | ||
) |
Tests if point p is on the face defined with vertices.
Definition at line 685 of file qgstriangularmesh.cpp.
QSet< int > QgsMeshUtils::nativeEdgesFromEdges | ( | const QList< int > & | edgesIndexes, |
const QVector< int > & | edgesToNativeEdges | ||
) |
Returns unique native faces indexes from list of triangle indexes.
Definition at line 667 of file qgstriangularmesh.cpp.
QSet< int > QgsMeshUtils::nativeFacesFromTriangles | ( | const QList< int > & | triangleIndexes, |
const QVector< int > & | trianglesToNativeFaces | ||
) |
Returns unique native faces indexes from list of triangle indexes.
Definition at line 662 of file qgstriangularmesh.cpp.
QSet< int > QgsMeshUtils::nativeVerticesFromEdges | ( | const QList< int > & | edgesIndexes, |
const QVector< QgsMeshEdge > & | edges | ||
) |
Returns unique native faces indexes from list of vertices of triangles.
Definition at line 717 of file qgstriangularmesh.cpp.
QSet< int > QgsMeshUtils::nativeVerticesFromTriangles | ( | const QList< int > & | triangleIndexes, |
const QVector< QgsMeshFace > & | triangles | ||
) |
Returns unique native vertex indexes from list of vertices of triangles.
Definition at line 703 of file qgstriangularmesh.cpp.
void QgsMeshUtils::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.
Definition at line 975 of file qgstriangularmesh.cpp.
QgsGeometry QgsMeshUtils::toGeometry | ( | const QgsMeshFace & | face, |
const QVector< QgsMeshVertex > & | vertices | ||
) |
Returns face as polygon geometry.
Definition at line 643 of file qgstriangularmesh.cpp.
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 628 of file qgstriangularmesh.cpp.