24QString QgsHillshadeAlgorithm::name()
 const 
   26  return QStringLiteral( 
"hillshade" );
 
   29QString QgsHillshadeAlgorithm::displayName()
 const 
   31  return QObject::tr( 
"Hillshade" );
 
   34QStringList QgsHillshadeAlgorithm::tags()
 const 
   36  return QObject::tr( 
"dem,hillshade,terrain" ).split( 
',' );
 
   39QString QgsHillshadeAlgorithm::group()
 const 
   41  return QObject::tr( 
"Raster terrain analysis" );
 
   44QString QgsHillshadeAlgorithm::groupId()
 const 
   46  return QStringLiteral( 
"rasterterrainanalysis" );
 
   49QString QgsHillshadeAlgorithm::shortHelpString()
 const 
   51  return QObject::tr( 
"This algorithm calculates the hillshade of the Digital Terrain Model in input." )
 
   52         + QStringLiteral( 
"\n\n" )
 
   53         + QObject::tr( 
"The shading of the layer is calculated according to the sun position (azimuth and elevation)." );
 
   56QString QgsHillshadeAlgorithm::shortDescription()
 const 
   58  return QObject::tr( 
"Calculates the hillshade of a Digital Terrain Model." );
 
   61QgsHillshadeAlgorithm *QgsHillshadeAlgorithm::createInstance()
 const 
   63  return new QgsHillshadeAlgorithm();
 
   66void QgsHillshadeAlgorithm::initAlgorithm( 
const QVariantMap & )
 
   78  QgsRasterLayer *inputLayer = parameterAsRasterLayer( parameters, QStringLiteral( 
"INPUT" ), context );
 
   83  const double zFactor = parameterAsDouble( parameters, QStringLiteral( 
"Z_FACTOR" ), context );
 
   84  const double azimuth = parameterAsDouble( parameters, QStringLiteral( 
"AZIMUTH" ), context );
 
   85  const double vAngle = parameterAsDouble( parameters, QStringLiteral( 
"V_ANGLE" ), context );
 
   87  const QString outputFile = parameterAsOutputLayer( parameters, QStringLiteral( 
"OUTPUT" ), context );
 
   88  const QFileInfo fi( outputFile );
 
   92  hillshade.setZFactor( zFactor );
 
   93  hillshade.processRaster( feedback );
 
   96  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.