#spatial #geospatial

rosewood

A file-based RTree for geospatial data

6 releases

0.3.3 Nov 21, 2024
0.3.2 Sep 30, 2024
0.3.1 Jun 6, 2024
0.3.0 Jan 19, 2024
0.1.0 Aug 29, 2021

#125 in Geospatial

Download history 13/week @ 2024-08-28 3/week @ 2024-09-11 10/week @ 2024-09-18 142/week @ 2024-09-25 51/week @ 2024-10-02 16/week @ 2024-10-09 6/week @ 2024-10-16 3/week @ 2024-10-30 2/week @ 2024-11-06 137/week @ 2024-11-20 11/week @ 2024-11-27 18/week @ 2024-12-04 24/week @ 2024-12-11

190 downloads per month
Used in 2 crates

MIT/Apache

44KB
1K SLoC

Rosewood

A file-based RTree for geospatial data, such as Points, Linestrings and Polygons.

Writing

use rosewood::{BulkWriter, gis::Points};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut w = BulkWriter::new("points.loam")?;
    let mut a = Points::new("point A".to_string());
    a.push((5.0, 1.0));
    let mut b = Points::new("point B".to_string());
    b.push((3.0, 7.3));
    w.push(&a)?;
    w.push(&b)?;
    w.finish()?;
    Ok(())
}

GisData can have associated data, which must implement the Serialize / Deserialize traits from serde. In the example above, this is String.

Dependencies

~0.9–1.6MB
~35K SLoC