QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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 <limits>
22#include <memory>
23
24#include "qgis_analysis.h"
25#include "qgis_sip.h"
26#include "qgsfeature.h"
27#include "qgsmeshdataprovider.h"
29#include "qgstriangularmesh.h"
30
31#include <QList>
32#include <QMap>
33#include <QPair>
34#include <QString>
35#include <QStringList>
36#include <QVector>
37
38class QgsMeshLayer;
39class QgsPoint;
40class QgsGeometry;
41class QgsFeedback;
42
51class ANALYSIS_EXPORT QgsMeshContours
52{
53 public:
60
74 QgsMeshContours( const QgsTriangularMesh &triangularMesh, const QgsMesh &nativeMesh, const QVector<double> &datasetValues, const QgsMeshDataBlock scalarActiveFaceFlagValues ) SIP_SKIP;
75
76
78
90
101 QgsGeometry exportLines( double value, QgsFeedback *feedback = nullptr ) SIP_SKIP;
102
114 QgsGeometry exportPolygons( const QgsMeshDatasetIndex &index, double min_value, double max_value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback = nullptr );
115
127 QgsGeometry exportPolygons( double min_value, double max_value, QgsFeedback *feedback = nullptr ) SIP_SKIP;
128
129
130 private:
131 void populateCache(
132 const QgsMeshDatasetIndex &index,
133 QgsMeshRendererScalarSettings::DataResamplingMethod method
134 );
135
136 QgsMeshLayer *mMeshLayer = nullptr;
137
138 // cached values for particular index & interpolation method & layer
139 QgsMeshDatasetIndex mCachedIndex;
140 QgsTriangularMesh mTriangularMesh;
141 QgsMesh mNativeMesh;
142 QVector<double> mDatasetValues;
143 QgsMeshDataBlock mScalarActiveFaceFlagValues;
144};
145
146#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.
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.
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.
QgsMeshContours(QgsMeshLayer *layer)
Constructs the mesh contours exporter.
A block of integers/doubles from a mesh dataset.
An 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
A triangular/derived mesh with vertices in map coordinates.
#define SIP_SKIP
Definition qgis_sip.h:134
Mesh - vertices, edges and faces.