Greetings
I am trying to ARD process SENTINEL2_L1C data for a small area in Southern Sweden surrounding an eddy covariance tower. The bounding box information defined in the Swedish national CRS and stored in a list:
> bbox_h
$west
[1] 401150
$south
[1] 6217572
$east
[1] 402124.3
$north
[1] 6218560
$crs
[1] 3006
I have tried to process a small test batch of SENTINEL2_L1C data to analysis ready format as:
# Connect and log in
con = connect(host = "https://openeo.cloud")
login()
# Available processing options and output formats
p = processes()
formats <- list_file_formats()
# Load data
data_h <- p$load_collection(
id = "SENTINEL2_L1C",
spatial_extent = bbox_h,
temporal_extent = c("2018-06-01", "2018-06-20"),
bands=c("B04","B08","B8A","B11"))
ard_h = p$ard_surface_reflectance(
data = data_h,
elevation_model = NULL,
atmospheric_correction_method = 'FORCE',
atmospheric_correction_options = c(res_merge='NONE',do_brdf =T, do_topo=T),
cloud_detection_method = 'Fmask',
cloud_detection_options = c(erase_clouds= T, max_cloud_cover_frame=85))
ard_data = p$save_result(data=ard_h, format=formats$output$GTiff)
job <- create_job(graph = ard_data, title = "ard_hyltemossa")
start_job(job = job)
This prompts an error message:
HTTP 500 Internal Server Error.
ā¢ SERVER-ERROR: Failed to create job on backend āeodcā: OpenEoApiError(ā[404] 404: {āErrorā: āNo data found for this spatiotemporal extentā} (ref: a97d98cf-ef3b-416f-bf2c-768a43a4c892)ā)Warning messages:
1: In is.environment(value) || !is.na(value) :
ālength(x) = 2 > 1ā in coercion to ālogical(1)ā
2: In is.environment(value) || !is.na(value) :
ālength(x) = 4 > 1ā in coercion to ālogical(1)ā
3: In is.environment(value) || !is.na(value) :
ālength(x) = 3 > 1ā in coercion to ālogical(1)ā
4: In is.environment(value) || !is.na(value) :
ālength(x) = 2 > 1ā in coercion to ālogical(1)ā
5: In is.environment(value) || !is.na(value) :
ālength(x) = 5 > 1ā in coercion to ālogical(1)ā
6: In !is.environment(self$getValue()) && is.na(self$getValue()) :
ālength(x) = 5 > 1ā in coercion to ālogical(1)ā
7: In !is.environment(self$getValue()) && is.na(self$getValue()) :
ālength(x) = 2 > 1ā in coercion to ālogical(1)ā
8: In length(self$getValue()) == 0 || is.na(self$getValue()) :
ālength(x) = 2 > 1ā in coercion to ālogical(1)ā
9: In !is.environment(self$getValue()) && is.na(self$getValue()) :
ālength(x) = 4 > 1ā in coercion to ālogical(1)ā
10: In length(self$getValue()) == 0 || is.na(self$getValue()) :
ālength(x) = 4 > 1ā in coercion to ālogical(1)ā
I have tried changing the temporal extent, defining the bbox in latlon and using a simple feature as input for the spatial_extent. These did not have any affect. I am running on Windows with R version 4.2.2 and openeo_1.2.2.
NEWS for R version 4.2.2 (2022-10-31) states that:
Calling if() or while() with a condition of length greater than one gives an error rather than a warning
Having hard time to interpret this error.
How should the SENTINEL2_1C collection be correctly loaded when using R?