Create a Request for a STAC Search in the Data Space Ecosystem
Source:R/stac.R
dse_stac_search_request.RdIn order to perform a search using the STAC API, you first need to
create a request using dse_stac_search_request(). This creates
a httr2::request() to which tidy verbs ?tidy_verbs can be applied
(e.g., dplyr::select(), dplyr::filter() and dplyr::arrange().
Results are retrieved by calling dplyr::collect() on the request.
Details
If you prefer a graphical user interface, you can alternatively use the STAC web browser.
Examples
if (interactive()) {
library(dplyr)
library(sf)
bbox <-
sf::st_bbox(
c(xmin = 5.261, ymin = 52.680, xmax = 5.319, ymax = 52.715),
crs = 4326)
dse_stac_search_request("sentinel-2-l1c") |>
filter(`eo:cloud_cover` < 10) |>
collect()
dse_stac_search_request("sentinel-1-grd") |>
filter(`sat:orbit_state` == "ascending") |>
arrange("id") |>
st_intersects(bbox) |>
collect()
}