I must be missing something incredibly obvious, but there seems to be a huge difference in the area computed by scipy.ConvexHull.area
compared to shapely.convex_hull.area
. I get
Scipy Convex Hull Area: 457761.9061526276, Shapely Convex Hull Area: 13192154623.86528
from shapely.geometry import MultiPoint
from scipy.spatial import ConvexHull
import json
def convex_hull_compare():
with open("./test_points.json", 'r') as f:
points = json.load(f)
print(points)
hull = ConvexHull(points)
ch_area = MultiPoint(points).convex_hull.area
print(
f"Scipy Convex Hull Area: {hull.area}, Shapely Convex Hull Area: {ch_area}")
# Scipy Convex Hull Area: 457761.9061526276, Shapely Convex Hull Area: 13192154623.86528
if __name__ == "__main__":
convex_hull_compare()
I've uploaded the test_points.json
on a Github Gist here and written a minimal version of the code for easy reproduction.