Checking Chrome's console, the following error message 416 Range Not Satisfiable
related to a GeoTIFF (hillshade) is shown, where it has overviews and it is displayed as explained in this OpenLayers example. Even though this GeoTIFF displays well in GIS software such as QGIS, it does not appear in OpenLayers, here the console output:
Failed to load resource: the server responded with a status of 416 (Range Not Satisfiable)chunk-S4773HGR.js?v=e5f68cd5:255 AggregateError: Request failed at BlockedSource.fetch (chunk-RYMH54PX.js?v=e5f68cd5:3427:13) at async GeoTIFF.fromSource (chunk-RYMH54PX.js?v=e5f68cd5:4339:25) at async fromUrls (chunk-RYMH54PX.js?v=e5f68cd5:4431:20) at async Promise.all (:5173/index 0)AggregateError: Request failed at BlockedSource.fetch (chunk-RYMH54PX.js?v=e5f68cd5:3427:13) at async GeoTIFFImage.getTileOrStrip (chunk-RYMH54PX.js?v=e5f68cd5:2250:20) at async Promise.all (:5173/index 3) at async GeoTIFFImage._readRaster (chunk-RYMH54PX.js?v=e5f68cd5:2354:5) at async GeoTIFFImage.readRasters (chunk-RYMH54PX.js?v=e5f68cd5:2436:20) at async Promise.all (:5173/index 0)error @ chunk-S4773HGR.js?v=e5f68cd5:255(anonymous) @ chunk-RYMH54PX.js?v=e5f68cd5:4919Promise.catch (async)loadTile_ @ chunk-RYMH54PX.js?v=e5f68cd5:4918(anonymous) @ chunk-RYMH54PX.js?v=e5f68cd5:399promiseGetter @ chunk-UW3UJV7T.js?v=e5f68cd5:205toPromise @ chunk-UW3UJV7T.js?v=e5f68cd5:214loader @ chunk-RYMH54PX.js?v=e5f68cd5:398load @ chunk-CVKQJISJ.js?v=e5f68cd5:101loadMoreTiles @ chunk-DPXPVHTQ.js?v=e5f68cd5:209handlePostRender @ chunk-ZOWXVZGN.js?v=e5f68cd5:1349(anonymous) @ chunk-ZOWXVZGN.js?v=e5f68cd5:1653setTimeout (async)renderFrame_ @ chunk-ZOWXVZGN.js?v=e5f68cd5:1651animationDelay_ @ chunk-ZOWXVZGN.js?v=e5f68cd5:1530requestAnimationFrame (async)render @ chunk-ZOWXVZGN.js?v=e5f68cd5:1549renderFrame_ @ chunk-ZOWXVZGN.js?v=e5f68cd5:1625animationDelay_ @ chunk-ZOWXVZGN.js?v=e5f68cd5:1530Show 16 more framesShow less
GeoTIFF hillshade info:
Driver: GTiff/GeoTIFF Files: raster/DN_mb_p_hs.tif raster/DN_mb_p_hs.tif.ovr Size is 202, 167 Coordinate System is: GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], ID["EPSG",4326]] Data axis to CRS axis mapping: 2,1 Origin = (-76.670150505107600,-15.648671508436596) Pixel Size = (0.000933010215195,-0.000903702652032) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( -76.6701505, -15.6486715) ( 76d40'12.54"W, 15d38'55.22"S) Lower Left ( -76.6701505, -15.7995899) ( 76d40'12.54"W, 15d47'58.52"S) Upper Right ( -76.4816824, -15.6486715) ( 76d28'54.06"W, 15d38'55.22"S) Lower Right ( -76.4816824, -15.7995899) ( 76d28'54.06"W, 15d47'58.52"S) Center ( -76.5759165,-15.7241307) ( 76d34'33.30"W, 15d43'26.87"S) Band 1 Block=202x40 Type=Byte, ColorInterp=Gray Computed Min/Max=1.000,255.000 Minimum=1.000, Maximum=255.000, Mean=140.243, StdDev=60.615 NoData Value=0 Overviews: 26x21, 13x11, 7x6, 4x3, 2x2, 1x1 Metadata: STATISTICS_MAXIMUM=255 STATISTICS_MEAN=140.24288070368 STATISTICS_MINIMUM=1 STATISTICS_STDDEV=60.614910682844 STATISTICS_VALID_PERCENT=53.92
Its *.ovr file was created with:
gdaladdo $tif -r lanczos --config SPARSE_OK_OVERVIEW ON --config BIGTIFF_OVERVIEW YES --config GDAL_NUM_THREADS ALL_CPUS 8 16 32 64 128 256 -ro
I am wondering if the overview file is the problem, at least the used options have allowed to show similar GeoTIFFs in OpenLayers.
Any hints are welcomed,