27 #include "qgis_analysis.h"
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 );
62 int processRaster(
QgsFeedback *feedback =
nullptr );
64 double zFactor()
const {
return mZFactor; }
67 void clearReliefColors();
69 QList< QgsRelief::ReliefColor >
reliefColors()
const {
return mReliefColors; }
76 QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
79 bool exportFrequencyDistributionToCsv(
const QString &file );
88 QString mOutputFormat;
90 double mCellSizeX = 0.0;
91 double mCellSizeY = 0.0;
93 float mInputNodataValue = -1;
95 float mOutputNodataValue = -1;
99 std::unique_ptr< QgsSlopeFilter > mSlopeFilter;
100 std::unique_ptr< QgsAspectFilter > mAspectFilter;
101 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter285;
102 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter300;
103 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter315;
106 QList< ReliefColor > mReliefColors;
108 bool processNineCellWindow(
float *x1,
float *x2,
float *x3,
float *x4,
float *x5,
float *x6,
float *x7,
float *x8,
float *x9,
109 unsigned char *red,
unsigned char *green,
unsigned char *blue );
118 GDALDriverH openOutputDriver();
127 bool setElevationColor(
double elevation,
int *red,
int *green,
int *blue );
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 );
150 #endif // QGSRELIEF_H