<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Fix in <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/12351">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 class="moz-cite-prefix">Le 12/05/2025 à 12:01, Javier Jimenez
      Shaw via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKuJ5Vyh2BwpqvQRexhJ-dVTYmK6=PqtZXJe4dCAT3b31g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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 class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>