xugrid.Ugrid2d.locate_nearest_node#

Ugrid2d.locate_nearest_node(points: ndarray, max_distance: float = inf)#

Find which grid node is nearest for a collection of points.

Parameters:
  • points (ndarray of floats with shape (n_point, 2))

  • max_distance (optional, float)

Returns:

indices – Missing indices are indicated with -1.

Return type:

ndarray of integers with shape (n_point,)