QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsmeshcontours.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshcontours.h
3 -----------------
4 begin : September 25th, 2019
5 copyright : (C) 2018 by Peter Petrik
6 email : zilolv at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSMESHCONTOURS_H
19#define QGSMESHCONTOURS_H
20
21#include <QMap>
22#include <QString>
23#include <QStringList>
24#include <QVector>
25#include <QPair>
26#include <QList>
27#include <memory>
28#include <limits>
29
30#include "qgsmeshdataprovider.h"
31#include "qgsfeature.h"
32#include "qgis_analysis.h"
33#include "qgis_sip.h"
34#include "qgstriangularmesh.h"
36
37class QgsMeshLayer;
38class QgsPoint;
39class QgsGeometry;
40class QgsFeedback;
41
50class ANALYSIS_EXPORT QgsMeshContours
51{
52 public:
59
73 QgsMeshContours( const QgsTriangularMesh &triangularMesh, const QgsMesh &nativeMesh, const QVector<double> &datasetValues, const QgsMeshDataBlock scalarActiveFaceFlagValues ) SIP_SKIP;
74
75
77
88 QgsGeometry exportLines( const QgsMeshDatasetIndex &index, double value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback = nullptr );
89
100 QgsGeometry exportLines( double value, QgsFeedback *feedback = nullptr ) SIP_SKIP;
101
113 QgsGeometry exportPolygons( const QgsMeshDatasetIndex &index, double min_value, double max_value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback = nullptr );
114
126 QgsGeometry exportPolygons( double min_value, double max_value, QgsFeedback *feedback = nullptr ) SIP_SKIP;
127
128
129 private:
130 void populateCache(
131 const QgsMeshDatasetIndex &index,
132 QgsMeshRendererScalarSettings::DataResamplingMethod method
133 );
134
135 QgsMeshLayer *mMeshLayer = nullptr;
136
137 // cached values for particular index & interpolation method & layer
138 QgsMeshDatasetIndex mCachedIndex;
139 QgsTriangularMesh mTriangularMesh;
140 QgsMesh mNativeMesh;
141 QVector<double> mDatasetValues;
142 QgsMeshDataBlock mScalarActiveFaceFlagValues;
143};
144
145#endif // QGSMESHCONTOURS_H
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
A geometry is the spatial representation of a feature.
Exporter of contours lines or polygons from a mesh layer.
QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e....
QgsMeshDatasetIndex is index that identifies the dataset group (e.g.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a mesh renderer settings for scalar datasets.
DataResamplingMethod
Resampling of value from dataset.
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49
Triangular/Derived Mesh is mesh with vertices in map coordinates.
#define SIP_SKIP
Definition qgis_sip.h:126
Mesh - vertices, edges and faces.