so maybe this little fix for this should be madę in gdal. if style isEmpty: style=„default”
W dniu pt., 13 gru 2024 o 14:32 Rahkonen Jukka < jukka.rahko...@maanmittauslaitos.fi> napisał(a): > Hi, > > > > By the standard Web Map Tile Service - Open Geospatial Consortium > <https://www.ogc.org/publications/standard/wmts/> ”style” seems to be > mandatory in the layer data “One or more (mandatory)”. > > And within “style”, the identifier is mandatory “An unambiguous reference > to this style, identifying a specific version when needed, normally used by > software”; multiplicity: One (mandatory). > > I would say that this is a server side misconfiguration. Each style must > have an identifier, even the default style. But the server does still > understand the style named as “default”: > > https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/Ortho/default/EPSG:4326/EPSG:4326:7/27/129?format=image/jpeg > > > > -Jukka Rahkonen- > > > > *Lähettäjä:* gdal-dev <gdal-dev-boun...@lists.osgeo.org> *Puolesta *Michal > Kowalczuk via gdal-dev > *Lähetetty:* perjantai 13. joulukuuta 2024 14.43 > *Vastaanottaja:* gdal-dev@lists.osgeo.org > *Aihe:* Re: [gdal-dev] WMTS generating GET URL problem > > > > Sorry for the mistake in the last email. Instead of pasting * gfdalinfo > *command > i should paste this: > *gdal_translate -srcwin 0 0 12235811 6137602 -outsize 512 512 > "WMTS:https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326 > <https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326>" > tile.png --debug on --config GDAL_ENABLE_WMS_CACHE NO* > > > > pt., 13 gru 2024 o 13:15 Michał Kowalczuk <michkowalc...@gmail.com> > napisał(a): > > Hi, > > Consider the following WMTS server: > *https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts > <https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts>* > > > > One of the subdataset path generated by GDAL is > > *WMTS:https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326 > <https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326>* > > > > When I try to download a map I notice URL issue/error. > > *gdalinfo > "WMTS:https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326 > <https://geoservices-urbis.irisnet.be/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=Ortho,tilematrixset=EPSG:4326>" > tile.png --debug on --config GDAL_ENABLE_WMS_CACHE NO* > > > > from debug: > *HTTP: Requesting [1/4] > https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/Ortho > <https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/Ortho>//EPSG:4326/EPSG:4326:7/27/129?format=image/jpeg* > > look at the double slash (//) chars in the above URL > > > > When you go to service Capabilities you can find the following resource > URL: > > * <ResourceURL format="image/jpeg" resourceType="tile" > template="https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/urbisNL/ > <https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/urbisNL/>{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg"/>* > > > > but in the layer definition *Style* tag is empty: > > > > *<Style isDefault="true"> <ows:Identifier/> </Style>* > > > > This is probably the reason that GDAL make path using an empty string and > this generate double slash chars. > > > > If you remove redundant slash the server responses and returns a tile, the > example: > > *https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/Ortho/EPSG:4326/EPSG:4326:14/3567/16784?format=image/jpeg > <https://geoservices-urbis.irisnet.be/geowebcache/service/wmts/rest/Ortho/EPSG:4326/EPSG:4326:14/3567/16784?format=image/jpeg>* > > > > And the question is: is this service or GDAL bug? :-) > > > > Wouldn't it be a good idea for GDAL to check the URL path for correctness > before sending the request? > > > > Regards, > > Michał > > > > > >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev