Create references to a Google Earth Engine Image or Image Collection based on IDs or names, or combine Images into Image Collections.

gd_image_from_id(x)

gd_collection_from_name(x)

gd_collection_from_list(x)

gd_asset_id(filename, folder = NULL)

gd_list_assets(parent)

Arguments

x

character. id of Image, name of Image Collection, or a vector of Image id to create a new Image Collection

filename

File or Asset Name

folder

Optional: Project Name

parent

Full path to project folder (with or without "/assets" suffix)

Value

geedim.MaskedImage or geedim.MaskedCollection object, or try-error on error

Examples

if (FALSE) { # gd_is_initialized()
# \donttest{
if (gd_is_initialized())
  gd_image_from_id('CSP/ERGo/1_0/Global/SRTM_topoDiversity')
# }
}
if (FALSE) { # gd_is_initialized()
# \donttest{
if (gd_is_initialized())

  # Find 1m DEMs in arbitrary extent
  r <- gd_bbox(xmin = -121.4, xmax = -121.35, ymin = 37.55, ymax = 37.6)

  # collection of individual tiles of DEM
  x <- gd_collection_from_name("USGS/3DEP/1m")

  # search within region
  y <- gd_search(x, r)

  gd_properties(y)

# }
}
if (FALSE) { # gd_is_initialized()
# \donttest{
if (gd_is_initialized())
  # Find 1m DEM in arbitrary extent
  r <- gd_bbox(xmin = -121.4, xmax = -121.35, ymin = 37.55, ymax = 37.6)

  # collection of individual tiles of DEM
  x <- gd_collection_from_name("USGS/3DEP/1m")

  # search within region
  y <- gd_search(x, r)

  # select images with some condition of interest
  z <- subset(gd_properties(y),
              grepl("UpperSouthAmerican_Eldorado_2019", id) > 0)

  # create encapsulated images from IDs returned by search
  l <- lapply(z$id, gd_image_from_id)

  # create a new collection from the list of images
  l2 <- gd_collection_from_list(l)
  l2

### download composite of custom collection
#  gd_download(gd_composite(l2),
#              filename = "test.tif",
#              region = r,
#              crs = "EPSG:5070",
#              scale = 30)

# }
}
if (FALSE) { # gd_is_initialized()
# \donttest{
if (gd_is_initialized())
  gd_asset_id("RGEEDIM_TEST", "your-project-name")
# }
}
if (FALSE) { # gd_is_initialized()
# \donttest{
if (gd_is_initialized())
  gd_list_assets("projects/your-project-name")
# }
}