23#include "qgis_analysis.h"
47 QgsRelief(
const QString &inputFile,
const QString &outputFile,
const QString &outputFormat );
62 OutputCreationFailed = 3,
83 double zFactor()
const {
return mZFactor; }
99 void clearReliefColors();
117 QList<QgsRasterReliefColor>
reliefColors()
const {
return mReliefColors; }
165 QList<QgsRasterReliefColor> calculateOptimizedReliefClasses();
168 bool exportFrequencyDistributionToCsv(
const QString &file );
177 QString mOutputFormat;
179 double mCellSizeX = 0.0;
180 double mCellSizeY = 0.0;
182 float mInputNodataValue = -9999.0;
184 float mOutputNodataValue = -9999.0;
188 QStringList mCreationOptions;
190 std::unique_ptr<QgsSlopeFilter> mSlopeFilter;
191 std::unique_ptr<QgsAspectFilter> mAspectFilter;
192 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter285;
193 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter300;
194 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter315;
197 QList<QgsRasterReliefColor> mReliefColors;
199 bool processNineCellWindow(
float *x1,
float *x2,
float *x3,
float *x4,
float *x5,
float *x6,
float *x7,
float *x8,
float *x9,
unsigned char *red,
unsigned char *green,
unsigned char *blue );
204 bool getElevationColor(
double elevation,
int *red,
int *green,
int *blue )
const;
207 void setDefaultReliefColors();
213 static int frequencyClassForElevation(
double elevation,
double minElevation,
double elevationClassRange );
Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- direc...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Defines elevation range and color for raster relief coloring.
Produces colored relief rasters from DEM.
void setZFactor(double factor)
Sets the z factor, which controls vertical elevation exaggeration.
double outputNodataValue() const
Returns no data value used for output file.
Result
Calculation results.
QgsRelief(const QString &inputFile, const QString &outputFile, const QString &outputFormat)
Constructor for QgsRelief.
void setCreationOptions(const QStringList &list)
Sets a list of data source creation options to use when creating the output raster file.
double zFactor() const
Returns the z factor, which controls vertical elevation exaggeration.
void setOutputNodataValue(double value)
Sets no data value for output file.
QList< QgsRasterReliefColor > reliefColors() const
Returns a list of all relief colors.
QgsRelief & operator=(const QgsRelief &rh)=delete
QgsRelief(const QgsRelief &rh)=delete
void setReliefColors(const QList< QgsRasterReliefColor > &c)
Sets the list of relief colors.
QStringList creationOptions() const
Returns the list of data source creation options which will be used when creating the output raster f...
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- direct...
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c