[gdal-dev] WMTS generating GET URL problem
Michał Kowalczuk
michkowalczuk at gmail.com
Fri Dec 13 04:43:08 PST 2024
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/5e2f2a2f/attachment.htm>
More information about the gdal-dev
mailing list