georust / geo

Geospatial primitives and algorithms for Rust
https://crates.io/crates/geo
Other
1.54k stars 197 forks source link

Implement convex hull for geometries other than Polygon #1038

Closed JosiahParry closed 1 year ago

JosiahParry commented 1 year ago

Using geos, the convex hull can be provided for all geometry types. An oddity, though, that I've noticed is that it does not always return a polygon.

For example:

JosiahParry commented 1 year ago

Closing! I misunderstood the docs! It works as anticipated :)

Though perhaps the docs can be updated?

"Returns the convex hull of a Polygon."

Could be "returns the convex hull of a geometry." The phrasing makes it seem like it is only implemented for polygons.

https://docs.rs/geo/latest/geo/algorithm/convex_hull/trait.ConvexHull.html