qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.29k stars 2.96k forks source link

Temporal WMS-T properties/settings ignored when multiple WMS layers are used #50270

Open rduivenvoorde opened 1 year ago

rduivenvoorde commented 1 year ago

What is the bug or the crash?

The WMS provider and more in general a WMS, can be called one (wms) layer at a time (&layers=foo), but also several layers (in one request), like: "&layers=foo,bar".

Having 2 (geoserver) wms layers, BOTH temporal enabled (server-side and QGIS side), all is fine as long as I load them one by one in QGIS

BUT: when you create one QGIS layer with multiple wms layers in it, like this:

gnome-shell-screenshot-d7lr4a

the temporal machinery breaks: you can still 'check' temporal proerties for this layer:

gnome-shell-screenshot-cb0bp1

But if you do only the 'Fixed time range' is available:

gnome-shell-screenshot-mmoy6

BUT if you use that (to have a valid begin/end time for the (sub)layers:

gnome-shell-screenshot-ag9cn0

There is NO temporal filter part in the URL's that are fired to the server, the "&TIME=2022-08-21T23:00:00Z/2022-08-22T09:00:00Z" is missing.

Steps to reproduce the issue

I think I understand why it is not working (yet), because having multiple sub-layers, means that you have to check the dimensions in the capabilities of all sublayer, and 'merge' these to one (as that one is used to 'set' the max of the TemporalController.

But in the code I cannot find (in the temporal part) any notion of 'mActiveSubLayers'...

Versions

QGIS version 3.27.0-Master QGIS code revision a556f6c5309
Qt version 5.15.4
Python version 3.10.7
GDAL/OGR version 3.5.2
PROJ version 9.1.0
EPSG Registry database version v10.074 (2022-08-01)
GEOS version 3.11.0-CAPI-1.17.0
SQLite version 3.39.3
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Debian GNU/Linux bookworm/sid

Supported QGIS version

New profile

Additional context

No response

rduivenvoorde commented 1 year ago

@Samweli are you aware if this should work or not? I think it just needs work

Another observation: manually adding a valid &TIME= parameter the right layer images is returned, so it is not an issue (Geo)server side

It's a pity we do not have some public (QGIS/Geo)server running with some test layers for this kind of issues to test/show.

Samweli commented 1 year ago

@Samweli are you aware if this should work or not? I think it just needs work

@rduivenvoorde as you highlighted there is no support for the WMS-T sublayers yet, so it shouldn't work.

We only need to update the WMS provider in order to make it work, no need to make changes in the temporal controller.

rduivenvoorde commented 1 year ago

I'll add some info later, but just to let others know, that at least using pyqgis it IS working.

Except that you have to know/set the query params for both layers and styles should be separated: so THIS is NOT working:

... &layers=layer1,layer2,layer3&styles=style1,style2,style3

But THIS IS working:

&layers=layer1&layers=layer2&layers=layer3&styles=style1&styles=style2&styles=style3

And to be more precise: the number of styles params must be exact the same as the layers params.

Like for for my other WMS-T related issue: it would be great if we have some online test WMS(-T) server somewhere configured for this kind of things...