3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
248 stars 141 forks source link

[Bug]: LMWC: 3.7.8 Trying to print in EPSG: 2193 results in flipped coordinates/failed map? #4558

Open timbo-barnes opened 6 days ago

timbo-barnes commented 6 days ago

Screenshot 2024-06-27 123002

What is the bug? (in English)

My existing projects in LMWC 3.6.3 worked fine using the 'old' basemap method- Users could use the normal print dialogue to print a custom map or an Atlas map. Maps are in New Zealand Transverse Mercator (2193) including the base layers (WMTS)

Now in 3.7.8, I can't print using the print button (atlas prints work fine)- It appears the dataframe is somehow flipped so eastings are northings and northings are eastings which, obviously, positions the dataframe somewhere completely different. This happens if using a basemap layer (within the new basemap group), a basemap WMTS outside the group as a normal layer, or with no basemap at all (just trying to print vectors in 2193)

Steps to reproduce the issue

Setup a project in NZ Transverse Mercator (EPSG: 2193), add some layers and a layout. Try and print using the print button.

Versions, safeguards, check summary etc

Versions :

List of safeguards :
* Mode : normal * Allow parent folder : no * Prevent other drive : yes * Prevent PG service : no * Prevent PG Auth DB : yes * Force PG user&pass : yes * Prevent ECW : yes

Check Lizmap plugin

Operating system

Ubuntu Linux 22.04.2

Browsers

Chrome, Microsoft Edge

Browsers version

Chrome: 126.0.6478.114, Edge: 125.0.2535.92

Relevant log output

No Lizmap error logs. Below is the payload/response from Google Chrome> Developement tools

SERVICE: WMS
REQUEST: GetPrint
VERSION: 1.3.0
FORMAT: pdf
TRANSPARENT: true
CRS: EPSG:2193
DPI: 100
TEMPLATE: Test normal
map0:EXTENT: 1794253.0933229104,5664179.919535279,1804703.0933229104,5671629.919535279
map0:SCALE: 50000
map0:LAYERS: forests,infrastructure_tracks_roads,infrastructure_poly
map0:STYLES: forests,infrastructure_tracks_roads,infrastructure_poly
map0:OPACITIES: 255,255,153
Gustry commented 5 days ago

QGIS Server : 3.30.3

We do not recommend any non LTR version, QGIS 3.30 is not supported anymore. Can you try on latest QGIS Server 3.34, thanks. I think we already got a similar issue which has been fixed.

timbo-barnes commented 2 days ago

QGIS Server : 3.30.3

We do not recommend any non LTR version, QGIS 3.30 is not supported anymore. Can you try on latest QGIS Server 3.34, thanks. I think we already got a similar issue which has been fixed.

Ok thanks for the feedback- Is the server version confirmed to be causing it? Or just something to check on the way to fixing it? (The reason I ask is that its taken many months to get Lizmap +QGIS Server upgraded and may be difficult to get server upgraded)

Gustry commented 1 day ago

I don't know. According to the QGIS roadmap, your versions are out dated for more than a year now. A lot of commits have landed in the QGIS source code in between.