[Bug]: lwc 3.7.0 raster - symbology
What is the bug?
qgis desktop 3.22.16
LWC 3.6.8
===========
qgis desktop 3.28.13
LWC 3.7.0
Steps to reproduce the issue
.
Versions
Versions :
- Lizmap Web Client : 3.7.0
- Lizmap plugin : 4.1.1
- QGIS Desktop : 3.28.13
- QGIS Server : 3.28.13
- Py-QGIS-Server : not used
- QGIS Server plugin atlasprint : 3.3.2
- QGIS Server plugin lizmap_server : 2.8.1
- QGIS Server plugin wfsOutputExtension : 1.8.0
List of safeguards :
- Mode : normal
- Allow parent folder : no
- Prevent other drive : no
- Prevent PG service : no
- Prevent PG Auth DB : no
- Force PG user&pass : no
- Prevent ECW : no
Check Lizmap plugin
- [X] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.
Operating system
Ubuntu 22.04
Browsers
Firefox
Browsers version
Firefox 120.0.1
Relevant log output
No response
in case of linear interpolation, not for discrete or exact interpolation
Similar to https://github.com/qgis/QGIS/issues/55651 ?
no, only in case of linear interpolation type not for discrete or exact interpolation type
@josemvm in my LWC 3.7 the color ramp it's not rendered (there isn't a ramp in legend) as in screenshot below
respect to QGIS
in LWC 3.6.9 it seems compressed as in screenshot below
so I confirm the Issue
@Antoviscomi thanks maybe a qgis server bug...
Lizmap is taking the JSON legend from QGIS Server, as you can see in the ticket I mentioned earlier.
You can open your "developer tools" (F12), check the request made to QGIS server GetLegendGraphic and check the content of the JSON response. It's in the webbrowser.
@Gustry the url from lizmap doesn´t contain the GetLegendGraphic
myhost/index.php/lizmap/service?repository=ma&project=PIAAC-AC&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=default&TRANSPARENT=true&LAYERS=lst_inv_ac&DPI=96&WIDTH=2080&HEIGHT=475&CRS=EPSG%3A3763&BBOX=-253278.93184485074%2C-179934.01850668347%2C297055.50215735065%2C-54256.68381868075&ts=1707138769681
i can replace the request for myhost/index.php/lizmap/service?repository=ma&project=PIAAC-AC&REQUEST=GetLegendGraphic&FORMAT=image&&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=default&TRANSPARENT=true&LAYERS=lst_inv_ac&DPI=96&WIDTH=2080&HEIGHT=475&CRS=EPSG%3A3763&BBOX=-253278.93184485074%2C-179934.01850668347%2C297055.50215735065%2C-54256.68381868075&ts=1707138769681
and get:
This a GetLegendGraphic as a picture. Now, Lizmap use the GetLegendGraphic as JSON, to be able to have a checkbox
@Gustry here in LWC 3.6.9 the request is:
http://myhost/webgis/index.php/lizmap/service?repository=tempor&project=ProvaFiles&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=orto2008&STYLE=predefinito&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&TRANSPARENT=TRUE&WIDTH=150&LAYERFONTSIZE=0&ITEMFONTSIZE=9&SYMBOLSPACE=1&ICONLABELSPACE=2&DPI=96&RULELABEL=AUTO&LAYERSPACE=0&LAYERFONTBOLD=FALSE&LAYERTITLE=FALSE&SCALE=75000
and this it's the result
in 3.7 there is not a similar request in browser's 'developer tools'
in 3.7 there is not a similar request in browser's 'developer tools'
There is, check my screenshot, it's a POST request. There must be a GetLegendGraphic request ... it's the only way to ask QGIS server for the legend.
@Gustry there is not a request GetLegendGraphic on mine that's all
only in Payload it is, and no response in LWC 3.7
repository=tempor&project=ProvaFiles&SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.3.0&FORMAT=application%2Fjson&LAYER=edificicetraro_ctr%2Cterritori_boschi_foreste%2Corto2008&STYLES=predefinito%2Cpredefinito%2Cpredefinito
there is not a request GetLegendGraphic on mine that's all
In your screenshot, it's the last one. Click one it, you will see in the Request tab, then open the "Response tab" and paste the content here
@Gustry this is the response
{
"nodes": [
{
"symbols": [
{
"title": "Band 1"
},
{
"title": ""
}
],
"title": "Temperatura Massima (\u00b0C)",
"type": "layer",
"name": "orto2008",
"layerName": "Temperatura Massima (\u00b0C)"
}
],
"title": ""
}
There isn't any icon key in the JSON.
This JSON is generated by QGIS Server, it's a graphical legend in JSON format.
This issue must be reported in QGIS. When QGIS will be fixed, it's high probability that the icon will be displayed in Lizmap Web Client then.
@Gustry why in LWC 3.6.9 it works? There is not the same request?
- Before 3.7 : you can see your URL you have provided :
FORMAT=image/png, QGIS server must give back to Lizmap Web Client a PNG file - Now with 3.7, you can see
FORMAT=application/json, QGIS server must give back a JSON representation of the legend.
So the bug is quite similar to https://github.com/qgis/QGIS/issues/55651 as I mentioned before. QGIS server is skipping some layers in the JSON representation.
@Gustry So we could use the FORMAT=image/png request for raster layers?
@Gustry So we could use the FORMAT=image/png request for raster layers?
@Gustry is it possible fix it with the workaround above? this is a little annoying... in production environment
thanks
Yes @josemvm I know this issue, it's unfortunate and I understand... But there is nothing I can do here, I'm doing the same answer as on https://github.com/3liz/lizmap-web-client/issues/4328#issuecomment-2110317484 Feel free to contact us.
Given the work in https://github.com/3liz/qgis-lizmap-server-plugin/pull/77 we could notice that rendering the raster legend with QGIS < 3.34 is broken.
Supporting raster legend 3.7 will only work at least with QGIS 3.34.
@josemvm which version are you using ? @Antoviscomi We can see your request that this is a QGIS Server < 3.34
hi @Gustry i'am using qgis server 3.28
Supporting raster legend 3.7 will only work at least with QGIS 3.34
is the lwc 3.7 comaptible with qgis server 3.34?
???
@Antoviscomi We can see your request that this is a QGIS Server < 3.34
@Gustry the above request was february 5 dated, now I'm on 3.36 version of QGisServer but I've not looked at this issue anymore, so I cannot tell It's yet here. I can test it asap if needed
???
@josemvm We understand when there is a minimum of text and also when there is a single ?. It looks like https://github.com/3liz/lizmap-web-client/issues/4377
this is a little annoying... in production environment
This is annoying as well to read, when we are spending so many "unpaid" time trying to make an opensource product.
@Gustry the above request was february 5 dated, now I'm on 3.36 version of QGisServer but I've not looked at this issue anymore, so I cannot tell It's yet here. I can test it asap if needed
@Gustry this is the request from LWC 3.7.7 on QGISServer 3.36.2
{
"nodes": [
{
"symbols": [
{
"title": "Band 1: Red (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EzHh0bY\/0LLFsqyEKZMaTSfAN\/3qywElHlaZoTZXXT7EFeCHIbyWbngQekGC8A5j\/uFUlwDliI1PfPQ14ZsTvtSXKja1cnelfTqoERZ8oJ\/a7ZVajaNf8C5uAfAthJht8AAAAASUVORK5CYII=",
"max": 255,
"min": 0,
"title": ""
}
],
"title": "550041_ORTO",
"type": "layer",
"name": "l_550041_ORTO",
"layerName": "550041_ORTO"
}
],
"title": ""
}
and this is the result on LWC 3.7.7 Canvas and TOC
the legend is now visible but however it seems a little bit small
Thanks for checking @Antoviscomi
It's a pleasure @Gustry
@Gustry i'm sorry, you are right but i had no intention of hurting anyone or devaluing your work or project