wapor_queryRaster: Query the FAO database for a specific raster product

Description Usage Arguments Value

View source: R/queryRaster.R

Description

This function is used to query a specific raster product in the FAO Gismanager. Because data sets within the database vary greatly bettween the different collection this function uses an easily abstractable pattern for the query. This scheme follows the simple pattern of what you want to download, when is the timeperiod you are interested in, and where is the region you want to download.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
wapor_queryRaster(
  collection = NULL,
  product = NULL,
  dimensions = list(),
  aoi = NULL,
  begin = NULL,
  end = NULL,
  APIkey = NULL,
  outdir = ".",
  cutline = FALSE,
  tiled = FALSE,
  compressed = FALSE,
  overviews = FALSE,
  sleep_time = 10
)

Arguments

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 dimensions = list(KEY = "value"). In cases of products with only the temporal and measurement dimension an empty list should be handed to the function. This is also the Default.

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 "YYYY-MM-DD" or an Date object in the same format. This time parameter is inclusive meaning that all timestemps equal or higher than begin will be included.

end

A length one character in the form of "YYYY-MM-DD" or an Date object in the same format. This parameter is exclusive meaning that all timestemps lower thatn end will be included.

APIkey

A length one charachter 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 aoi object. Only relevant when aoi is specified.

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.

Value

nothing


goergen95/wapoR documentation built on Sept. 30, 2020, 5:21 p.m.