[gdal-dev] How to stop gdal_translate using overviews when resampling

Jon Morris Jon.Morris at jbarisk.com
Fri May 28 07:30:56 PDT 2021


Hi Even,

Thanks for getting back to me. I should have mentioned we're using the Python bindings, but presumably we can still do something like this?
ds = gdal.OpenEx(path, open_options=['OVERVIEW_LEVEL=NONE'])

Jon

e: Jon.Morris at jbarisk.com
t: +44 (0)1756 799919
www.jbarisk.com
All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. 
JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, England.
From: Even Rouault <even.rouault at spatialys.com>
Sent: 28 May 2021 15:03
To: Jon Morris <Jon.Morris at jbarisk.com>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] How to stop gdal_translate using overviews when resampling


With GDAL 3.3, you could add -oo OVERVIEW_LEVEL=NONE. See https://gdal.org/api/raster_c_api.html?highlight=overview_level#_CPPv410GDALOpenExPKcjPPCKcPPCKcPPCKc
Le 28/05/2021 à 15:56, Jon Morris a écrit :
Hello all,

One of our users reported a difference in outputs after we upgraded from GDAL 2.2 to 3.2. Our tool is using gdal_translate to resample a raster from 5m to 10m and the outputs are very different.

I'm ok with things changing between major versions, but when investigating, I found that the outputs also change depending on whether the input file has overviews. I was aware of the issue with gdalwarp where overviews are used as a shortcut (http://erouault.blogspot.com/2014/10/warping-overviews-and-warped-overviews.html), but haven't been able to find anything similar in the docs or the code when it comes to gdal_translate.

Should overviews make a difference? Is there any way to disable this behaviour, so the resampling is always done using the input raster and not the overviews?

Thanks,

Jon

Jon Morris
Software Developer


e: ​
Jon.Morris at jbarisk.com<mailto:Jon.Morris at jbarisk.com>
t:
+44 (0)1756 799919<tel:+44%20(0)1756%20799919>
www.jbarisk.com<http://www.jbarisk.com/>
[cid:image001.png at 01D753D5.37F15020]
[Facebook]<https://www.facebook.com/TheFloodPeople>
[LinkedIn]<https://www.linkedin.com/company/jba-risk-management/>
[Twitter]<https://twitter.com/JBARisk>
[YouTube]<https://www.youtube.com/channel/UC0iatom2jYbW96voW0rlpCw>



All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.
JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, England.



_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9886 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 651 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 715 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 966 bytes
Desc: image004.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 784 bytes
Desc: image005.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image237338.png
Type: image/png
Size: 9886 bytes
Desc: image237338.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image473618.png
Type: image/png
Size: 651 bytes
Desc: image473618.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image820531.png
Type: image/png
Size: 715 bytes
Desc: image820531.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image377592.png
Type: image/png
Size: 966 bytes
Desc: image377592.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image446670.png
Type: image/png
Size: 784 bytes
Desc: image446670.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210528/b7d67a8a/attachment-0019.png>


More information about the gdal-dev mailing list