compute_result: Executes a job and returns the data immediately

View source: R/jobs.R

compute_resultR Documentation

Executes a job and returns the data immediately

Description

Executes a job directly on the connected openEO service and returns the data. During the execution phase the connection to the server remains open. This function allows to debug the code and check the results immediately. Please keep in mind, that computational functions might be related to monetary costs, if no 'free' plan is available. Make sure to keep the data selection relatively small, also some openEO service provider might offer limited processes support, e.g. not supporting UDFs at this endpoint. When a file format is set, then the process graph will be parsed and the arguments for 'save_result' will be replaced. If the 'stars' package is installed and parameter as_stars is set to TRUE, then the downloaded data is opened and interpreted into a stars object.

Usage

compute_result(
  graph,
  output_file = NULL,
  budget = NULL,
  plan = NULL,
  as_stars = FALSE,
  format = NULL,
  con = NULL,
  ...
)

Arguments

graph

a Graph(), a function returning a ProcessNode() as an endpoint or the ProcessNode() will return the results

output_file

storage location for the returned data

budget

numeric, maximum spendable amount for testing

plan

character, selection of a service plan

as_stars

logical to indicate if the data shall be interpreted as a stars object

format

character or FileFormat specifying the File format for the output, if 'save_result' is not set in the process then it will be added otherwise the value stated here will replace the original value.

con

connected and authenticated openEO client (optional) otherwise active_connection() is used.

...

additional parameters passed to jsonlite::toJSON() (like 'digits') or additional arguments that shall be passed to the openEO process 'save_result'

Value

a local path to the downloaded file or a stars object if as_stars=TRUE

Note

If parameter 'format' is ignored, it is assumed that 'save_result' was already used in the process graph. Otherwise it is up to the back-end provider how data is stored if 'save_result' was omitted.


openeo documentation built on Nov. 17, 2022, 5:07 p.m.