QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Raster calculator class. More...
#include <qgsrastercalculator.h>
Public Types | |
enum | Result { Success = 0, CreateOutputError = 1, InputLayerError = 2, Cancelled = 3, ParserError = 4, MemoryError = 5 } |
Result of the calculation. More... | |
Public Member Functions | |
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, const QgsCoordinateReferenceSystem &outputCrs, int nOutputColumns, int nOutputRows, const QVector< QgsRasterCalculatorEntry > &rasterEntries) | |
QgsRasterCalculator constructor. More... | |
int | processCalculation (QProgressDialog *p=nullptr) |
Starts the calculation and writes new raster. More... | |
Raster calculator class.
Definition at line 41 of file qgsrastercalculator.h.
Result of the calculation.
Definition at line 46 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 | ||
) |
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 37 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 51 of file qgsrastercalculator.cpp.
int QgsRasterCalculator::processCalculation | ( | QProgressDialog * | p = nullptr | ) |
Starts the calculation and writes new raster.
p | progress bar (or 0 if called from non-gui code) |
Definition at line 64 of file qgsrastercalculator.cpp.