Adds a preset location to a Cal-Adapt API request

ca_loc_aoipreset(x = ca_apireq(), type, idfld = "id", idval = NULL)

Arguments

x

A Cal-Adapt API request

type

The type of AOI preset (see Details)

idfld

The name of the field that identifies the desired locations

idval

The value(s) of idfld

Details

type specifies one of the preset areas of interest supported by the Cal-Adapt API. For valid values, view the built-in constant aoipreset_types.

idfld is the field which contains the values you want to use to select the preset areas. For a list of fields you can use for each AOI preset, see the built-in list ca_aoipreset_idflds.

idval are the value(s) you can use to select specific areas of interest. For a list of values, see the built-in list ca_aoipreset_idval. If idval = NULL, all areas will be used.

Note all of the AOI Presets supported by the Cal-Adapt API are polygons. This means in order to query values for these areas (i.e., with ca_getvals_tbl), you must also specify a spatial aggregation function using ca_options.

See also