Run checks on an API request object

ca_preflight(
  x,
  slug_check = TRUE,
  date_check = TRUE,
  loc_check = TRUE,
  units_check = TRUE,
  spag_check = TRUE,
  check_for = c("getvals", "getrst"),
  quiet = FALSE,
  ignore_spag = deprecated()
)

Arguments

x

A Cal-Adapt API request

slug_check

Cross check the slug against the raster series catalog

date_check

Cross check the start and end date against the raster series catalog

loc_check

Check to make sure the location is within the Cal-Adapt coverage area

units_check

Check for consistent units

spag_check

Check spatial aggregation option

check_for

What to check for - getting values or getting rasters

quiet

Suppress messages

ignore_spag

Deprecated

Value

TRUE if no messages are reported, else FALSE

Details

This function checks an Cal-Adapt API request for potential problems. It checks to make sure the request:

  • is complete

  • doesn't have conflicting elements

  • specifies an existing datasets

  • specifies a location within the Cal-Adapt coverage area

  • specifies area-of-interest presets correctly

  • has features that are not too large for the Cal-Adapt API

  • doesn't mix datasets that have different units

  • uses dates that fall within the Cal-Adapt time series

  • includes a spatial aggregation function if needed

Most of the checks can be selectively disabled using arguments. check_for allows you to tailor checks for querying values and/or downloading rasters.

See also