'Set overview level with gdal_translate for a COG
I have a 5kx5k COG image I'm able to read with gdal_translate for python and output it as a numpy RGB array.
However, I'd like to be able to directly select the overview level in the image. If I want to see the entire image, I'd like to make it so that it returns the image in the highest overview level, instead of the full 5kx5k resolution. Is it possible without scaling the array after calling the function?
Solution 1:[1]
Why are you reading it with gdal_translate? If you use the raster I/O python functions, it will automatically scale your image by selecting the closest matching overview level.
Just follow the instructions from the tutorial: https://gdal.org/tutorials/raster_api_tut.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mmomtchev |
