| mf_get_url | R Documentation |
Find the files covering your area and dates, and create URLs to download only the selected bands and area. Use [mf_download_data()] to download them.
mf_get_url(
collection,
variables = NULL,
roi,
time_range,
collection_id = NULL,
verbose = "inform"
)
collection |
Collection identifier, e.g. '"MOD11A1.061"', '"VNP43MA4.002"' or '"GPM_3IMERGDF.07"'. |
variables |
One or more band names to retrieve, as returned by [mf_list_variables()]. |
roi |
An 'sf' polygon with an 'id' column. |
time_range |
One date or two bounding dates. |
collection_id |
Optional Earthdata Cloud collection ID. Usually leave this empty; the package finds it in its collection catalogue. Not used for GPM. |
verbose |
Character string: '"quiet"', '"inform"' (default), or '"debug"'. Controls progress messages; '"debug"' also shows request details. |
Set 'EARTHDATA_TOKEN' to your Earthdata token before calling this function.
A data frame with the download URLs for [mf_download_data()].
## Not run:
Sys.setenv(EARTHDATA_TOKEN = "your Earthdata bearer token")
roi <- sf::st_as_sf(data.frame(id = "test", geom =
"POLYGON ((3.8 43.5, 4 43.5, 4 43.7, 3.8 43.7, 3.8 43.5))"),
wkt = "geom", crs = 4326)
time_range <- as.Date(c("2026-01-01", "2026-01-30"))
urls_vj121a2 <- mf_get_url("VJ121A2.002",
c("LST_Day_1KM", "LST_Night_1KM"), roi, time_range)
mf_download_data(urls_vj121a2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.