30 class QProgressDialog;
38 ReliefColor(
const QColor& c,
double min,
double max ): color( c ), minElevation( min ), maxElevation( max ) { }
44 QgsRelief(
const QString& inputFile,
const QString& outputFile,
const QString& outputFormat );
50 int processRaster( QProgressDialog* p );
52 double zFactor()
const {
return mZFactor; }
55 void clearReliefColors();
56 void addReliefColorClass(
const ReliefColor& color );
57 const QList< ReliefColor >&
reliefColors()
const {
return mReliefColors; }
62 QList< ReliefColor > calculateOptimizedReliefClasses();
65 bool exportFrequencyDistributionToCsv(
const QString&
file );
71 QString mOutputFormat;
76 float mInputNodataValue;
78 float mOutputNodataValue;
89 QList< ReliefColor > mReliefColors;
91 bool processNineCellWindow(
float* x1,
float* x2,
float* x3,
float* x4,
float* x5,
float* x6,
float* x7,
float* x8,
float* x9,
92 unsigned char* red,
unsigned char* green,
unsigned char* blue );
95 GDALDatasetH openInputFile(
int& nCellsX,
int& nCellsY );
98 GDALDriverH openOutputDriver();
101 GDALDatasetH openOutputFile( GDALDatasetH inputDataset, GDALDriverH outputDriver );
104 bool setElevationColor(
double elevation,
int* red,
int* green,
int* blue );
107 void setDefaultReliefColors();
110 int frequencyClassForElevation(
double elevation,
double minElevation,
double elevationClassRange );
112 void optimiseClassBreaks( QList<int>& breaks,
double* frequencies );
118 bool calculateRegression(
const QList< QPair < int, double > >& input,
double& a,
double& b );
121 #endif // QGSRELIEF_H