Hello, the geozero_shp crate says that it supports converting to GeoJSON but there is no example of how to do so in the docs. Does anyone have experience working with this crate or does anyone know how to use it to do such a thing? It looks like it involves using geozero
alongside geozero_shp
...?
use geozero::geojson::GeoJsonWriter;
fn main() {
let path = "C:\\Users\\mthel\\Julia\\src_data\\Map Shape Files\\BLM_CO_ST_BNDY_SHP\\BLM_CO_ST_BNDY_20170109.shp";
let reader = geozero_shp::Reader::from_path(path).unwrap();
let mut json: Vec<u8> = Vec::new();
let data = reader.iter_features(GeoJsonWriter::new(&mut json)).unwrap();
}
data
is a ShapeRecordIterator
but how do I go from that to geoJSON???