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

Geospatial methods for process graph building

przell opened this issue · comments

Title Geospatial methods for process graph building
Date 2021-11-18
Issue #97
Category Interoperability
Description In order to adopt common geo-spatial operations in R, we need to identify and implement spatial functions that potentially add a usability value. As identified options there are the use of sf objects as values for process parameters that allow to GeoJSON. Additionally some commodity functions shall be overloaded such as st_bbox to easily set or extract the bounding box. Also st_crop can be overloaded to replace the spatial extent of the process graph.
Dependencies sf, stars
Links
Priority Medium
Impact Medium
Effort High

sf as bbox, stars object as bbox... intergration of openEO workflow and r geospatial

@flahn @edzer @m-mohr
starting the mapping here, using:
https://r-spatial.github.io/sf/reference/index.html
https://r-spatial.github.io/stars/reference/index.html
https://r-spatial.github.io/stars/articles/stars3.html
https://docs.openeo.cloud/processes/

R openEO Notes
dplyr::filter() filter_spatial, filter_temporal probably some more openEO processes
dplyr::slice() ??? should drop the dimension to which it's applied
stars::st_apply() reduce_dimension() not possible to track dimensions of datacube in openEO -> not possible to know which dims to specify in st_apply()
aggregate() aggregate_spatial()
aggregate_temporal()
aggregate_temporal_period()
mask_polygon()

In a6ddf01 I added the st_bbox() support

sf objects for polygons and bounding box are supported now for process parameter, where either GeoJSON or a BoundingBox is expected as value. The process description of openEO processes from the back-end determine if such R objects can be used.

Regarding the tidyverse operations there were not many applications were it showed a real benefit with the current openEO API. filter would have been useful, but a user cannot get information about the fields over which a data collection could have been filtered.

Also, the function wrapping of the aggregate and reduce functions into stars function was not beneficial, unless changes on the dimensions would have been tracked.

External repositories have been created to further explore the possibilities (https://github.com/hurielreichel/tidyopeneo).