QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Performs raster layer calculations. More...
#include <qgsrastercalculator.h>
Public Types | |
enum | Result { Success = 0 , CreateOutputError = 1 , InputLayerError = 2 , Canceled = 3 , ParserError = 4 , MemoryError = 5 , BandError = 6 , CalculationError = 7 } |
Result of the calculation. More... | |
Public Member Functions | |
Q_DECL_DEPRECATED | QgsRasterCalculator (const QString &formulaString, const QString &outputFile, const QString &outputFormat, const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector< QgsRasterCalculatorEntry > &rasterEntries) |
QgsRasterCalculator constructor. More... | |
QgsRasterCalculator (const QString &formulaString, const QString &outputFile, const QString &outputFormat, const QgsRectangle &outputExtent, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector< QgsRasterCalculatorEntry > &rasterEntries, const QgsCoordinateTransformContext &transformContext) | |
QgsRasterCalculator constructor. More... | |
Q_DECL_DEPRECATED | QgsRasterCalculator (const QString &formulaString, const QString &outputFile, const QString &outputFormat, const QgsRectangle &outputExtent, int nOutputColumns, int nOutputRows, const QVector< QgsRasterCalculatorEntry > &rasterEntries) |
QgsRasterCalculator constructor. More... | |
QgsRasterCalculator (const QString &formulaString, const QString &outputFile, const QString &outputFormat, const QgsRectangle &outputExtent, int nOutputColumns, int nOutputRows, const QVector< QgsRasterCalculatorEntry > &rasterEntries, const QgsCoordinateTransformContext &transformContext) | |
QgsRasterCalculator constructor. More... | |
QString | lastError () const |
Returns a description of the last error encountered. More... | |
Result | processCalculation (QgsFeedback *feedback=nullptr) |
Starts the calculation and writes a new raster. More... | |
Performs raster layer calculations.
Definition at line 76 of file qgsrastercalculator.h.
Result of the calculation.
Definition at line 81 of file qgsrastercalculator.h.
QgsRasterCalculator::QgsRasterCalculator | ( | const QString & | formulaString, |
const QString & | outputFile, | ||
const QString & | outputFormat, | ||
const QgsRectangle & | outputExtent, | ||
int | nOutputColumns, | ||
int | nOutputRows, | ||
const QVector< QgsRasterCalculatorEntry > & | rasterEntries, | ||
const QgsCoordinateTransformContext & | transformContext | ||
) |
QgsRasterCalculator constructor.
formulaString | formula for raster calculation |
outputFile | output file path |
outputFormat | output file format |
outputExtent | output extent. CRS for output is taken from first entry in rasterEntries. |
nOutputColumns | number of columns in output raster |
nOutputRows | number of rows in output raster |
rasterEntries | list of referenced raster layers |
transformContext | coordinate transformation context |
Definition at line 74 of file qgsrastercalculator.cpp.
QgsRasterCalculator::QgsRasterCalculator | ( | const QString & | formulaString, |
const QString & | outputFile, | ||
const QString & | outputFormat, | ||
const QgsRectangle & | outputExtent, | ||
const QgsCoordinateReferenceSystem & | outputCrs, | ||
int | nOutputColumns, | ||
int | nOutputRows, | ||
const QVector< QgsRasterCalculatorEntry > & | rasterEntries, | ||
const QgsCoordinateTransformContext & | transformContext | ||
) |
QgsRasterCalculator constructor.
formulaString | formula for raster calculation |
outputFile | output file path |
outputFormat | output file format |
outputExtent | output extent, CRS is specified by outputCrs parameter |
outputCrs | destination CRS for output raster |
nOutputColumns | number of columns in output raster |
nOutputRows | number of rows in output raster |
rasterEntries | list of referenced raster layers |
transformContext | coordinate transformation context |
Definition at line 87 of file qgsrastercalculator.cpp.
QgsRasterCalculator::QgsRasterCalculator | ( | const QString & | formulaString, |
const QString & | outputFile, | ||
const QString & | outputFormat, | ||
const QgsRectangle & | outputExtent, | ||
int | nOutputColumns, | ||
int | nOutputRows, | ||
const QVector< QgsRasterCalculatorEntry > & | rasterEntries | ||
) |
QgsRasterCalculator constructor.
formulaString | formula for raster calculation |
outputFile | output file path |
outputFormat | output file format |
outputExtent | output extent. CRS for output is taken from first entry in rasterEntries. |
nOutputColumns | number of columns in output raster |
nOutputRows | number of rows in output raster |
rasterEntries | list of referenced raster layers |
Definition at line 104 of file qgsrastercalculator.cpp.
QgsRasterCalculator::QgsRasterCalculator | ( | const QString & | formulaString, |
const QString & | outputFile, | ||
const QString & | outputFormat, | ||
const QgsRectangle & | outputExtent, | ||
const QgsCoordinateReferenceSystem & | outputCrs, | ||
int | nOutputColumns, | ||
int | nOutputRows, | ||
const QVector< QgsRasterCalculatorEntry > & | rasterEntries | ||
) |
QgsRasterCalculator constructor.
formulaString | formula for raster calculation |
outputFile | output file path |
outputFormat | output file format |
outputExtent | output extent, CRS is specified by outputCrs parameter |
outputCrs | destination CRS for output raster |
nOutputColumns | number of columns in output raster |
nOutputRows | number of rows in output raster |
rasterEntries | list of referenced raster layers |
Definition at line 121 of file qgsrastercalculator.cpp.
QString QgsRasterCalculator::lastError | ( | ) | const |
Returns a description of the last error encountered.
Definition at line 726 of file qgsrastercalculator.cpp.
QgsRasterCalculator::Result QgsRasterCalculator::processCalculation | ( | QgsFeedback * | feedback = nullptr | ) |
Starts the calculation and writes a new raster.
The optional feedback argument can be used for progress reporting and cancellation support.
Definition at line 135 of file qgsrastercalculator.cpp.