[Qgis-developer] WMS uncorrect rendering using "Simple Rendering" method

Luigi Pirelli luipir at gmail.com
Wed Aug 13 10:22:50 PDT 2014


Hi

I've a problem rendering WMS usign "simple rendering" as in:
http://docs.qgis.org/2.2/en/docs/pyqgis_developer_cookbook/composer.html#simple-rendering

I noticed that WMS calls during rendering add an uncorrect dpi
resolution parameter set to 0
and this value is set by this call:
https://github.com/qgis/QGIS/blob/master/src/core/raster/qgsrasterlayerrenderer.cpp#L158

commenting that line rendering is correct, but in this moment I don't
know If this call is wrong or I'm wrong forgetting to set something in
the renderContext.

my code is here:
https://github.com/faunalia/rt_omero/blob/2.0/SchedaEdificio.py#L315

dpi value is set correctly here:
https://github.com/faunalia/rt_omero/blob/2.0/SchedaEdificio.py#L326

but its' value is overridden with 0 during rendering all the layers.

Please help me to understand if it's a bug or my fault

Thank you, Luigi Pirelli (luigi.pirelli at faunalia.it - luipir at gmail.com)

NOTE:
render is ok using saveAsImage method in mapCanvas as in:
https://github.com/faunalia/rt_omero/blob/2.0/SchedaEdificio.py#L227

p.s I added Martin Dobias in cc because is the author of:
https://github.com/qgis/QGIS/blob/master/src/core/raster/qgsrasterlayerrenderer.cpp#L158


More information about the Qgis-developer mailing list