Thanks! On Thu, 26 Oct 2023 at 12:27, Even Rouault via gdal-dev < gdal-dev@lists.osgeo.org> wrote:
> Javier, > Le 26/10/2023 à 11:59, Javier Jimenez Shaw via gdal-dev a écrit : > > Hi > > 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. > > Is there any standard (or accepted) metadata to say the units of those > values? > > API wise in GDAL, you should use the GDALRasterBand::SetUnitType() to set > the unit > > For TIFF, this will be encoded in the GDAL_METADATA TIFF tag like the > following: > > <GDALMetadata> > <Item name="UNITTYPE" sample="0" role="unittype">foo</Item> > </GDALMetadata> > > 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 ( > http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#units > ) > > Even > > > 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. > > Thanks > .___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__ > > _______________________________________________ > gdal-dev mailing > listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev > > -- http://www.spatialys.com > My software is free, but my time generally not. > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev