You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working with @LVConsult, we noted that when alpha_shape_auto() receives ill-conditioned input (such as collinear or coincident points), the underlying scipy.spatial.Delaunay() routine will fail with a scipy.spatial.QhullError. But, because we cannot access the underlying Delaunay() call, we cannot provide any qhull_options to resolve or address this error.
For an example testbench:
importnumpyfromlibpysal.cgimportalpha_shape_autogood=numpy.random.random(size=(20, 2))
alpha_shape_auto(good) # succeedscollinear=numpy.column_stack((numpy.arange(6), numpy.arange(6)))
# alpha_shape_auto(collinear) # fails with a Qhull error, needs to be jitteredcollinear_plus=numpy.row_stack((collinear, good))
alpha_shape_auto(collinear_plus) # succeedscoincident=numpy.zeros((6, 2))
# alpha_shape_auto(coincident) # fails with a Qhull error, needs to have coincident points deletedcoincident_plus=numpy.row_stack((coincident, good))
alpha_shape_auto(coincident_plus) # succeedstwo_coincident=numpy.row_stack((numpy.zeros((3, 2)), numpy.ones((3, 2))))
#alpha_shape_auto(two_coincident) # fails with a Qhull error, needs to have coincident points deletedcol_and_coi=numpy.row_stack((collinear, coincident))
#alpha_shape_auto(col_and_coi) # fails with a Qhull error, needs to have coincident points deleted, then jittered
The usual solution to conditioning problems (either delete the coincident points or jitter the collinear points) can be done very efficiently by Qhull ( Delaunay(coords, qhull_options="Qbk:0Bk:0") or Delaunay(coords, qhull_options="QJ"), respectively) but the end user can't use these options because the alpha_shape_auto() does not deal with the options for Delaunay().
Think we could support these options?
The text was updated successfully, but these errors were encountered:
Working with @LVConsult, we noted that when
alpha_shape_auto()
receives ill-conditioned input (such as collinear or coincident points), the underlyingscipy.spatial.Delaunay()
routine will fail with ascipy.spatial.QhullError
. But, because we cannot access the underlyingDelaunay()
call, we cannot provide anyqhull_options
to resolve or address this error.For an example testbench:
The usual solution to conditioning problems (either delete the coincident points or jitter the collinear points) can be done very efficiently by Qhull (
Delaunay(coords, qhull_options="Qbk:0Bk:0")
orDelaunay(coords, qhull_options="QJ")
, respectively) but the end user can't use these options because thealpha_shape_auto()
does not deal with the options forDelaunay()
.Think we could support these options?
The text was updated successfully, but these errors were encountered: