This function allows the user to provide a earth engine image/imageCollection character string which will help with simple processing.

get_any(
  aoi,
  i_type = "ImageCollection",
  method,
  param = NULL,
  stat = "median",
  startDate = NULL,
  endDate = NULL,
  mask = FALSE,
  m.low = NULL,
  m.high = NULL,
  c.low = NULL,
  c.high = NULL
)

Arguments

aoi

A sf object indicating the extent of the geom.

i_type

A character indicating what type of image, e.g. 'ImageCollection' or 'Image'.

method

A character indicating what imageCollection to use, e.g. "UMD/hansen/global_forest_change_2019_v1_7".

param

A character indicating what band to select.

stat

A character indicating what to reduce the imageCollection by, e.g. 'median' (default), 'mean', 'max', 'min', 'sum', 'stdDev', 'first'.

startDate

character format date, e.g. "1999-10-23"

endDate

character format date, e.g. "1999-10-23"

mask

logical whether to mask out certain ranges

m.low

numeric low value for mask, e.g. greater than 'm.low'

m.high

numeric high value for mask, e.g. less than 'm.high'

c.low

numeric lower month value for calendar range

c.high

numeric higher month value for calendar range

Value

A list of Earth Engine Objects and arguments.

Note

Use how you would normally call a GEE session online but with method as your collection snippet.

Examples

if (FALSE) {
# Load Libraries

library(rgee)
rgee::ee_intialize()
library(exploreRGEE)

# Bring in data
huc <- exploreRGEE::huc

# get any Image or ImageCollection

forest_cover_loss <- get_any(huc, i_type = "Image",
                             method = 'UMD/hansen/global_forest_change_2019_v1_7',
                             param = 'lossyear')
}