foxes.utils.geom2d.AreaUnion.points_distance(points, return_nearest=False)[source]

Calculates point distances wrt boundary.

Parameters

points: numpy.ndarray

The probe points, shape (n_points, 2)

return_nearest: bool

Flag for return of the nearest point on bundary

Returns

dist: numpy.ndarray

The smallest distances to the boundary, shape: (n_points,)

p_nearest: numpy.ndarray, optional

The nearest points on the boundary, if return_nearest is True, shape: (n_points, 2)