Feature request #13085
Add WMS-T (time) support
|Category:||Web Services clients/WMS|
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||21152|
Add support for WMS with time support to Add WMS layer.
#2 Updated by David Forrest almost 5 years ago
QGIS is currently able to access a WMST service as a plain WMS serivice by awkwardly embedding the TIME=????& parameter in the URL and not letting the system use the URIs from the GetCapabilities document. For an example see http://gis.stackexchange.com/questions/34667/does-qgis-have-wms-t-wms-with-time-support/153709#153709
Maybe one way to make this improvement easier would be making the Layer/Properties/General/Layer Source an editable field so a user could manually update the optional parameters in the URL. If editing a layer's WMS service prefix string was programmatically accessible, then a plugin could perhaps be written to get the time and other optional dimensions from the capabilities document, and then provide UI tools to modify or control them.
As a sample use-case, the WMS-T service at http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?TIME=2005-08-29T13:10:00Z&LAYERS=nexrad-n0r-wmst&TRANSPARENT=TRUE&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities looks like it should have about 1 million rasters to play with.
#3 Updated by David Forrest almost 5 years ago
One can programmatically add and update a WMS-T layer like this:
urlWithParams = 'IgnoreGetFeatureInfoUrl=1&IgnoreGetMapUrl=1&contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/png&layers=nexrad-n0r-wmst&styles=&url=http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?TIME%3D2005-08-29T13:10:00Z%26LAYERS%3Dnexrad-n0r-wmst%26TRANSPARENT%3DTRUE%26VERSION%3D1.1.1%26' urlWithParams2 = 'IgnoreGetFeatureInfoUrl=1&IgnoreGetMapUrl=1&contextualWMSLegend=0&crs=EPSG:3857&dpiMode=7&featureCount=10&format=image/png&layers=nexrad-n0r-wmst&styles=&url=http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?TIME%3D2005-08-29T06:10:00Z%26LAYERS%3Dnexrad-n0r-wmst%26TRANSPARENT%3DTRUE%26VERSION%3D1.1.1%26' rlayer = QgsRasterLayer(urlWithParams, 'radar WMST timeV2', 'wms') QgsMapLayerRegistry.instance().addMapLayer(rlayer) #update to different time rlayer.dataProvider().setDataSourceUri(urlWithParams2) rlayer.dataProvider().reloadData() rlayer.triggerRepaint()
#6 Updated by Anita Graser over 2 years ago
- Description updated (diff)
TimeManager implements browsing WMS-T layers but it only helps for visualizations. Missing TIME parameters cause GetFeatureInfo requests to fail - or more specifically - Geoserver will assume some default time value which is inconsistent with the currently visualized time in QGIS.
#7 Updated by Nicolas Boisteault about 2 years ago
Issue still exists in QGIS 3.0.
Tests can be made with this http://sampleserver6.arcgisonline.com/arcgis/services/MultiDimensional_Sample/MapServer/WMSServer?request=GetCapabilities&service=WMS