9 | | Les outils interagissent aux travers des '''api-node''' et '''api-research''' directement avec les bases de données spatiales '''MAYA''' et '''DANA''' ainsi que la base de données mysql '''MINERVE'''. [[br]]Les fonctions de base permettant cette interaction avec les api on été regroupées dans le dossier suivant: |
10 | | |
11 | | {{{ |
12 | | MINERVE-D3\Code |
13 | | }}} |
14 | | |
15 | | Le fichier '''fc_API-REST.R''' contient les fonctions suivantes : |
16 | | |
17 | | ||='''Function name'''=||='''Description'''=||='''Calling function'''=||='''API'''=||='''Type of output'''=|| |
18 | | || download_data_in_slots || Parallel computation of slots download (value of a pixel or aggregated raster) over a period || download_slot || - || time series OR raster || |
19 | | || download_slot || Manages data download (value of a pixel or aggregated raster) for a given slot of the entire period || download_timeseries_from_raster_Node [[br]] download_timeseries_from_raster_research [[br]] manage_download_raster || - || time series OR raster || |
20 | | || download_timeseries_from_raster_node || Request set up with good variable arguments || download_request || node || time series || |
21 | | || download_timeseries_from_raster_research || Request set up with good variable arguments || download_request || research || time series || |
22 | | || download_request || Manages download_request to node and research APIs || download_request_node [[br]] download_request_research || - || time series || |
23 | | || download_request_node || Curl subprocess to call the request || spawn_process (in-built function) || node || time series || |
24 | | || download_request_research || Curl subprocess to call the request || spawn_process (in-built function) || research || time series || |
25 | | || manage_download_raster || Manages between ''server'' and ''local'' raster acquisition || download_raster (server option) || - || raster || |
26 | | || download_raster || Request set up with good variable arguments || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || node '''(!)''' || raster || |
27 | | || download_altitude_of_pixel ||Manages download_request to node and research APIs || download_altitude_of_pixel_node [[br]] download_altitude_of_pixel_research || - || value || |
28 | | || download_altitude_of_pixel_node || Function to download the elevation value of a pixel from the metadata DEM of a given product || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || node || value || |
29 | | || download_altitude_of_pixel_research || Function to download the elevation value of a pixel from the metadata DEM of a given product || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || research || value || |
30 | | |
31 | | Le fichier '''fc_common.R''' contient les fonction suivantes : |
32 | | |
33 | | ||='''Function name'''=||='''Description'''=|| |
34 | | || read.dst || Function to read a .dst file and transform it into a structure usable in R || |
35 | | || write.RSMcsv || Function to export data in a CSV format readable by RS MINERVE (currently not used in the tools listed below) || |
36 | | || || || |
37 | | || get_token || Manage acquisition of the token : first uses ''get_token_local'', if it fails, uses ''get_token_server'' and the saves the token with ''write_token'' || |
38 | | || get_token_local || Reads the token from the local file || |
39 | | || get_token_server || Acquires a new token from the API-REST || |
40 | | || write_token || Saves in the local file the newly acquire token || |
41 | | || || || |
42 | | || define_computetime || Date formating function || |
43 | | || print_elapsed_time || Function to print the time of a code part, with an argument for the text to be printed || |
44 | | || pause_and_print || Function to makes a break and print that it has done a break (used in the download functions, to handle cases where API-REST does temporary not answer, for example due to a manuel restart) || |
45 | | || || || |
46 | | || is_windows || Checks if the OS of the machine is Windows || |
47 | | || cURL_binary || Returns location of the curl .exe || |
48 | | || || || |
| 9 | Les outils interagissent aux travers des '''api-node''' et '''api-research''' directement avec les bases de données spatiales '''MAYA''' et '''DANA''' ainsi que la base de données mysql '''MINERVE'''. |