Bug report #20810
QGIS Server 3 - drawing order of grouped layer
|Affected QGIS version:||3.4.2||Regression?:||Yes|
|Operating System:||Xubuntu 18.04, Windows 7 64bit||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28629|
I noticed problems with the drawing order of grouped layers on QGIS Server 3. If I load a WMS service consisting of several (grouped) layers completely into a desktop GIS, everything is fine. However, if I load several single layers from this WMS service, area and line layers of a grouped layer are drawn first and "painted over" by other layers (e.g. raster data, see attached screenshots). That's not the expected behavior and with QGIS Server 2 this problem doesn't exist.
I add a QGIS project file and a geopackage with sample data (see attached zip-file qs3.zip).
[server] Fix layer order rendering when layers are in groups (#8796)
- [server] Fix layer order rendering when layers are in groups
- Update test images
- [server] Fix order of layers in subgroups
basically: layers in WMS is specified in a comma separated
list where leftmost layer is drawn first (it's at the bottom)
and QGIS layer order is exactly the opposite: first layer
in the TOP (topmost) is drawn last (it is at the top).
For this reason the server reverses the list before passing
it to the renderer.
- Fix order of layers in test
- Update src/server/services/wms/qgswmsrenderer.cpp
#3 Updated by Alessandro Pasotti almost 2 years ago
- Status changed from Open to Feedback
I don't see any issue with drawing order with current QGIS master, can you please add the exact WMS calls that are causing the problem?
#4 Updated by Burghardt Scholle almost 2 years ago
thank you so much for taking care of this problem.
I have done tests with the current QGIS Master (for me: code revision d59a346560). The problem still persists. Unfortunately, I can't serve on the fast with an accurate WMS call :-(. Alternatively, I have made two screenshots of possible settings when adding layers using the "Data Source Manager" in QGIS Desktop. I hope that's sufficient.