[gdal-dev] The relationship between overview levels and zoom levels?

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Sun Oct 8 02:05:02 PDT 2023


Hi,

There are documentation about overviews in https://gdal.org/drivers/raster/cog.html, https://gdal.org/drivers/raster/gtiff.html, and https://gdal.org/programs/gdal_translate.html. Probably in other places, too, but reading those carefully is a good start. They deal also a bit with zoom levels.

What happens when a client opens an image with only one overview [16] is totally up to the client. It knows that the 1/16 downsampled version is available and it may decide to use the closest available overview: first full resolution till 1/8 and then jump to use 1/16. This is the AUTO approach of gdal_translate. Some other client would prefer better quality and use the full resolution up till 1/16 to avoid upsampling data that has downsampled earlier.

The COG driver has options for creating the overviews to match with the zoom levels of the selected tiling schema. Then there will be no need to resample the overview data again when the client makes zoom level based requests.

-Jukka Rahkonen-



Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta James Sammone via gdal-dev
Lähetetty: sunnuntai 8. lokakuuta 2023 1.02
Vastaanottaja: gdal-dev at lists.osgeo.org
Aihe: [gdal-dev] The relationship between overview levels and zoom levels?

I'm not sure if this is the best channel to ask this question as it might be beyond the scope, but I've asked it in a few others and have had no responses aside from others also being curious.

I am trying to understand the relationship between overviews and zoom levels so I know how to make more efficient Cloud Optimized GeoTIFFs. Using gdaladdo or gdal.BuildOverviews(), I can create overviews at [2,4,8,16] or at just [16]. From my understanding, this means the size is being divided by those values to provide downsample arrays of the original source. In the first example [2,4,8,16], I've created 4 separate overview arrays into the GeoTIFF that are 2x, 4x, 8x, and 16x downsampled. And in the second example using only [16], I've built one overview array into the GeoTIFF that is 16x downsampled.

How can I understand how these overviews are applied when it comes to zoom levels? Does the 16x downsample appear sooner in the second example when zooming out than for the first example due to being first in order? Or do the 16x downsamples appear at the same zoom level for both cases but the second example has additional 2x, 4x, and 8x downsamples that also appear before getting there?

Thanks for any insight into this anyone can provide. Despite using overviews all the time, I've struggled with this for a while and had largely consigned to not understanding it.

Best,

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20231008/69da84cf/attachment.htm>


More information about the gdal-dev mailing list