Use Requests Builder to Send Processing Request to SentinelHub
Source:R/sentinelhub.R
dse_sh_use_requests_builder.RdUse
Sentinel Requests Builder
to compose a request. Copy the text from the 'Request Preview' panel
and submit with this function. Use dse_sh_process() when you want
to define a request in R, without using a web browser.
Usage
dse_sh_use_requests_builder(
build,
destination,
...,
token = dse_access_token()
)Arguments
- build
A
characterstring copied from the Request Preview panel at Sentinel Requests Builder. Seesystem.file("requests-builder.txt", package = "CopernicusDataspace")for an example of such a text. When you omit this argument, this function will attempt to retrieve the text from the system's clipboard.- destination
A file name to store the downloaded image.
- ...
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.
Examples
## Read text copied from 'Request Preview' panel on
## <https://apps.sentinel-hub.com/requests-builder/>:
requests_builder <-
system.file("requests-builder.txt", package = "CopernicusDataspace") |>
readLines(warn = FALSE) |>
paste(collapse = "\n")
if (interactive() && dse_has_client_info()) {
dest <- tempfile(fileext = ".tiff")
dse_sh_use_requests_builder(requests_builder, destination = dest)
}