ECC-638: grib_ls/grib_get -l using mask: nearest neighbour performance

This commit is contained in:
Shahram Najm 2018-02-23 18:37:08 +00:00
parent dac4d53c97
commit 748ed71ff1
1 changed files with 7 additions and 1 deletions

View File

@ -280,9 +280,15 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
}
}
GRIB_CHECK_NOLINE(err,0);
GRIB_CHECK_NOLINE(grib_nearest_find(n,h,lat,lon,0,
{
int nn_flag = 0;
if (options->latlon_mask) {
nn_flag = mode; /* ECC-638 */
}
GRIB_CHECK_NOLINE(grib_nearest_find(n,h,lat,lon,nn_flag,
options->lats,options->lons,options->values,
options->distances,options->indexes,&size),0);
}
if (!options->latlon_mask) {
min=options->distances[0];