| Crates.io | rosewood |
| lib.rs | rosewood |
| version | 0.4.0 |
| created_at | 2021-08-29 19:59:24.757619+00 |
| updated_at | 2025-03-15 23:20:01.994795+00 |
| description | A file-based RTree for geospatial data |
| homepage | |
| repository | https://github.com/DougLau/loam/rosewood |
| max_upload_size | |
| id | 443883 |
| size | 50,077 |
A file-based RTree for geospatial data, such as Points, Linestrings and
Polygons.
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.