Open-EO / openeo-r-client

R client package for working with openEO backends

Home Page:https://open-eo.github.io/openeo-r-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

callback function does recognize nested callback arguments in anyOf

opened this issue · comments

Code used is below for getting the error ("No callbacks found in the parameters of the stated process"), possibly related to parsing of anyOf field in the reduce process description,

library(magrittr)
library(openeo)
library(tibble)

conn = connect(host="https://openeo.eurac.edu",user="aceo",password="aceo_123",login_type="basic")
graph = conn %>% process_graph_builder()

data1 = graph$load_collection(id = graph$data$openEO_S2_32632_10m_L2A, spatial_extent = list(west = 11.2792, south = 46.4643, east = 11.4072, north = 46.5182), temporal_extent = c("2018-06-04T00:00:00Z","2018-06-23T00:00:00Z"))
ndvi = graph$ndvi()
reducer = graph$reduce(data = ndvi, dimension = "temporal")
cb1_graph = conn %>% callback(reducer, parameter = "reducer")

@przell

Yeah, it seems to be a problem with the AnyOf field. Currently the function only checks for parameters of type "callback". I will extend the search also to anyOf.

Since the callbacks in the AnyOf argument are different the user has to state now which one they want to use. This is relevant for the $data part of the graph builder, because there are different data injections and the user wants to have those for the process graph modelling.