<div dir="ltr">Thank you Even and Jukka!</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 12 May 2025 at 17:02, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <p>Fix in <a href="https://github.com/OSGeo/gdal/pull/12351" target="_blank">https://github.com/OSGeo/gdal/pull/12351</a></p>
    <p>You can workaround the issue by adding -oo
      IGNORE_COG_LAYOUT_BREAK=YES (actually not needed for cleaning as
      this doesn't break the layout, but definitely needed for adding to
      a COG)<br>
    </p>
    <div>Le 12/05/2025 à 12:01, Javier Jimenez
      Shaw via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Hi</div>
        <div><br>
        </div>
        <div>I am trying to clean the overviews from a GeoTIFF, but
          gdaladdo does not allow me.</div>
        <div>Is that an expected behaviour? Maybe I am missing more
          options. (there is no opposite of "-ro")</div>
        <div><br>
        </div>
        <div>
          <pre role="code">$ gdaladdo --debug on -clean out/test.tif 
GDAL: GDALOpen(out/test.tif, this=0x133058e00) succeeds as GTiff.
GTiff: ScanDirectories()
GTiff: Opened 6978x5110 overview.
GTiff: Opened 3489x2555 overview.
GTiff: Opened 1744x1277 overview.
GTiff: Opened 872x638 overview.
GTiff: Opened 436x319 overview.
GTiff: File open for read-only accessing, creating overviews externally.
ERROR 6: test.tif: Cannot add external overviews when there are already internal overviews
Cleaning overviews failed.
GDAL: GDALClose(out/test.tif, this=0x133058e00)

$ gdaladdo --version
GDAL 3.11.0 "Eganville", released 2025/05/06

</pre>
          <pre role="code"><span style="font-family:arial,sans-serif">
I am running it on a Mac.

</span></pre>
          <pre role="code"><span style="font-family:arial,sans-serif">Cheers,
</span></pre>
          <pre role="code"><span style="font-family:arial,sans-serif">Javier.</span></pre>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>