4 releases (2 breaking)
Uses new Rust 2024
| new 0.14.0 | Jun 6, 2026 |
|---|---|
| 0.13.1 | Jun 5, 2026 |
| 0.13.0 | Jun 5, 2026 |
| 0.11.0 | Jun 4, 2026 |
#9 in #terrain
Used in 2 crates
2MB
42K
SLoC
SurtGIS Relief
Rayshader-style shaded-relief compositing on top of the terrain primitives
that already live in surtgis-algorithms. This crate is a compositor,
not a new set of algorithms — see SPEC_SURTGIS_RELIEF.md in the
repository root for the full design.
What lives here
ray_shade— ray-traced cast shadows viasurtgis_algorithms::terrain::horizon_angle_map_fast, with optional soft-shadow averaging over multiple sun samples.sphere_shade— normal-based hillshade as an intensity layer in[0, 1], wrappingsurtgis_algorithms::terrain::hillshade.
What is re-exported
Pixel-buffer and PNG output live in
surtgis_colormap; we re-export the relevant types
at the crate root for ergonomics.
use surtgis_relief::{ray_shade, sphere_shade, RayShadeParams, SunSample, RgbaImage};
let shadow_mask = ray_shade(&dem, &RayShadeParams::default())?;
let mut img = RgbaImage::from_intensity(&sphere_shade(&dem, Default::default())?);
let shadow_layer = RgbaImage::from_intensity(&shadow_mask);
img.multiply(&shadow_layer, 0.5)?;
img.save_png("relief.png")?;
Dependencies
~5.5–7.5MB
~133K SLoC