[COG] Reading from the overviews in cog

Grégory Bataille gregory.bataille at gmail.com
Tue Jun 12 07:20:47 PDT 2018


Hello everyone,

I’m trying to migrate my code to COG more and more rather than
pre-computing some views/data.

I have had some great success with extracting partial full res raster
values and it’s great.

One thing I have not been able to do so far though is « reading from the
overview »
Say for example I want to render a 512x512 tiles of data but really zoomed
out. Let’s say for example that this tile contains my entire 10’000x10’000
pixels geotiff. It’s obviously super inefficient to read from the raw
raster rather than reading from one of the pre-computed overviews.
Is there an API (python) to ask for raster data (between 2 points) (like
ReadAsArray which is the one I currently use) but passing it the output
size so that gdal can figure out which overview it’s better to read from?

Thanks
Greg
-- 
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/cog/attachments/20180612/c036186d/attachment.html>


More information about the COG mailing list