Hi, I read from the GetCapabilities that the URL template is like .../{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}
The size of tile matrix 1 "<ows:Identifier>1</ows:Identifier>" is <MatrixWidth>4</MatrixWidth> <MatrixHeight>3</MatrixHeight> The WMTS standard tells about TileCol "...else SHALL be any integer value between 0 and MatrixWidth - 1, see Table 14, (both included)" Thus TileCol 3 SHALL exist, but on that server it does not seem to exist. I think it is clearly a server error. If the server does not have TileCol=3 intentionally, it should advertise that with TileMatrixSetLimits in the GetCapabilities. I may be wrong, I have not been reading and interpreting the WMTS standard super much. -Jukka Rahkonen- Lähettäjä: gdal-dev <gdal-dev-boun...@lists.osgeo.org> Puolesta Michal Kowalczuk via gdal-dev Lähetetty: tiistai 10. joulukuuta 2024 23.52 Vastaanottaja: gdal-dev@lists.osgeo.org Aihe: [gdal-dev] WMTS Possible rounding error Hi, Consider the following WMTS service: WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/1.0.0/WMTSCapabilities.xml?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=USGSHydroCached,tilematrixset=default028mm and try to get whole extent: gdal_translate -srcwin 0 0 1852166785 1511812353 -outsize 570 465 "WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/1.0.0/WMTSCapabilities.xml?SERVICE=WMTS&REQUEST=GetCapabilities&VERSION=1.0.0,layer=USGSHydroCached,tilematrixset=default028mm" tile.png --debug on --config GDAL_ENABLE_WMS_CACHE NO (where 1852166785 1511812353 is a raster size) GDAL creates 4 requests: HTTP: Requesting [1/4] https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/tile/1.0.0/USGSHydroCached/default/default028mm/1/0/0 HTTP: Requesting [2/4] https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/tile/1.0.0/USGSHydroCached/default/default028mm/1/0/1 HTTP: Requesting [3/4] https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/tile/1.0.0/USGSHydroCached/default/default028mm/1/0/2 HTTP: Requesting [4/4] https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/WMTS/tile/1.0.0/USGSHydroCached/default/default028mm/1/0/3 where the last tile does not exist. So it probably should stop at /1/0/2. Isn't it a rounding error? Best regards Michał Kowalczuk
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev