<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hum, this error comes from deep in libtiff:
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/fec15b146f8a750c23c5e765cac12ed5fc9c2b85/gdal/frmts/gtiff/libtiff/tif_dirread.c#L4802">https://github.com/OSGeo/gdal/blob/fec15b146f8a750c23c5e765cac12ed5fc9c2b85/gdal/frmts/gtiff/libtiff/tif_dirread.c#L4802</a></p>
    <p>It would indicate that a TIFF directory (image) has more than
      4096 tags, which is highly unlikely for a valid image. The error
      is in a source TIFF image. It shouldn't affect the *structure* of
      the output TIFF file. It might be an overview of the source image
      that is corrupted. So it could potentially affect the content of
      the overviews of the target file, but likely not, as GDAL will
      likely skip the corrupted source overview and regenerate it.<br>
    </p>
    <div class="moz-cite-prefix">Le 08/07/2021 ŕ 18:32,
      <a class="moz-txt-link-abbreviated" href="mailto:Matt.Wilkie@yukon.ca">Matt.Wilkie@yukon.ca</a> a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:d04d405cc862495c9267ea4b18f21733@yukon.ca">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif">Related
            to my previous question today, what is the nature of
            “TIFFFetchDirectory:Sanity check on directory count failed”
            error?
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span
            style="font-size:10.0pt;font-family:"Courier New"">::
            gdal_translate   -co compress=zstd   -co predictor=yes   -co
            level=17   -co bigtiff=yes   -of cog   -a_nodata 0
            Finlayson9488_SP7_08Aug2017_150cm.rgb-nir.vrt
            out\Finlayson9488_SP7_08Aug2017_150cm.rgb-nir.tif<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span
            style="font-size:10.0pt;font-family:"Courier New"">Input
            file size is 41114, 22580<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span
            style="font-size:10.0pt;font-family:"Courier New"">0...10...20ERROR
            1: TIFFFetchDirectory:Sanity check on directory count
            failed, this is probably not a valid IFD offset<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span
            style="font-size:10.0pt;font-family:"Courier New"">ERROR
            1: TIFFReadDirectory:Failed to read directory at offset
            16879620<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span
            style="font-size:10.0pt;font-family:"Courier New"">...30...40...50...60...70...80...90...100
            - done.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif">The
            translate run finished successfully and `gdalinfo -mm …`
            reports no errors on the output file structure. Visually the
            image appears intact. (Is scanning for minmax the best way
            to test for a valid file? I’ve been using it that way for
            years but maybe it’s not best practice.)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
        <p class="MsoNormal"
style="margin-top:4.0pt;line-height:115%;text-autospace:none;vertical-align:middle"><b><span
style="font-size:9.0pt;line-height:115%;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"
              lang="EN-US">Matt Wilkie</span></b><span
style="font-size:9.0pt;line-height:115%;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"
            lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"
            lang="EN-US">Geomatics Developer & Administrator<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"
            lang="EN-US">Environment
            <span style="color:#2E74B5">|</span> Technology, Innovation
            and Mapping<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"
            lang="EN-US">T 867-667-8133
            <span style="color:#2E74B5">|</span> </span><u><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA"><a
                href="http://yukon.ca/" moz-do-not-send="true"><span
                  style="color:windowtext" lang="EN-US">Yukon.ca</span></a><o:p></o:p></span></u></p>
        <p class="MsoNormal"><i><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;mso-fareast-language:EN-CA">Hours:
              08:30-16:30, Mon-Wed: Office, Thu: Remote, Fri: Away.<o:p></o:p></span></i></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></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>