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 );
 
Calculates aspect values in a window of 3x3 cells based on first order derivatives in x- and y- direc...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Produces colored relief rasters from DEM.
void setZFactor(double factor)
QList< QgsRelief::ReliefColor > reliefColors() const
void setReliefColors(const QList< QgsRelief::ReliefColor > &c)
QgsRelief(const QgsRelief &rh)=delete
QgsRelief cannot be copied.
QgsRelief & operator=(const QgsRelief &rh)=delete
QgsRelief cannot be copied.
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- direct...
std::unique_ptr< std::remove_pointer< GDALDatasetH >::type, GDALDatasetCloser > dataset_unique_ptr
Scoped GDAL dataset.
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
ReliefColor(const QColor &c, double min, double max)