get_nearest_lon_lat_coords

get_nearest_lon_lat_coords#

eoio.utils.crs_utils.get_nearest_lon_lat_coords(lon_array, lat_array, coords) list[source]#

Return the new roi clipping coordinates for input longitude and latitude grids using nearest neighbour algorithms

(function currently rounds down to the first closest index, so treats values on either edge of the roi differently if consists of duplicated values)

Parameters:
  • lon_array – input longitude array

  • lat_array – input latitude array

  • coords – coordinates in longitude and latitude for which to find the new x, y coordinates for

Returns:

List of coordinates in x and y that satisfy the input.