18#ifndef QGSNINECELLFILTER_H
19#define QGSNINECELLFILTER_H
25#include "qgis_analysis.h"
49 CreateOutputError = 3,
57 QgsNineCellFilter(
const QString &inputFile,
const QString &outputFile,
const QString &outputFormat );
114 virtual float processNineCellWindow(
float *x11,
float *x21,
float *x31,
float *x12,
float *x22,
float *x32,
float *x13,
float *x23,
float *x33 ) = 0;
127 GDALDriverH openOutputDriver();
150 Result processRasterGPU(
const QString &source,
QgsFeedback *feedback =
nullptr );
157 virtual void addExtraRasterParams( std::vector<float> ¶ms )
162 virtual const QString openClProgramBaseName()
const
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of ea...
QStringList creationOptions() const
Returns the list of data source creation options which will be used when creating the output raster f...
QStringList mCreationOptions
virtual float processNineCellWindow(float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33)=0
Calculates output value from nine input values.
Result
Result of the calculation.
QgsNineCellFilter(const QString &inputFile, const QString &outputFile, const QString &outputFormat)
Constructor that takes input file, output file and output format (GDAL string).
double mOutputNodataValue
The nodata value of the output layer.
virtual ~QgsNineCellFilter()=default
void setCellSizeX(double size)
double mInputNodataValue
The nodata value of the input layer.
void setCreationOptions(const QStringList &options)
Sets a list of data source creation options to use when creating the output raster file.
void setOutputNodataValue(double value)
void setInputNodataValue(double value)
void setZFactor(double factor)
Result processRaster(QgsFeedback *feedback=nullptr)
Starts the calculation, reads from mInputFile and stores the result in mOutputFile.
void setCellSizeY(double size)
double inputNodataValue() const
double mZFactor
Scale factor for z-value if x-/y- units are different to z-units (111120 for degree->meters and 37040...
double outputNodataValue() const
std::unique_ptr< std::remove_pointer< GDALDatasetH >::type, GDALDatasetCloser > dataset_unique_ptr
Scoped GDAL dataset.