[gdal-dev] WMTS generating GET URL problem

Michał Kowalczuk michkowalczuk at gmail.com
Fri Dec 13 06:02:29 PST 2024


I did it before I wrote here :-)
Thank you for your time.

Regards,
Michał Kowalczuk

pt., 13 gru 2024 o 14:52 Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>
napisał(a):

> Hi,
>
>
>
> The idea behind all standardization work is not that every single client
> must be made to deal with servers which break the standard. Contact the
> server provided and ask them to fix their configuration. There seems to be
> a contact address in GetCapabilities <ows:ElectronicMailAddress>
> irisline at paradigm.brussels</ows:ElectronicMailAddress>
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* Michał Kowalczuk <michkowalczuk at gmail.com>
> *Lähetetty:* perjantai 13. joulukuuta 2024 15.38
> *Vastaanottaja:* Rahkonen Jukka <jukka.rahkonen at maanmittauslaitos.fi>
> *Kopio:* gdal-dev at lists.osgeo.org
> *Aihe:* Re: [gdal-dev] WMTS generating GET URL problem
>
>
>
> 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.rahkonen at 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-bounces at lists.osgeo.org> *Puolesta *Michal
> Kowalczuk via gdal-dev
> *Lähetetty:* perjantai 13. joulukuuta 2024 14.43
> *Vastaanottaja:* gdal-dev at 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 <michkowalczuk at 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ł
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241213/1914aa04/attachment.htm>


More information about the gdal-dev mailing list