<div dir="ltr">Responding to myself.<div><br></div><div>It turns out it is possible to use renderer.writeXML to access altitude and azimuth values:</div><div><br></div><div>#r = rasterlayer.renderer()</div><div>import PyQt4.QtXml as qx</div><div>doc = qx.QDomDocument()</div><div>lElement=doc.createElement('rasterlayer') #some required parent tag</div><div>r.writeXML(doc, lElement)</div><div>rElement=lElement.firstChild().toElement()</div><div>azimuth_string=rElement.attribute('azimuth')</div><div><br></div><div>Pretty involved but doable. Looks like I get better used to QtXml. It seems better than python ElementTree anyways.</div><div>Or is there another way ?</div><div><br></div><div>How 'heavy' is importing QtXml from a Python perspective ? Something to be avoided ?</div><div><br></div><div>Thanks, Andreas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 8, 2017 at 4:00 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I cannot figure how I can access the .altitude() and .azimuth() functions of the QgsHillshadeRenderer implementing the QgsRasterRenderer of a QgsRasterLayer.<div><br></div><div>I can get the QgsRasterRenderer via the .renderer() function of the QgsRasterLayer and it return the correct 'hillshade' type via .type() but I cannot get further.</div><div><br></div><div>Any hints ? Do i need to use .writeXML into a Document to get these values ?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- <br><div class="m_-7318789774565956984gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div>