Adds a preset location to a Cal-Adapt API request
ca_loc_aoipreset(x = ca_apireq(), type, idfld = "id", idval = NULL)
A Cal-Adapt API request
The type of AOI preset (see Details)
The name of the field that identifies the desired locations
The value(s) of idfld
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
.