<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Jon,</p>
    <p>Recommended solution: use GDALRasterBand::GetDataCoverageStatus()
      with nXOff, nYOff, nXSize, nYSize matching tile offset and size
      and check for<span class="n"> GDAL_DATA_COVERAGE_STATUS_EMPTY. Cf
<a class="moz-txt-link-freetext" href="https://gdal.org/development/rfc/rfc63_sparse_datasets_improvements.html">https://gdal.org/development/rfc/rfc63_sparse_datasets_improvements.html</a></span></p>
    <p><span class="n">(undocumented solution, mostly used for internal
        testing:
rasterBand->GetMetadataItem("BLOCK_SIZE_{block_x_offset}_{block_y_offset}",
        "TIFF") where </span><span class="n">{block_x_offset} /
        {block_y_offset} must be replaced by the block index along x and
        y.</span><span class="n"> If it returns "0", it is a sparse
        block.)</span></p>
    <p><span class="n">Even<br>
      </span></p>
    <div class="moz-cite-prefix">Le 28/06/2024 à 15:04, Jon Morris via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CWLP123MB6876E5CFA53E0B4DE125E69582D02@CWLP123MB6876.GBRP123.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <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:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}@font-face
        {font-family:Aptos;}@font-face
        {font-family:"\@Malgun Gothic";}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Aptos",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;}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:11.0pt">We usually
            use the SPARSE_OK option when creating GTiffs, but as a lot
            of our clients use ArcGIS, we need to ensure that the sparse
            option is not used for client deliverables. After a tiff has
            been created though, it’s not easy to tell whether it is
            sparse or not. Is there an easy way of detecting which
            rasters are sparse and therefore cannot be sent to clients?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Using
            tiffinfo -D test.tif seems to give an error message like
            “TIFFFillTile: 0: Invalid tile byte count, tile 0.” , so
            I’ve been using this to check, but is there a better way?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Or have Esri
            started supporting sparse rasters, and if so, does anyone
            know which version of ArcMap 10.x? (Our clients are mostly
            on older versions, not sure if any are using Pro yet).<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Jon<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Arial",sans-serif">Jon
              Morris<o:p></o:p></span></b></p>
        <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Arial",sans-serif;color:gray">Software
              Developer<o:p></o:p></span></b></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Arial",sans-serif;color:gray">--<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <div dir="ltr"
style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;font-size:1px;direction:ltr;">
        <table
          style="width:100%;border-collapse:collapse;font-size:1px;"
          cellspacing="0" cellpadding="0" border="0">
          <tbody>
            <tr style="font-size:0;">
              <td style="vertical-align:top;" align="left">
                <table style="border-collapse:collapse;font-size:0;"
                  cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr style="font-size:0;">
                      <td style="padding:10px 0 0;vertical-align:top;"
                        align="left">
                        <table
style="border-collapse:collapse;font-size:0;color:#4A4A49;font-style:normal;font-weight:700;white-space:nowrap;"
                          cellspacing="0" cellpadding="0" border="0">
                          <tbody>
                            <tr style="font-size:14.67px;">
                              <td
style="padding:0;vertical-align:top;font-family:Arial;" align="left">e: <span
style="font-family:remialcxesans;font-size:1px;color:#FFFFFF;line-height:1px;">​<span
style="font-family:'template-7e3j9F-6EeuYiSgYeMNe5A';">​</span><span
                                    style="font-family:'zone-1';">​</span><span
                                    style="font-family:'zones-AQ';">​</span></span></td>
                              <td
style="padding:0 0 0 4px;vertical-align:top;color:#F6A124;font-family:Arial;font-weight:400;"
                                align="left"><a
                                  href="mailto:Jon.Morris@jbarisk.com"
                                  target="_blank" id="LPlnk689713"
style="text-decoration:none;color:#F6A124;" moz-do-not-send="true"
                                  class="moz-txt-link-freetext">Jon.Morris@jbarisk.com</a></td>
                            </tr>
                            <tr style="font-size:14.67px;">
                              <td
