Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS-Server wrong legend generation if scale parameter is present #18882

Closed
qgib opened this issue Jun 5, 2014 · 10 comments
Closed

QGIS-Server wrong legend generation if scale parameter is present #18882

qgib opened this issue Jun 5, 2014 · 10 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server

Comments

@qgib
Copy link
Contributor

qgib commented Jun 5, 2014

Author Name: aperi2007 - (aperi2007 -)
Original Redmine Issue: 10470
Affected QGIS version: master
Redmine category:qgis_server
Assignee: Marco Hugentobler


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:

thsi is is with 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

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.


@qgib
Copy link
Contributor Author

qgib commented Jun 5, 2014

Author Name: aperi2007 - (aperi2007 -)


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

@qgib
Copy link
Contributor Author

qgib commented Jun 5, 2014

Author Name: Giovanni Manghi (@gioman)


why blocker? it used to work in previous qgis releases?


  • category_id was configured as QGIS Server
  • version was changed from 2.2.0 to master

@qgib
Copy link
Contributor Author

qgib commented Jun 6, 2014

Author Name: Marco Hugentobler (@mhugent)


  • assigned_to_id was configured as Marco Hugentobler

@qgib
Copy link
Contributor Author

qgib commented Jun 6, 2014

Author Name: aperi2007 - (aperi2007 -)


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 With 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&scale=7927.372584308516

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 with 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

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.

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: Marco Hugentobler (@mhugent)


What is the style of the layer (rule based renderer?), could you attach a .qml file?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: aperi2007 - (aperi2007 -)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: aperi2007 - (aperi2007 -)


Hi.

I confirm the problem is also with more simple qml.

This as example:
With the scale parameter the last domains are lost.

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=depositisuperficiali&style=default&legend_options=fontName:Verdana;fontSize:10&scale=7927.372584308516

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.


  • 7418 was configured as depositisuperficiali.zip

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: Marco Hugentobler (@mhugent)


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 (d8a0361) ? Though I cannot see how that fix would have any influence on the size of the generated image...

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: aperi2007 - (aperi2007 -)


ok,
Yes I confirm.
I have update the server to the last updates truk and the ussue is disappeared.

Thx Marco,

A.

@qgib
Copy link
Contributor Author

qgib commented Jun 12, 2014

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented
  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server
Projects
None yet
Development

No branches or pull requests

1 participant