27 #include "qgis_analysis.h" 42 ReliefColor(
const QColor &
c,
double min,
double max ): color( c ), minElevation( min ), maxElevation( max ) { }
48 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; }
73 QList< QgsRelief::ReliefColor > calculateOptimizedReliefClasses();
76 bool exportFrequencyDistributionToCsv(
const QString &file );
85 QString mOutputFormat;
87 double mCellSizeX = 0.0;
88 double mCellSizeY = 0.0;
90 float mInputNodataValue = -1;
92 float mOutputNodataValue = -1;
96 std::unique_ptr< QgsSlopeFilter > mSlopeFilter;
97 std::unique_ptr< QgsAspectFilter > mAspectFilter;
98 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter285;
99 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter300;
100 std::unique_ptr< QgsHillshadeFilter > mHillshadeFilter315;
103 QList< ReliefColor > mReliefColors;
105 bool processNineCellWindow(
float *x1,
float *x2,
float *x3,
float *x4,
float *x5,
float *x6,
float *x7,
float *x8,
float *x9,
106 unsigned char *red,
unsigned char *green,
unsigned char *blue );
114 GDALDriverH openOutputDriver();
122 bool setElevationColor(
double elevation,
int *red,
int *green,
int *blue );
125 void setDefaultReliefColors();
130 int frequencyClassForElevation(
double elevation,
double minElevation,
double elevationClassRange );
132 void optimiseClassBreaks( QList<int> &breaks,
double *frequencies );
140 bool calculateRegression(
const QList< QPair < int, double > > &input,
double &a,
double &b );
144 #endif // QGSRELIEF_H
void setZFactor(double factor)
QList< QgsRelief::ReliefColor > reliefColors() const
Base class for feedback objects to be used for cancellation of something running in a worker thread...
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
Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- direc...
ReliefColor(const QColor &c, double min, double max)
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- direct...
void setReliefColors(const QList< QgsRelief::ReliefColor > &c)
std::unique_ptr< std::remove_pointer< GDALDatasetH >::type, GDALDatasetCloser > dataset_unique_ptr
Scoped GDAL dataset.
Produces colored relief rasters from DEM.