[Qgis-developer] (python) access to QgsHillshadeRenderer of raster layer ?

Andreas Plesch andreasplesch at gmail.com
Sun Apr 9 15:30:24 PDT 2017


>
> Date: Sat, 8 Apr 2017 13:51:43 -0700 (MST)
> From: Tom Chadwin <tom.chadwin at nnpa.org.uk>
>
> They should be there:
>
> https://qgis.org/api/classQgsHillshadeRenderer.html
>
>
>
Thanks. Yes, they are there. The problem is I cannot find a way to get to
the QgisHillshadeRenderer itself, from the QgsRasterLayer.
QgsRasterLayer.renderer() only provides QgsRasterRenderer. Anyways, the
.writeXML approach works well enough. [ It is a bit strange that the
altitude is named angle as an xml attribute. ]

Ideally, I would want to get the lightAzimuth and lightAltitude values from
the hillshaderendererwidget used in the layer properties gui . Is there a
way to get that from a processing python script (or plugin)? The idea is to
use existing values provided in the nice existing GUIs as much as possible.

-Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170409/905b1fe1/attachment.html>


More information about the Qgis-developer mailing list