I need the 'concave hull' or alphashape of a set of points. Also, I'd like to have it with holes/donuts/islands in the middle. See my attached image. The outer hull is being calculated fine. But the large islands in the middle are generated as part of the hull. I want to get rid of that.
My code (partially grabbed from tutorials all around) can be found here: https://gist.github.com/willemvanopstal/f199c2f839b4de2abadfafde450c45ed
I expect it to be a simple mistake from my side.. Maybe in generating the resulting polygon from the isolated edges; (edge_points are the edges which have passed the alpha-test)
m = geometry.MultiLineString(edge_points) triangles = list(polygonize(m)) return cascaded_union(triangles), edge_points
Is there anybody who knows a fix for my issue?