| Crates.io | oxscape |
| lib.rs | oxscape |
| version | 0.1.1 |
| created_at | 2025-12-31 11:48:27.739618+00 |
| updated_at | 2025-12-31 22:35:20.857016+00 |
| description | Oxscape enables parallel flow graph (D8, Dinf) traversal in Digital Elevation Models |
| homepage | https://codeberg.org/feefladder/oxscape/ |
| repository | https://codeberg.org/feefladder/oxscape/ |
| max_upload_size | |
| id | 2014519 |
| size | 59,501 |
Oxscape (oxidized FastScape) is rust port and abstraction of Barnes' parallel flow graph traversal algorithm (2019) . Oxscape is the ox that pulls your landscape evolution models.
use oxscape::GridMeta;
use oxscape::order_sflow::{Order, D8};
let dem: Vec<f64> = (0..1000*1000).iter().map(|v| f64::from(v)).collect()
let order = Order::from_dem_metric(GridMeta::new(1000,1000), &dem, D8);
// write your own algorithms
pub fn accum(order: &Order, cell_area: f64, accum: &mut [f64]) {
accum.fill(cell_area);
order.for_lvls_top_down(accum, |a| {
*a.cell() += a.donors().iter().sum::<f64>();
});
}
let mut flow_accumulation = vec![0.0;order.meta().size();]
// compute flow accumulation
accum(&order, 10_000.0, &mut flow_accumulation);
Barnes, R. (2019). Accelerating a fluvial incision and landscape evolution model with parallelism. Geomorphology, 330, 28–39. https://doi.org/10.1016/j.geomorph.2019.01.002