[gdal-dev] Overviews with a factor of 4

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Overviews with a factor of 4

Andrew C Aitchison-2

I am writing a driver that reads files that have overviews with linear
scale factors 4, 16, 64 rather than the 2, 4, 8, 16, 32, 64, ...
supported by GDALRasterBand::GetOverview().

Is there a way to let the library know that some overviews are not available,
or code I could use to scale (shrink) the data read rather than reimplementing
the wheel ?

--
Andrew C. Aitchison Cambridge, UK
  [hidden email]
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Overviews with a factor of 4

jratike80
Hi,

GetOverview is by no means limited to handle power of two overview scales.
Take for example a tiff file with "Size is 3000, 1500"

gdaladdo -ro test.tif 4 16 64

Now try gdalinfo

Overviews: 750x375, 188x94, 47x24

-Jukka Rahkonen-



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev