You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we set GDAL_TIFF_OVR_BLOCKSIZE to be the same as the internal tile for the high resolution data. This is usually ok, but in a case of web-optimized COG, it will result in GDAL having to fetch more tiles than needed.
👇 here we created a COG with internal tiles (256px for high resolution and overviews) aligned with web mercator grid (left). But the right image show that the overview (level 1) internal tiles are not aligned with the mercator grid at zoom - 1 (this is in fact normal).
Having internal tiles not aligned for overview is normal, but if we look at the figure 👇, if we try to fetch the data for mercator tile 17-118594-60034, GDAL will fetch 2 256x256px internal tiles (0,0 and 1,0) while the mercator tile only cover 1/4 of the area for those tiles.
Because GDAL can merge http call for adjacent range requests, having different internal tiles size for overviews will not create any harms and should speed up the performance.
⚠️
I'm inclined to update the CLI and add a --overview-tilesize option with default to GDAL_TIFF_OVR_BLOCKSIZE env and a fallback to 128.
This will be a breaking change and should happen before 1.0.0
The text was updated successfully, but these errors were encountered:
While working on the web-optimized (ref: #62) option I realized I made a bad choice from the beginning. in
rio-cogeo/rio_cogeo/scripts/cli.py
Line 122 in 983b709
GDAL_TIFF_OVR_BLOCKSIZE
to be the same as the internal tile for the high resolution data. This is usually ok, but in a case of web-optimized COG, it will result in GDAL having to fetch more tiles than needed.👇 here we created a COG with internal tiles (256px for high resolution and overviews) aligned with web mercator grid (left). But the right image show that the overview (level 1) internal tiles are not aligned with the mercator grid at zoom - 1 (this is in fact normal).
Having internal tiles not aligned for overview is normal, but if we look at the figure 👇, if we try to fetch the data for mercator tile
17-118594-60034
, GDAL will fetch 2 256x256px internal tiles (0,0 and 1,0) while the mercator tile only cover 1/4 of the area for those tiles.Because GDAL can merge http call for adjacent range requests, having different internal tiles size for overviews will not create any harms and should speed up the performance.
I'm inclined to update the CLI and add a
--overview-tilesize
option with default toGDAL_TIFF_OVR_BLOCKSIZE
env and a fallback to 128.This will be a breaking change and should happen before 1.0.0
The text was updated successfully, but these errors were encountered: