Yes, but if you use C API function GdalRasterDatasetIO you don’t get error. I noticed this error only in gdal logger. How I can catch this error at runtime in code?
W dniu śr., 28.08.2024 o 17:38 Even Rouault <even.roua...@spatialys.com> napisał(a): > > Le 28/08/2024 à 17:26, Michał Kowalczuk a écrit : > > First produces correct output > > *gdal_translate -srcwin 33492026 20550638 8019970 4412002 -outsize 1576 > 867 > "WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible > <https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible>" > tile_ok.png * > > The following for higher level fails: > *gdal_translate -srcwin 36228140 21140450 191172 105168 -outsize 1576 867 > "WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible > <https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible>" > tile_error.png* > > *yes, and ? gdal_translate returns in error as expected due to the missing > tiles. If you want HTTP 400 to be silently ignored, you can do:* > > *gdal_translate > "WMTS:https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible > <https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible>" > tmp.wmts -of wmts* > > > *and edit tmp.wtms to add 400 in <ZeroBlockHttpCodes> * > > > > > śr., 28 sie 2024 o 17:07 Even Rouault <even.roua...@spatialys.com> > napisał(a): > >> If you could provide a gdal_translate command line reproducing the issue >> (likely using -srcwin + -outsize or -srcwin + -ovr to select the >> appropriate tile), that would make investigation easier >> Le 28/08/2024 à 16:52, Michał Kowalczuk via gdal-dev a écrit : >> >> Dear GDAL friends, >> any thoughts on this issue? >> >> Regards, >> Michał >> >> wt., 27 sie 2024 o 17:40 Michał Kowalczuk <michkowalc...@gmail.com> >> napisał(a): >> >>> Hi! >>> I'm wondering if the last issue 10348 was fully solved. >>> Try use the following WMTS server and to zoom to level 9-10, e.g. small >>> island in the Mediterranean >>> >>> >>> https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml >>> >>> For a sample tile >>> >>> >>> https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/tile/1.0.0/USGSImageryOnly/default/GoogleMapsCompatible/10/392/514 >>> >>> arcgis server returns error code 400. >>> >>> >>> GDALRasterIO passes so I do not know if there was an error inside. Only >>> logger gives some information, but how to detect such a situation? >>> >>> A sample logger file attached >>> >>> Kind regards, >>> Michał >>> >> >> _______________________________________________ >> gdal-dev mailing >> listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev >> >> -- http://www.spatialys.com >> My software is free, but my time generally not. >> >> -- http://www.spatialys.com > My software is free, but my time generally not. > >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev