Users can request raw satellite data, simple band combinations such as false colour composites, calculations of simple remote sensing indices like NDVI, or more advanced processing such as calculation of Leaf area index (LAI).
Usage
dse_sh_process(
input,
output,
evalscript,
destination,
...,
token = dse_access_token()
)Arguments
- input
A named
listspecifying the input satellite data to be processed withevalscriptto an image. A correctly formattedlistcan be created withdse_sh_prepare_input().- output
A named
listspecifying the how to present the output image, create withevalscript. A correctly formattedlistcan be created withdse_sh_prepare_output().- evalscript
A
characterstring containing a piece of JavaScript, that will be run on the Sentinel Hub server. It is used to translate satellite data to pixel data in a georeferenced image. For more information on setting up such a script please consult the API documentation. You can also usedse_sh_get_custom_script()to obtain ready-to-go scripts from the SentinelHub repository.- 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.
Value
A httr2_response class object containing the
location of the downloaded file at its destination.
Details
Use dse_sh_use_requests_builder() if you want to use the graphical
user interface at
Sentinel Requests Builder.
to define a request.
Examples
if (interactive() && dse_has_client_info()) {
bounds <- c(5.261, 52.680, 5.319, 52.715)
## prepare input data
input <-
dse_sh_prepare_input(
bounds = bounds,
time_range = c("2025-06-01 UTC", "2025-07-01 UTC")
)
## prepare ouput format
output <- dse_sh_prepare_output(bbox = bounds)
## retrieve processing script
evalscript <- dse_sh_get_custom_script("/sentinel-2/l2a_optimized/")
fl <- tempfile(fileext = ".tiff")
## send request and download result:
dse_sh_process(input, output, evalscript, fl)
if (requireNamespace("stars")) {
library(stars)
enkhuizen <- read_stars(fl) |> suppressWarnings()
plot(enkhuizen, rgb = 1:3, axes = TRUE, main = "Enkhuizen")
}
}