QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
qgsmeshcalculator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshcalculator.h
3 -------------------
4 begin : December 18th, 2018
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 QGSMESHCALCULATOR_H
19#define QGSMESHCALCULATOR_H
20
21#include <QString>
22#include <QVector>
23#include <QStringList>
24
25#include "qgis_core.h"
26#include "qgis_sip.h"
27#include "qgsrectangle.h"
28#include "qgsgeometry.h"
29#include "qgsmeshdataset.h"
30#include "qgsprovidermetadata.h"
31
32class QgsMeshLayer;
33class QgsFeedback;
34
50class CORE_EXPORT QgsMeshCalculator
51{
52 public:
53
66
78 Q_DECL_DEPRECATED QgsMeshCalculator( const QString &formulaString,
79 const QString &outputFile,
80 const QgsRectangle &outputExtent,
81 double startTime,
82 double endTime,
84
96 Q_DECL_DEPRECATED QgsMeshCalculator( const QString &formulaString,
97 const QString &outputFile,
98 const QgsGeometry &outputMask,
99 double startTime,
100 double endTime,
102
116 QgsMeshCalculator( const QString &formulaString,
117 const QString &outputDriver,
118 const QString &outputGroupName,
119 const QString &outputFile,
120 const QgsRectangle &outputExtent,
121 double startTime,
122 double endTime,
123 QgsMeshLayer *layer );
124
138 QgsMeshCalculator( const QString &formulaString,
139 const QString &outputDriver,
140 const QString &outputGroupName,
141 const QString &outputFile,
142 const QgsGeometry &outputMask,
143 double startTime,
144 double endTime,
145 QgsMeshLayer *layer );
146
160 QgsMeshCalculator( const QString &formulaString,
161 const QString &outputGroupName,
162 const QgsRectangle &outputExtent,
163 const QgsMeshDatasetGroup::Type &destination,
164 QgsMeshLayer *layer,
165 double startTime,
166 double endTime );
167
181 QgsMeshCalculator( const QString &formulaString,
182 const QString &outputGroupName,
183 const QgsGeometry &outputMask,
184 const QgsMeshDatasetGroup::Type &destination,
185 QgsMeshLayer *layer,
186 double startTime,
187 double endTime );
188
194 Result processCalculation( QgsFeedback *feedback = nullptr );
195
204 Q_DECL_DEPRECATED static Result expression_valid( const QString &formulaString,
206
216 static Result expressionIsValid( const QString &formulaString,
217 QgsMeshLayer *layer,
219
220 private:
222
223 QString mFormulaString;
224 QString mOutputDriver;
225 QString mOutputGroupName;
226 QString mOutputFile;
227 QgsRectangle mOutputExtent;
228 QgsGeometry mOutputMask;
229 bool mUseMask = false;
231 double mStartTime = 0.0;
232 double mEndTime = 0.0;
233 QgsMeshLayer *mMeshLayer = nullptr;
234};
235
236#endif // QGSMESHCALCULATOR_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.
Performs mesh layer calculations.
Result
Result of the calculation.
@ MemoryError
Error allocating memory for result.
@ InvalidDatasets
Datasets with different time outputs or not part of the mesh.
@ CreateOutputError
Error creating output data file.
@ EvaluateError
Error during evaluation.
@ ParserError
Error parsing formula.
@ Canceled
Calculation canceled.
@ InputLayerError
Error reading input layer.
Type
Type of the dataset group.
@ Persistent
Generic type used for non typed dataset group.
MeshDriverCapability
Flags for the capabilities of the driver.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
A rectangle specified with double values.
#define SIP_DEPRECATED
Definition qgis_sip.h:106