44 : color(
c ), minElevation( min ), maxElevation( max ) {}
50 QgsRelief(
const QString &inputFile,
const QString &outputFile,
const QString &outputFormat );
61 int processRaster(
QgsFeedback *feedback =
nullptr );
63 double zFactor()
const {
return mZFactor; }
66 void clearReliefColors();
68 QList<QgsRelief::ReliefColor>
reliefColors()
const {
return mReliefColors; }
75 QList<QgsRelief::ReliefColor> calculateOptimizedReliefClasses();
78 bool exportFrequencyDistributionToCsv(
const QString &file );
87 QString mOutputFormat;
89 double mCellSizeX = 0.0;
90 double mCellSizeY = 0.0;
92 float mInputNodataValue = -1;
94 float mOutputNodataValue = -1;
98 std::unique_ptr<QgsSlopeFilter> mSlopeFilter;
99 std::unique_ptr<QgsAspectFilter> mAspectFilter;
100 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter285;
101 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter300;
102 std::unique_ptr<QgsHillshadeFilter> mHillshadeFilter315;
105 QList<ReliefColor> mReliefColors;
107 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 );
116 GDALDriverH openOutputDriver();
127 bool getElevationColor(
double elevation,
int *red,
int *green,
int *blue )
const;
130 void setDefaultReliefColors();
136 int frequencyClassForElevation(
double elevation,
double minElevation,
double elevationClassRange );
138 void optimiseClassBreaks( QList<int> &breaks,
double *frequencies );
146 bool calculateRegression(
const QList<QPair<int, double>> &input,
double &a,
double &b );