[gdal-dev] Support for Terrain-RGB
Lars Ahlzen
lars at ahlzen.com
Mon Jan 5 13:46:43 PST 2026
On 05/01/2026 19:47, rayg wrote:
> Strange encoding, -10000 meters isn't deep enough for the Marianas
> Trench. You could borrow another 10 km from the 1.6 million meters
> still available on the positive side.
>
> Scaling by 0.1 also means a 10 cm vertical resolution., which is
> useless for some use cases. The 24 bits per pixel could be much better
> allocated.
I kind of agree with both points, but I guess the format is what it is.
I don't think it's supposed to be a general-purpose storage format. It's
encoding just enough data to do good enough real-time visualization of
elevation, like hillshading or hypsometric tints, client side.
Looks like at least rio-rgbify [1] allows setting a custom base value
and interval. That might be something we want to emulate as well,
perhaps as creation options (if a raster format driver) or command line
options (if part of gdaldem).
- Lars
[1] https://github.com/mapbox/rio-rgbify
More information about the gdal-dev
mailing list