24QString QgsSlopeAlgorithm::name()
 const 
   26  return QStringLiteral( 
"slope" );
 
   29QString QgsSlopeAlgorithm::displayName()
 const 
   31  return QObject::tr( 
"Slope" );
 
   34QStringList QgsSlopeAlgorithm::tags()
 const 
   36  return QObject::tr( 
"dem,slope,terrain" ).split( 
',' );
 
   39QString QgsSlopeAlgorithm::group()
 const 
   41  return QObject::tr( 
"Raster terrain analysis" );
 
   44QString QgsSlopeAlgorithm::groupId()
 const 
   46  return QStringLiteral( 
"rasterterrainanalysis" );
 
   49QString QgsSlopeAlgorithm::shortHelpString()
 const 
   51  return QObject::tr( 
"This algorithm calculates the angle of inclination " 
   52                      "of the terrain from an input raster layer. The slope " 
   53                      "is expressed in degrees." );
 
   56QString QgsSlopeAlgorithm::shortDescription()
 const 
   58  return QObject::tr( 
"Calculates the angle of inclination of the terrain from an input raster layer." );
 
   61QgsSlopeAlgorithm *QgsSlopeAlgorithm::createInstance()
 const 
   63  return new QgsSlopeAlgorithm();
 
   66void QgsSlopeAlgorithm::initAlgorithm( 
const QVariantMap & )
 
   76  QgsRasterLayer *inputLayer = parameterAsRasterLayer( parameters, QStringLiteral( 
"INPUT" ), context );
 
   81  const double zFactor = parameterAsDouble( parameters, QStringLiteral( 
"Z_FACTOR" ), context );
 
   83  const QString outputFile = parameterAsOutputLayer( parameters, QStringLiteral( 
"OUTPUT" ), context );
 
   84  const QFileInfo fi( outputFile );
 
   88  slope.setZFactor( zFactor );
 
   89  slope.processRaster( feedback );
 
   92  outputs.insert( QStringLiteral( 
"OUTPUT" ), outputFile );
 
@ Double
Double/float values.
 
QString source() const
Returns the source for the layer.
 
Contains information about the context in which a processing algorithm is executed.
 
Custom exception class for processing related exceptions.
 
Base class for providing feedback from a processing algorithm.
 
A numeric parameter for processing algorithms.
 
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
 
A raster layer parameter for processing algorithms.
 
static QString driverForExtension(const QString &extension)
Returns the GDAL driver name for a specified file extension.
 
Represents a raster layer.
 
Calculates slope values in a window of 3x3 cells based on first order derivatives in x- and y- direct...