-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alphashapes & n<4 #111
Milestone
Comments
I think this is sufficient to ensure that the output is always a def safe_ashape(xys, **ashape_kws):
if xys.shape[0] < 4:
return ops.cascaded_union([geom.Point(xy) for xy in xys]).convex_hull
return alpha_shape(xys, **ashape_kws) |
I've ran into this issue too. I think that solution might do it. Just a question, would that return a polygon object? |
Just checked all the input def safe_ashape(xys, **ashape_kws):
if xys.shape[0] < 4:
return ops.cascaded_union([geom.Point(xy) for xy in xys]).convex_hull.buffer(0)
return alpha_shape(xys, **ashape_kws) |
Addressed in #115 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in theory, the "delaunay" triangulation for cases where the number of points is less than 4 is still "known." N=3 is the triangle, n=2 is the line, and n=1 is the point.
as it stands,
Qhull
will error out when passed a collection with less than four points. It'd be nice if we checked this & returned something sane in these cases, rather than bailing out from qhull.The text was updated successfully, but these errors were encountered: