Skip to contents

In order to perform a search using the STAC API, you first need to create a request using dse_sh_search_request(). This creates a httr2::request() to which tidy verbs ?tidy_verbs can be applied (e.g., dplyr::select() and dplyr::filter(). Results are retrieved by calling dplyr::collect() on the request.

Usage

dse_sh_search_request(
  collection,
  bbox,
  datetime,
  ...,
  token = dse_access_token()
)

Arguments

collection

A collection for which to list the features. See dse_sh_collections() for a list of Sentinel Hub collections.

bbox

An object that can be converted into a bbox class object (see sf::st_bbox()).

datetime

A date-time object, or a vector of two date time objects (in case of a range). Or an object that can be converted into a datetime object.

...

Ignored

token

For authentication, many of the Dataspace Ecosystem uses an access token. Either provide your access token, or obtain one automatically with dse_access_token() (default). Without a valid token you will likely get an "access denied" error.

Value

Returns a sentinel_request class object, which inherits from the httr2::request class. Call dplyr::collect() on it to retrieve results.

Examples

if (interactive() && dse_has_client_info()) {
  library(dplyr)
  
  dse_sh_search_request(
    collection = "sentinel-2-l2a",
    bbox       = c(5.261, 52.680, 5.319, 52.715),
    datetime   = c("2025-01-01 UTC", "2025-01-31 UTC")
  ) |>
    filter(`eo:cloud_cover` <= 10) |>
    collect()
}