43 ReliefColor(
const QColor &
c,
double min,
double max ): color(
c ), minElevation( min ), maxElevation( max ) { }
49 QgsRelief(
const QString &inputFile,
const QString &outputFile,
const QString &outputFormat );
60 int processRaster(
QgsFeedback *feedback =
nullptr );
62 double zFactor()
const {
return mZFactor; }
65 void clearReliefColors();
67 QList< QgsRelief::ReliefColor >
reliefColors()
const {
return mReliefColors; }
74 QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
77 bool exportFrequencyDistributionToCsv(
const QString &file );
86 QString mOutputFormat;
88 double mCellSizeX = 0.0;
89 double mCellSizeY = 0.0;
91 float mInputNodataValue = -1;
93 float mOutputNodataValue = -1;
97 std::unique_ptr< QgsSlopeFilter > mSlopeFilter;
98 std::unique_ptr< QgsAspectFilter > mAspectFilter;
99 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter285;
100 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter300;
101 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter315;
104 QList< ReliefColor > mReliefColors;
106 bool processNineCellWindow(
float *x1,
float *x2,
float *x3,
float *x4,
float *x5,
float *x6,
float *x7,
float *x8,
float *x9,
107 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 );