Model.point_nnbrs

Model.point_nnbrs(point, k=1)

Find the nearest neighbours to a point.

Parameters:
pointcompas.geometry.Point

The root point.

kint, optional

The number of nearest neighbours that should be returned.

Returns:
list[tuple[Element, float]]

A list of nearest neighbours, with each neighbour defined as an element and the distance of that element to the root element.