iwfm.nearest

iwfm.nearest(d_nodes, x, y)[source]

Find the nearest node to a point from a node dictionary.

Parameters:
  • d_nodes (dictionary) – key = model node, value = x and y locations

  • x (float) – x location of point

  • y (float) – y location of point

Returns:

nearest – node ID of node closest to (x,y)

Return type:

int