Skip to main content

Module gsi

Module gsi 

Source
Expand description

Geospatial Information Authority of Japan (GSI / 国土地理院) DEM tile encoding.

Each pixel packs a signed 24-bit integer of 0.01 m units. The no-data sentinel (128, 0, 0) decodes to NaN.

Reference: https://maps.gsi.go.jp/development/demtile.html

Constants§

SENTINEL_RGB
No-data sentinel (R=128, G=0, B=0), decoded as NaN.

Functions§

decode
Decode RGB bytes into a freshly allocated Vec<f32>.
decode_into
Decode RGB bytes into a caller-owned f32 buffer (no allocation).
decode_pixel
Decode a single GSI (R, G, B) pixel into elevation (metres).
encode
Encode elevations into a freshly allocated Vec<u8>.
encode_into
Encode elevations into a caller-owned RGB buffer (no allocation).
encode_pixel
Encode a single elevation sample (metres) into GSI (R, G, B).
encode_to
Stream-encode elevations to a writer.