2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgshillshaderenderer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-01 22:24:24 +10:00
|
|
|
|
2016-05-25 11:09:25 +10:00
|
|
|
class QgsHillshadeRenderer : QgsRasterRenderer
|
|
|
|
{
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
A renderer for generating live hillshade models.
|
|
|
|
.. versionadded:: 2.16
|
|
|
|
%End
|
|
|
|
|
2016-05-25 11:09:25 +10:00
|
|
|
%TypeHeaderCode
|
2017-06-02 23:35:10 +02:00
|
|
|
#include "qgshillshaderenderer.h"
|
2016-05-25 11:09:25 +10:00
|
|
|
%End
|
|
|
|
public:
|
2016-06-01 22:24:24 +10:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
QgsHillshadeRenderer( QgsRasterInterface *input, int band, double lightAzimuth, double lightAltitude );
|
|
|
|
%Docstring
|
|
|
|
A renderer for generating live hillshade models.
|
|
|
|
\param input The input raster interface
|
|
|
|
\param band The band in the raster to use
|
|
|
|
\param lightAzimuth The azimuth of the light source
|
|
|
|
\param lightAltitude The altitude of the light source
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
virtual QgsHillshadeRenderer *clone() const /Factory/;
|
2016-05-25 11:09:25 +10:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Factory method to create a new renderer
|
|
|
|
\param elem A DOM element to create the renderer from.
|
|
|
|
\param input The raster input interface.
|
|
|
|
:return: A new QgsHillshadeRenderer.
|
|
|
|
:rtype: QgsRasterRenderer
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;
|
|
|
|
|
|
|
|
|
|
|
|
virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 );
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
virtual QList<int> usesBands() const;
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
|
|
|
|
int band() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the band used by the renderer
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
void setBand( int bandNo );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the band used by the renderer.
|
|
|
|
.. seealso:: band
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
double azimuth() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the direction of the light over the raster between 0-360.
|
|
|
|
.. seealso:: setAzimuth()
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
double altitude() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the angle of the light source over the raster.
|
|
|
|
.. seealso:: setAltitude()
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
double zFactor() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the Z scaling factor.
|
|
|
|
.. seealso:: setZFactor()
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
2016-06-01 13:52:33 +02:00
|
|
|
bool multiDirectional() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns true if the renderer is using multi-directional hillshading.
|
|
|
|
.. seealso:: setMultiDirectional()
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-06-01 13:52:33 +02:00
|
|
|
|
2016-05-25 11:09:25 +10:00
|
|
|
void setAzimuth( double azimuth );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Set the azimuth of the light source.
|
|
|
|
\param azimuth The azimuth of the light source, between 0 and 360.0
|
|
|
|
.. seealso:: azimuth()
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setAltitude( double altitude );
|
|
|
|
%Docstring
|
|
|
|
Set the altitude of the light source
|
|
|
|
\param altitude the altitude
|
|
|
|
.. seealso:: altitude()
|
|
|
|
%End
|
2016-05-25 11:09:25 +10:00
|
|
|
|
|
|
|
void setZFactor( double zfactor );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Set the Z scaling factor of the result image.
|
|
|
|
\param zfactor The z factor
|
|
|
|
.. seealso:: zFactor()
|
|
|
|
%End
|
2016-06-01 13:52:33 +02:00
|
|
|
|
|
|
|
void setMultiDirectional( bool isMultiDirectional );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Sets whether to render using a multi-directional hillshade algorithm.
|
|
|
|
\param isMultiDirectional set to true to use multi directional rendering
|
|
|
|
.. seealso:: multiDirectional()
|
|
|
|
%End
|
|
|
|
|
2016-05-25 11:09:25 +10:00
|
|
|
};
|
2017-06-02 23:35:10 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgshillshaderenderer.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|