Bug report #10470
QGIS-Server wrong legend generation if scale parameter is present
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Marco Hugentobler | ||
Category: | QGIS Server | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18882 |
Description
Hi,
I'm testing the qgis-server from trunk version.
I see that the legend graphics return from a GetLegendGraphics request if truncate if there the scale parameter.
some samples:
And this is the same without the scale parameter.
http://www502.regione.toscana.it/geoscopio_qg/cgi-bin/qgis_mapserv?map=continuum_geologico_rt.qgs&SERVICE=WMS&request=GetLegendGraphic&version=1.1.1&format=image/png&sld_version=1.1.0&width=23&height=15&layer=frane&style=default&legend_options=fontName:Verdana;fontSize:10&scale=7927.372584308516
Regards,
Andrea.
History
#1 Updated by aperi2007 - over 10 years ago
oops, the second was always with scale parameter.
this is really without scale parameter:
www502.regione.toscana.it/geoscopio_qg/cgi-bin/qgis_mapserv?map=continuum_geologico_rt.qgs&SERVICE=WMS&request=GetLegendGraphic&version=1.1.1&format=image/png&sld_version=1.1.0&width=23&height=15&layer=frane&style=default&legend_options=fontName:Verdana;fontSize:10
#2 Updated by Giovanni Manghi over 10 years ago
- Category set to QGIS Server
- Affected QGIS version changed from 2.2.0 to master
why blocker? it used to work in previous qgis releases?
#3 Updated by Marco Hugentobler over 10 years ago
- Assignee set to Marco Hugentobler
#4 Updated by aperi2007 - over 10 years ago
I confirm it was also on QGIS 2.2 ,
but now is more badly.
Infact This is a sample from qgis-server 2.2:
QGIS 2.2 without the scale parameter:
http://www502.regione.toscana.it/wmsraster2/qgis/wms?map=/maps/zz_contgeo.qgs&SERVICE=WMS&request=GetLegendGraphic&version=1.1.1&format=image/png&sld_version=1.1.0&width=23&height=15&layer=franacart&style=default&legend_options=fontName:Verdana;fontSize:10
As yiu can see it break on the last domain.
So the user can effectlively see something , and all doamins are more or less visible.
INSTEAD
in qgis 2.4 this is the situation:
QGIS 2.4 without the scale parameter:
http://www502.regione.toscana.it/geoscopio_qg/cgi-bin/qgis_mapserv?map=continuum_geologico_rt.qgs&SERVICE=WMS&request=GetLegendGraphic&version=1.1.1&format=image/png&sld_version=1.1.0&width=23&height=15&layer=frane&style=default&legend_options=fontName:Verdana;fontSize:10
As you can see on QGIS 2.4 it lost fully two domains and a third is half.
So the QGIS 2.4 situation is worst than QGIS 2.2.
guess the Legend readability is an important question for a GIS system.
And I guess this is a worst question.
Of course this is only my opinion.
But effectively this is not a blocking question because as a workaround,
I could add two fake domains to be the last two values and invisibles (all white) to enlarge the image and retrieve so the two lost.
:)
Regards,
Andrea.
#5 Updated by Marco Hugentobler over 10 years ago
- Status changed from Open to Feedback
What is the style of the layer (rule based renderer?), could you attach a .qml file?
#6 Updated by aperi2007 - over 10 years ago
Is a categorized rendering.
The QML of that image is quite complex because has a dual level rendering for every domains and with a point pattern inside using SVGs.
and also a data-definition use for rotation of patterns and also an expression controlled color border.
I will try to test and reproduce the bug on a more simple qml.
#7 Updated by aperi2007 - over 10 years ago
- File depositisuperficiali.zip added
Hi.
I confirm the problem is also with more simple qml.
This as example:
With the scale parameter the last domains are lost.
The qmls of this legend map is more simple than other and I can share the QML.
I attach it to this thread.
Regards,
Andrea.
#8 Updated by Marco Hugentobler over 10 years ago
Ok, I imported the qml to my simple test project (layer does not match, but it does not matter for LegendGraphic). Issuing the example request (only map and layer params replaced), I get the full legend with and without scale parameter.
I've committed a fix for a crash about an hour ago. Are you also working with that version (d8a0361febf6a52cd47bfca8f753afbf2d0bd153) ? Though I cannot see how that fix would have any influence on the size of the generated image...
#9 Updated by aperi2007 - over 10 years ago
ok,
Yes I confirm.
I have update the server to the last updates truk and the ussue is disappeared.
Thx Marco,
A.
#10 Updated by Giovanni Manghi over 10 years ago
- Resolution set to fixed/implemented
- Status changed from Feedback to Closed