Function eccodes_sys::grib_nearest_find[][src]

pub unsafe extern "C" fn grib_nearest_find(
    nearest: *mut grib_nearest,
    h: *const grib_handle,
    inlat: f64,
    inlon: f64,
    flags: c_ulong,
    outlats: *mut f64,
    outlons: *mut f64,
    values: *mut f64,
    distances: *mut f64,
    indexes: *mut c_int,
    len: *mut size_t
) -> c_int
Expand description

Find the 4 nearest points of a latitude longitude point. The flags are provided to speed up the process of searching. If you are sure that the point you are asking for is not changing from a call to another you can use GRIB_NEAREST_SAME_POINT. The same is valid for the grid. Flags can be used together doing a bitwise OR. The distances are given in kilometres.

@param nearest : nearest structure @param h : handle from which geography and data values are taken @param inlat : latitude of the point to search for @param inlon : longitude of the point to search for @param flags : GRIB_NEAREST_SAME_POINT, GRIB_NEAREST_SAME_GRID @param outlats : returned array of latitudes of the nearest points @param outlons : returned array of longitudes of the nearest points @param values : returned array of data values of the nearest points @param distances : returned array of distances from the nearest points @param indexes : returned array of indexes of the nearest points @param len : size of the arrays @return 0 if OK, integer value on error