24 QString QgsHillshadeAlgorithm::name()
 const 
   26   return QStringLiteral( 
"hillshade" );
 
   29 QString QgsHillshadeAlgorithm::displayName()
 const 
   31   return QObject::tr( 
"Hillshade" );
 
   34 QStringList QgsHillshadeAlgorithm::tags()
 const 
   36   return QObject::tr( 
"dem,hillshade,terrain" ).split( 
',' );
 
   39 QString QgsHillshadeAlgorithm::group()
 const 
   41   return QObject::tr( 
"Raster terrain analysis" );
 
   44 QString QgsHillshadeAlgorithm::groupId()
 const 
   46   return QStringLiteral( 
"rasterterrainanalysis" );
 
   49 QString 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)." );
 
   56 QgsHillshadeAlgorithm *QgsHillshadeAlgorithm::createInstance()
 const 
   58   return new QgsHillshadeAlgorithm();
 
   61 void QgsHillshadeAlgorithm::initAlgorithm( 
const QVariantMap & )
 
   76   QgsRasterLayer *inputLayer = parameterAsRasterLayer( parameters, QStringLiteral( 
"INPUT" ), context );
 
   81   double zFactor = parameterAsDouble( parameters, QStringLiteral( 
"Z_FACTOR" ), context );
 
   82   double azimuth = parameterAsDouble( parameters, QStringLiteral( 
"AZIMUTH" ), context );
 
   83   double vAngle = parameterAsDouble( parameters, QStringLiteral( 
"V_ANGLE" ), context );
 
   85   const QString outputFile = parameterAsOutputLayer( parameters, QStringLiteral( 
"OUTPUT" ), context );
 
   86   QFileInfo fi( outputFile );
 
   90   hillshade.setZFactor( zFactor );
 
   91   hillshade.processRaster( feedback );
 
   94   outputs.insert( QStringLiteral( 
"OUTPUT" ), outputFile );
 
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.
@ Double
Double/float values.
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.