<div dir="ltr">Thanks!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 26 Oct 2023 at 12:27, Even Rouault via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</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>Javier,<br>
</p>
<div>Le 26/10/2023 à 11:59, Javier Jimenez
Shaw via gdal-dev a écrit :<br>
</div>
<blockquote type="cite">
<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 href="http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#units" target="_blank">http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#units</a>)</p>
<p>Even<br>
</p>
<blockquote type="cite">
<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">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</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>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>