<div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 30, 2021 at 12:28 PM Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com">j1@jimenezshaw.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I want to make a (power-of-two) downscaled version of a geotiff with overviews efficiently with C++ (not from the console).</div></div></blockquote><div><br></div><div>I know you said you want to do this from C++ and not the console. In case you did want to do it from the console... there's an open option for gdal_translate to pluck a particular overview level out, like so:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote"><div>gdal_translate in.tif out.tif -oo OVERVIEW_LEVEL=1</div><div><br></div></div></blockquote>You might be able to do this with cleverly named overviews, like so:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>gdal_translate in.tif out.tif.ovr -oo OVERVIEW_LEVEL=2</div></div></blockquote><div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>gdal_translate in.tif out.tif.ovr.ovr -oo OVERVIEW_LEVEL=3</div></div></blockquote></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><div>...</div></div></div></div></blockquote><br><div>and then one final translate which uses all the overviews to a new final TIF.</div><div><br></div><div>Cheers,</div><div>Pete</div></div>