[Qgis-user] retrieve the Legend from wms using the SCALE parameter

Andrea Peri aperi2007 at gmail.com
Thu Feb 28 02:18:35 PST 2019

I notice that in qgis 2.18 and also in qgis 3.0
is not possible to retrieve the legend from the wms layer (using of course
the getLegendGraphic comand) apply-ing the SCALE parameter.

SCALE parameter is a STANDARD OGC parameter (optional) to retrieve the
at the actual scale

QGIS allow to retrieve the legend using the the CONTEXTUAL option.
But it is anot standard parameter.
The contextual is of course more powerful but is a not standard and so not
always all the wms support it.

So' actually the only option is the standard getlegendgraphics that
retrieve without the scale parameter.

This some time give wrong lgends.

I report two eample.

The first is a good legend retrieved using the SCALE parameter from a wms

The second is a good example of what mean "sometime" retrieve the legend
without the scale parameter.

The second example repeat three time the same domain because there are
three different rendering at three scale interval.
Without the scale parameter the wms send ALL the legend for EVERY scale

The first example instead using the sCALE parameter obtain the right legend
for the scale of the MAP.


Andrea Peri
. . . . . . . . .
qwerty àèìòù
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190228/2404a2c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legend_with_scale_parameter.gif
Type: image/gif
Size: 2520 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190228/2404a2c5/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legend_without_scale_parameter.gif
Type: image/gif
Size: 2407 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190228/2404a2c5/attachment-0001.gif>

More information about the Qgis-user mailing list