<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Javier,<br>
    </p>
    <div class="moz-cite-prefix">Le 26/10/2023 à 11:59, Javier Jimenez
      Shaw via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKtS5yee0iC8Rdj+O5O5UJbzKuVb=ig7kczpzs-+jJ0SiA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi</div>
        <div><br>
        </div>
        <div>Using a GeoTIFF with a single band and float values can be
          very useful to show any distribution over the terrain. One
          typical example is DSM (digital surface model), where the
          value is the elevation on every point.</div>
        <div><br>
        </div>
        <div>Is there any standard (or accepted) metadata to say the
          units of those values?</div>
      </div>
    </blockquote>
    <p>API wise in GDAL, you should use the
      GDALRasterBand::SetUnitType() to set the unit</p>
    <p>For TIFF, this will be encoded in the GDAL_METADATA TIFF tag like
      the following:<br>
    </p>
    <p><GDALMetadata><br>
        <Item name="UNITTYPE" sample="0"
      role="unittype">foo</Item><br>
      </GDALMetadata></p>
    <p>Regarding the value itself, it is mostly unspecified by GDAL. It
      could be a good practice to suggest to use strings recognized by
      the "udunits" package (when possible), like done in the netCDF CF
      conventions
(<a class="moz-txt-link-freetext" href="http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#units">http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#units</a>)</p>
    <p>Even<br>
    </p>
    <blockquote type="cite"
cite="mid:CADRrdKtS5yee0iC8Rdj+O5O5UJbzKuVb=ig7kczpzs-+jJ0SiA@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>In the typical case of DSM it is usually "meter" or "foot".
          But it can be something else, like "people/km2" for
          population, or "mm" for rain precipitation, or "kg/ha" for
          agricultural yield.</div>
        <div><br>
        </div>
        <div>Thanks<br>
        </div>
        <div>
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ...
                  .... ._ .__</div>
              </div>
            </div>
          </div>
        </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>