mirror of https://github.com/ecmwf/eccodes.git
GRIB-382: grib_get_data also for C and Python: Exposed the C function and added C example
This commit is contained in:
parent
aace61df7a
commit
41e5e094ea
|
@ -2,11 +2,11 @@
|
|||
AM_CFLAGS = @WARN_PEDANTIC@ @WERROR@
|
||||
|
||||
TESTS = iterator.sh get.sh print_data.sh set.sh keys_iterator.sh multi.sh multi_write.sh \
|
||||
precision.sh list.sh large_grib1.sh
|
||||
precision.sh list.sh large_grib1.sh get_data.sh
|
||||
|
||||
noinst_PROGRAMS = nearest set_bitmap iterator get print_data set set_missing keys_iterator \
|
||||
set_data mars_param values_check box multi multi2 multi_write precision \
|
||||
set_pv list sections_copy large_grib1
|
||||
set_pv list sections_copy large_grib1 get_data
|
||||
bin_PROGRAMS = points
|
||||
|
||||
box_SOURCES = box.c
|
||||
|
@ -29,6 +29,7 @@ points_SOURCES = points.c
|
|||
list_SOURCES = list.c
|
||||
sections_copy_SOURCES = sections_copy.c
|
||||
large_grib1_SOURCES = large_grib1.c
|
||||
get_data_SOURCES = get_data.c
|
||||
|
||||
INCLUDES = -I$(top_builddir)/src
|
||||
|
||||
|
|
|
@ -580,6 +580,19 @@ int grib_get_message_copy(grib_handle* h , void* message,size_t *message_length
|
|||
*/
|
||||
grib_iterator* grib_iterator_new (grib_handle* h, unsigned long flags,int* error);
|
||||
|
||||
/**
|
||||
* Get latitude/longitude and data values.
|
||||
* The Latitudes, longitudes and values arrays must be properly allocated by the caller.
|
||||
* Their required dimension can be obtained by getting the value of the integer key "numberOfPoints".
|
||||
*
|
||||
* @param h : handle from which geography and data values are taken
|
||||
* @param lats : returned array of latitudes
|
||||
* @param lons : returned array of longitudes
|
||||
* @param values : returned array of data values
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_data(grib_handle *h, double *lats, double *lons, double *values, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the next value from an iterator.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue