Description Usage Arguments Value
This function is used to query a specific raster product in the FAO Gismanager.
Because data sets within the database vary greatly between the different
collection this function uses an easily abstractable pattern for the query.
Users can simply query a specific product from a collection for a given
spatio-temporal extent and download all available dimensions. In case user's
only want to download specific dimensions of a product these can be speicifed
as a list object with the dimension
argument. Note that temporal
dimensions do not need to be specified since they are derived automatically.
The function requires a valid API key for the FAO Gismanager. User's can
additionally specify the processing to be applied to the resulting raster file
such as if the valid pixel range should be cut to the borders of the aoi
object, tiling and overview creation of the raster and if the raster
shall be compressed. Note that any of these process will increase processing
time on the server-side.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
collection |
A length one charachter vector indication the collection where the queried product is found. |
product |
A length one character vector indicating the desired product to download. |
dimensions |
A list object specifying the dimensions of the product expect
of the time and measurment dimensions. Any other dimensions needs to be specified
in the form of |
aoi |
An sf object which bounding box is used to clip the raster extent. This is only relevant for regional or global datasets when clipping is desired. Simply omit this option when you want to download a complete dataset (e.g. a global dataset or a very local dataset such as WAPOR L3 data). The function will issue a warning in these cases that the extent was set to global/regional. |
begin |
A length one character in the form of |
end |
A length one character in the form of |
APIkey |
A length one character containing your API key. Can be obtained in the profile section at https://wapor.apps.fao.org. |
outdir |
A length one character vector with an existing directory. Any output files will be written here. |
cutline |
A logical indicating whether the resulting raster should be cut
to the bounding box of the |
tiled |
Logical whether the resulting raster file should be tiled. |
compressed |
Logical to indicate if the resulting raster should be compressed using LZW. |
overviews |
Logical to indicate if overviews for the resulting raster should be created. |
sleep_time |
A numeric value indicating the length of time R sleeps when checking for the availability of the result in seconds. Depending on the size of the queried raster (e.g. global extent at high spatial resolution) it might be a good idea to increase the sleep time. Defaults to 10 seconds. |
stubbornness |
Number of maximum iterations the function will query the server
for the result of one raster query. The length of one iteration is derived from
the |
Nothing. The function downloads raster files from the FAO WaPOR API to a specific output directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.