JosiahParry / rsgeo

R bindings to the geo Rust crate
https://rsgeo.josiahparry.com/
Other
46 stars 5 forks source link

helper to count number of single geometries in a multi #35

Open JosiahParry opened 8 months ago

JosiahParry commented 8 months ago

Similar to the coord utilities n_coords(), coord_first(), coord_last() etc. Here it could be like n_geoms() and a vec![MultiPoint(Point, Point, Point), MultiPoint(Point)] would return c(3, 1)

inspired by https://github.com/JosiahParry/rsgeo/issues/34 lengths(expand_geoms(x)) is annoying