mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-03 00:04:37 -05:00
* QgsShadingRendering and pipe to render global elevation map * gdal utils with datatype and resampling method enum * raster layer elevation map * optimize raster elevation map with rotation * handle no data value in the map elevation raster pipe * mesh layer and some little fixes * fix nodata and hillshading z factor * render shading on layout * activate/deactivate the shading from ui * shading only for layer that have elevation * apply Z scale and offset of layer elevation properties * ui settings * allow elevation from point cloud even edl is deactivate for pointcloud * fix ui * sipify * Shading renderer widget in styling panel * icone for shading renderer settings widget * two methods to combin elevation * rewording * remove check box at the bottom of canvas * use band of elevation properties * fix styling pannel * render shading in layout * keep EDL point cloud shading individually * add shading rendering tests * add missing code for local EDL for point cloud * shading inactive by default * rework raster layer resampling * improve nodata in elevation map * don't allow elevation map with != size to be combined * remove EDL from point cloud * renaming * sipify * colorize tests * renaming * RGB32 * renaming leftover * some ui fixes * fix border for EDL alg * fix EDL closed next to nodata value * fix first shading when activated * renaming and typo * fixes for doc, doxygen, indentation and spelling * remove leftover member * fix clang-tidy * fix edl tests * fix dll export * minor fixes * adapt images of tests * fix narrowing * fix indentation * sipify * WIP * minor ui changes
204 lines
6.1 KiB
Plaintext
204 lines
6.1 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgselevationshadingrenderer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
class QgsElevationShadingRenderer
|
|
{
|
|
%Docstring(signature="appended")
|
|
This class can render elevation shading on an image with different methods (eye dome lighting, hillshading, ...).
|
|
|
|
An instance of this class supports the following settings:
|
|
|
|
- activate/deactivate elevation shading
|
|
- activate/deactivate a particular shading method
|
|
- parameters of each shading method
|
|
|
|
To render shading on image the caller call :py:func:`~renderShading` with the image and
|
|
an elevation map (see QgsElevationMap()) as parameters. The shading is applied on the image in place.
|
|
Elevation map and image must have same sizes.
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgselevationshadingrenderer.h"
|
|
%End
|
|
public:
|
|
QgsElevationShadingRenderer();
|
|
|
|
void renderShading( const QgsElevationMap &elevation, QImage &image, const QgsRenderContext &context ) const;
|
|
%Docstring
|
|
Render shading on ``image`` condidering the elevation map ``elevation`` and the renderer context ``context``
|
|
If elevation map and the image don't have same sizes, nothing happens.
|
|
%End
|
|
|
|
void setActive( bool active );
|
|
%Docstring
|
|
Sets whether this shading renderer is active.
|
|
%End
|
|
|
|
bool isActive() const;
|
|
%Docstring
|
|
Returns whether this shading renderer is active.
|
|
%End
|
|
|
|
void setActiveEyeDomeLighting( bool active );
|
|
%Docstring
|
|
Sets active the eye-dome lighting shading method.
|
|
%End
|
|
|
|
bool isActiveEyeDomeLighting() const;
|
|
%Docstring
|
|
Returns whether eye-dome lighting shading method is active
|
|
%End
|
|
|
|
double eyeDomeLightingStrength() const;
|
|
%Docstring
|
|
Returns the strength of the eye dome lighting method.
|
|
|
|
.. seealso:: :py:func:`setEyeDomeLightingStrength`
|
|
%End
|
|
|
|
void setEyeDomeLightingStrength( double strength );
|
|
%Docstring
|
|
Sets the ``strength`` of the eye dome lighting method.
|
|
|
|
.. seealso:: :py:func:`eyeDomeLightingStrength`
|
|
%End
|
|
|
|
double eyeDomeLightingDistance() const;
|
|
%Docstring
|
|
Returns the distance of the eye dome lighting method, that is the distance where the
|
|
effect is apply from the source elevation.
|
|
|
|
.. seealso:: :py:func:`setEyeDomeLightingDistance`
|
|
%End
|
|
|
|
void setEyeDomeLightingDistance( double distance );
|
|
%Docstring
|
|
Sets the distance of the eye dome lighting method, that is the distance where the
|
|
effect is apply from the source elevation.
|
|
|
|
.. seealso:: :py:func:`eyeDomeLightingDistance`
|
|
%End
|
|
|
|
QgsUnitTypes::RenderUnit eyeDomeLightingDistanceUnit() const;
|
|
%Docstring
|
|
Returns the unit of the distance of the eye dome lighting method returned by :py:func:`~QgsElevationShadingRenderer.eyeDomeLightingDistance`.
|
|
|
|
.. seealso:: :py:func:`setEyeDomeLightingDistanceUnit`
|
|
%End
|
|
|
|
void setEyeDomeLightingDistanceUnit( QgsUnitTypes::RenderUnit unit );
|
|
%Docstring
|
|
Sets the ``unit`` of the distance of the eye dome lighting method set by :py:func:`~QgsElevationShadingRenderer.setEyeDomeLightingDistance`.
|
|
|
|
.. seealso:: :py:func:`eyeDomeLightingDistanceUnit`
|
|
%End
|
|
|
|
void setActiveHillshading( bool active );
|
|
%Docstring
|
|
Sets active the hillshading
|
|
%End
|
|
|
|
bool isActiveHillshading() const;
|
|
%Docstring
|
|
Returns whether the hillshading is active
|
|
%End
|
|
|
|
double hillshadingZFactor() const;
|
|
%Docstring
|
|
Returns the z factor used by the hill shading method.
|
|
|
|
.. seealso:: :py:func:`setHillshadingZFactor`
|
|
%End
|
|
|
|
void setHillshadingZFactor( double zFactor );
|
|
%Docstring
|
|
Sets the z factor used by the hill shading method.
|
|
|
|
.. seealso:: :py:func:`hillshadingZFactor`
|
|
%End
|
|
|
|
bool isHillshadingMultidirectional() const;
|
|
%Docstring
|
|
Returns whether the hill shading method is multidirectional.
|
|
|
|
.. seealso:: :py:func:`setHillshadingMultidirectional`
|
|
%End
|
|
|
|
void setHillshadingMultidirectional( bool multiDirectional );
|
|
%Docstring
|
|
Sets whether the hill shading method is multidirectional.
|
|
|
|
.. seealso:: :py:func:`isHillshadingMultidirectional`
|
|
%End
|
|
|
|
double lightAltitude() const;
|
|
%Docstring
|
|
Returns the altitude of the light (degree) that can be used by some methods (e.g. hill shading).
|
|
|
|
.. seealso:: :py:func:`setLightAltitude`
|
|
%End
|
|
|
|
void setLightAltitude( double lightAltitude );
|
|
%Docstring
|
|
Sets the altitude of the light (degree) that can be used by some methods (e.g. hill shading).
|
|
|
|
.. seealso:: :py:func:`setLightAltitude`
|
|
%End
|
|
|
|
double lightAzimuth() const;
|
|
%Docstring
|
|
Returns the azimuth of the light (degree) that can be used by some methods (e.g. hill shading).
|
|
|
|
.. seealso:: :py:func:`setLightAltitude`
|
|
%End
|
|
|
|
void setLightAzimuth( double lightAzimuth );
|
|
%Docstring
|
|
Sets the azimuth of the light (degree) that can be used by some methods (e.g. hill shading).
|
|
|
|
.. seealso:: :py:func:`lightAzimuth`
|
|
%End
|
|
|
|
void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
|
|
%Docstring
|
|
Writes configuration on a DOM element
|
|
%End
|
|
|
|
void readXml( const QDomElement &element, const QgsReadWriteContext &context );
|
|
%Docstring
|
|
Reads configuration from a DOM element
|
|
%End
|
|
|
|
Qgis::ElevationMapCombineMethod combinedElevationMethod() const;
|
|
%Docstring
|
|
Returns the method used when conbining different elevation sources.
|
|
|
|
.. seealso:: :py:func:`setCombinedElevationMethod`
|
|
%End
|
|
|
|
void setCombinedElevationMethod( Qgis::ElevationMapCombineMethod method );
|
|
%Docstring
|
|
Sets the ``method`` used when conbining different elevation sources.
|
|
|
|
.. seealso:: :py:func:`combinedElevationMethod`
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgselevationshadingrenderer.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|