style="padding:0;vertical-align:top;font-family:Arial;" align="left">d:</td>
                              <td
style="padding:0 0 0 4px;vertical-align:top;color:#F6A124;font-family:Arial;font-weight:400;"
                                align="left">+44 (0)1756 587229<br>
                              </td>
                            </tr>
                            <tr style="font-size:14.67px;">
                              <td
style="padding:0;vertical-align:top;font-family:Arial;" align="left">t: </td>
                              <td
style="padding:0 0 0 4px;vertical-align:top;color:#F6A124;font-family:Arial;font-weight:400;"
                                align="left"><a
                                  href="tel:+44%20(0)1756%20799919"
                                  target="_blank" id="LPlnk689713"
style="text-decoration:none;color:#F6A124;" moz-do-not-send="true">+44 (0)1756 799919</a></td>
                            </tr>
                            <tr style="font-size:0;">
                              <td style="padding:0;vertical-align:top;"
                                align="left"><br>
                              </td>
                              <td
style="padding:0 0 0 4px;vertical-align:top;" align="left"><br>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
            <tr
style="font-size:14.67px;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;">
              <td style="vertical-align:top;font-family:Arial;"
                align="left"><a href="http://www.jbarisk.com/"
                  target="_blank" id="LPlnk689713"
                  title="Click to visit our website"
                  style="text-decoration:none;color:#F6A124;"
                  moz-do-not-send="true">www.jbarisk.com</a></td>
            </tr>
            <tr style="font-size:0;">
              <td style="vertical-align:top;" align="left">
                <table style="border-collapse:collapse;font-size:0;"
                  cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr style="font-size:0;">
                      <td style="padding:10px 0 0;vertical-align:top;"
                        align="left">
                        <table
                          style="border-collapse:collapse;font-size:0;"
                          cellspacing="0" cellpadding="0" border="0">
                          <tbody>
                            <tr style="font-size:0;">
                              <td rowspan="3"
style="padding:0 0 5px;vertical-align:top;" align="left">
                                <table
style="width:100%;border-collapse:collapse;font-size:0;" cellspacing="0"
                                  cellpadding="0" border="0">
                                  <tbody>
                                    <tr style="font-size:0;">
                                      <td style="vertical-align:top;"
                                        align="left">
                                        <table
style="border-collapse:collapse;font-size:0;line-height:normal;"
                                          cellspacing="0"
                                          cellpadding="0" border="0">
                                          <tbody>
                                            <tr style="font-size:0;">
                                              <td
style="padding:0 0 11px;vertical-align:top;" align="left"><img
src="cid:part1.gm0kIUVj.JJ425utP@spatialys.com" alt=""
style="width:150px;min-width:150px;max-width:150px;height:52px;min-height:52px;max-height:52px;font-size:0;"
                                                  class="" width="150"
                                                  height="52" border="0"></td>
                                            </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                    <tr style="font-size:0;">
                                      <td style="vertical-align:top;"
                                        align="left">
                                        <table
style="border-collapse:collapse;font-size:0;" cellspacing="0"
                                          cellpadding="0" border="0">
                                          <tbody>
                                            <tr style="font-size:0;">
                                              <td
style="padding:0 0 12px;vertical-align:top;" align="left">
                                                <table
style="height:30px;border-collapse:collapse;font-size:0;"
                                                  cellspacing="0"
                                                  cellpadding="0"
                                                  border="0">
                                                  <tbody>
                                                    <tr
style="font-size:0;">
                                                      <td
style="vertical-align:top;" align="left">
                                                        <table
style="border-collapse:collapse;font-size:0;line-height:normal;"
cellspacing="0" cellpadding="0" border="0">
                                                          <tbody>
                                                          <tr
style="font-size:0;">
                                                          <td
