-
I have a Vec of MultiPolygons. What is the best way to get a bounding rect which contains them all? I thought it would be as simple as using |
Beta Was this translation helpful? Give feedback.
Answered by
mthh
May 4, 2024
Replies: 1 comment
-
I think you can use a let vec_mpl: Vec<MultiPolygon<f32>> = vec![mpl1, mpl2];
let gc = GeometryCollection::new_from(vec_mpl.into_iter().map(Geometry::from).collect());
println!("{:?}", gc.bounding_rect()); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nk9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you can use a
GeometryCollection
(which is a collection of Geometries) for this.