coordinate_methods.select_closest_location_ID#

coordinate_methods.select_closest_location_ID(coordinate: tuple[float, float], SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any]) int#

Given a coordinate, the closest location ID is returned.

The Euclidian distance is used.

Parameters:
  • coordinate (tuple[float, float]) – A tuple containing the x and y coordinates.

  • SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameter PRINT is at least necessary. See main.py for parameter explanations.

  • SIMULATION_DATA (dict[str, Any]) – The simulation data. NODES_REGION is at least necessary. See main.py and the input data section on the ELASPY website for explanations.

Returns:

location_ID (int) – The closest location ID.