style="padding:0 3px 3px 0;vertical-align:top;" align="left"><a
href="https://www.linkedin.com/company/jba-risk-management/"
target="_blank" id="LPlnk689713" style="text-decoration:none;"
moz-do-not-send="true"><img
src="cid:part2.36lOQuar.lUO8mI8R@spatialys.com" alt=""
style="width:28px;min-width:28px;max-width:28px;height:28px;min-height:28px;max-height:28px;font-size:0;"
                                                          class=""
                                                          width="28"
                                                          height="28"
                                                          border="0"></a></td>
                                                          </tr>
                                                          </tbody>
                                                        </table>
                                                      </td>
                                                      <td
style="vertical-align:top;" align="left">
                                                        <table
style="border-collapse:collapse;font-size:0;line-height:normal;"
cellspacing="0" cellpadding="0" border="0">
                                                          <tbody>
                                                          <tr
style="font-size:0;">
                                                          <td
style="padding:0 3px 3px 0;vertical-align:top;" align="left"><a
href="https://twitter.com/JBARisk/" target="_blank" id="LPlnk689713"
style="text-decoration:none;" moz-do-not-send="true"><img
src="cid:part3.frlb00J1.E1Liqd4Z@spatialys.com" alt=""
style="width:28px;min-width:28px;max-width:28px;height:28px;min-height:28px;max-height:28px;font-size:0;"
                                                          class=""
                                                          width="28"
                                                          height="28"
                                                          border="0"></a></td>
                                                          </tr>
                                                          </tbody>
                                                        </table>
                                                      </td>
                                                      <td
style="vertical-align:top;" align="left">
                                                        <table
style="border-collapse:collapse;font-size:0;line-height:normal;"
cellspacing="0" cellpadding="0" border="0">
                                                          <tbody>
                                                          <tr
style="font-size:0;">
                                                          <td
style="padding:0 3px 3px 0;vertical-align:top;" align="left"><a
href="https://www.youtube.com/channel/UC0iatom2jYbW96voW0rlpCw"
target="_blank" id="LPlnk689713" style="text-decoration:none;"
moz-do-not-send="true"><img
src="cid:part4.OIQujdnl.1oic1Ehr@spatialys.com" alt=""
style="width:28px;min-width:28px;max-width:28px;height:28px;min-height:28px;max-height:28px;font-size:0;"
                                                          class=""
                                                          width="28"
                                                          height="28"
                                                          border="0"></a></td>
                                                          </tr>
                                                          </tbody>
                                                        </table>
                                                      </td>
                                                    </tr>
                                                  </tbody>
                                                </table>
                                              </td>
                                            </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                  </tbody>
                                </table>
                              </td>
                              <td style="padding:0;"> </td>
                            </tr>
                            <tr style="font-size:0;">
                              <td style="padding:0;"> </td>
                            </tr>
                            <tr style="font-size:0;">
                              <td style="padding:0;"> </td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
            <tr style="font-size:0;">
              <td style="vertical-align:top;" align="left">
                <table style="border-collapse:collapse;font-size:0;"
                  cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr style="font-size:0;">
                      <td
style="padding:7px 0 5px;border-top:solid 1px #4A4A49;border-right:none;border-bottom:none;border-left:none;vertical-align:top;"
                        align="left">
                        <table
style="white-space:normal;color:#444444;font-size:14.67px;font-family:Calibri,Arial,sans-serif;font-weight:400;font-style:normal;text-align:left;line-height:12px;border-collapse:collapse;"
                          cellspacing="0" cellpadding="0" border="0">
                          <tbody>
                            <tr style="font-size:9px;">
                              <td style="font-family:Arial;"><span
                                  style="background-color:#FFFFFF;">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.</span><br>
                                <span style="background-color:#FFFFFF;">Please
                                  notify the sender immediately by email
                                  if you have received this email by
                                  mistake and delete this email from
                                  your system.</span> <br>
                                <span style="background-color:#FFFFFF;">JBA
                                  Risk Management Limited is registered
                                  in England, company number 07732946, 1
                                  Broughton Park, Old Lane North,
                                  Broughton, Skipton, North Yorkshire,
                                  BD23 3FD, England</span><span
                                  style="color:#000001;">.</span><br>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          </tbody>
        </table>
      </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>