rosewood

Crates.iorosewood
lib.rsrosewood
version0.3.3
sourcesrc
created_at2021-08-29 19:59:24.757619
updated_at2024-11-21 14:26:14.997517
descriptionA file-based RTree for geospatial data
homepage
repositoryhttps://github.com/DougLau/loam/rosewood
max_upload_size
id443883
size50,052
Douglas Lau (DougLau)

documentation

https://docs.rs/rosewood

README

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.

Commit count: 0

cargo fmt