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

WMST layer timeDimensionExtent hard-coded in source URI does not update #54043

Open trey-stafford opened 1 year ago

trey-stafford commented 1 year ago

What is the bug or the crash?

Temporally-enabled WMST layers with "Automatic" Dynamic Temporal Control do not update with a hard-coded timeDimensionExtent.

I have a project file with temporally-enabled WMST layers. When added to the project, these layers get a "Source" URI that looks like, e.g., this:

allowTemporalUpdates=true&contextualWMSLegend=0&crs=EPSG:3413&dpiMode=7&featureCount=10&format=image/png&layers=MODIS_Aqua_CorrectedReflectance_TrueColor&styles&temporalSource=provider&timeDimensionExtent=2002-07-03/2023-08-01/P1D&type=wmst&url=https://gibs.earthdata.nasa.gov/wms/epsg3413/best/wms.cgi?VERSION%3D1.3.0

Note TimeDimensionExtent=2002-07-03/2023-08-01/P1D. Despite allowTemporalUpdates=true, the temporal controller appears to use the fixed, hard-coded TimeDimensionExtent even when the getCapabilities request provides an updated value for timeDimensionExtent.

I tried removing the timeDimensionExtent from the layer URI. This results in the "Fixed time range" option to show NULL values for the Start date and End date.

latestScreen

With the Automatic option enabled, I would expect QGIS to, on project load, automatically query the layer's capabilities to determine the TimeDimensionExtent. This does not seem to be the case, however. When trying to set the "Animation range" in the Temporal Controller, the layer in question no longer shows up as an option.

Steps to reproduce the issue

I have attached two project files (renamed from .qgz -> .zip to support upload to github):

Temporal controller shows fixed animation range based on hard-coded timeDimensionExtent

The fixed time range is null and the temporal controller does not show a correct animation range

Open and inspect each of these cases to see that the temporal controller has an outdated view of the layer's temporal extent. QGIS appears to query the getCapabilities document for GIBS, which includes the updated timeDimensionExtent when the project is loaded, so I would expect this value to get updated. It does not.

Versions

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

QGIS version | 3.28.7-Firenze | QGIS code branch | Release 3.28 -- | -- | -- | -- Qt version | 5.15.8 Python version | 3.10.11 GDAL/OGR version | 3.6.4 PROJ version | 9.2.0 EPSG Registry database version | v10.082 (2023-02-06) GEOS version | 3.11.2-CAPI-1.17.2 SQLite version | 3.42.0 Compiled against PDAL | 2.5.3 | Running against PDAL | 2.5.4 PostgreSQL client version | unknown SpatiaLite version | 5.0.1 QWT version | 6.2.0 QScintilla2 version | 2.14.0 OS version | Pop!_OS 22.04 LTS   |   |   |   Active Python plugins valuetool | 3.0.15 qlyrx | 0.3.3 menu_from_project | v2.0.8 db_manager | 0.1.20 sagaprovider | 2.12.99 grassprovider | 2.12.99 processing | 2.12.99 MetaSearch | 0.3.6 QGIS version 3.28.7-Firenze QGIS code branch [Release 3.28](https://github.com/qgis/QGIS/tree/release-3_28) Qt version 5.15.8 Python version 3.10.11 GDAL/OGR version 3.6.4 PROJ version 9.2.0 EPSG Registry database version v10.082 (2023-02-06) GEOS version 3.11.2-CAPI-1.17.2 SQLite version 3.42.0 Compiled against PDAL 2.5.3 Running against PDAL 2.5.4 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.2.0 QScintilla2 version 2.14.0 OS version Pop!_OS 22.04 LTS Active Python plugins valuetool 3.0.15 qlyrx 0.3.3 menu_from_project v2.0.8 db_manager 0.1.20 sagaprovider 2.12.99 grassprovider 2.12.99 processing 2.12.99 MetaSearch 0.3.6 ### Supported QGIS version - [X] I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule). ### New profile - [X] I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles) ### Additional context _No response_
trey-stafford commented 1 year ago

There are other times we would also expect QGIS to update a WMST layer's temporal extent. For example: