1 2 3 4 5 6 7 8 9 10 11
use geojson::{GeoJson, GeoJson::*}; use crate::{split_feature, split_feature_collection, split_geometry}; pub fn split_geojson(item: &GeoJson) -> Option<GeoJson> { match item { Geometry(geom) => split_geometry(geom).map(Geometry), Feature(feat) => split_feature(feat).map(Feature), FeatureCollection(fc) => split_feature_collection(fc).map(FeatureCollection), } }