diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 56e19b26..00000000 --- a/examples/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Examples - -This folder contains process graphs that show how the openEO processes work in practice. - -* [NDVI-UC1: Deriving maximum NDVI measurements over pixel time series](ndvi-uc1/README.md) -* [ZONAL-UC3: Compute time series of zonal (regional) statistics over user-specified polygons](zonal-uc3/README.md) -* [EVI: Deriving minimum EVI measurements over pixel time series](evi/README.md) - -Please feel encouraged to add your owns via Pull Requests! - diff --git a/examples/evi/README.md b/examples/evi/README.md deleted file mode 100644 index e5760ce3..00000000 --- a/examples/evi/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# EVI (Enhanced Vegetation Index) - -This example derives minimum EVI measurements over pixel time series of Sentinel 2 imagery. The EVI is defined as follows: `(2.5 * (nir - red)) / ((nir + 6.0 * red - 7.5 * blue) + 1.0)` - -The process graph could be visualized as follows: - -![Graph visualization](visual.png) - -This process graph is meant to be used as batch job or can be lazy evaluated. It returns a GeoTiff file with the computed results. - -This process graph assumes the dataset is called `Sentinel-2`. The temporal extent covered is January 2018 and bands `B02` (blue), `B04` (red) and `B08` (nir) are used for the computation. Please note that the order of the bands in `get_collection` is important as they are requested by their order (index) in the callback. - -## Process Graph - -```json -{ - "dc": { - "process_id": "load_collection", - "description": "Loading the data; The order of the specified bands is important for the following reduce operation.", - "arguments": { - "id": "Sentinel-2", - "spatial_extent": { - "west": 16.1, - "east": 16.6, - "north": 48.6, - "south": 47.2 - }, - "temporal_extent": ["2018-01-01", "2018-02-01"], - "bands": ["B08", "B04", "B02"] - } - }, - "evi": { - "process_id": "reduce", - "description": "Compute the EVI. Formula: 2.5 * (NIR - RED) / (1 + NIR + 6*RED + -7.5*BLUE)", - "arguments": { - "data": {"from_node": "dc"}, - "dimension": "spectral", - "reducer": { - "callback": { - "nir": { - "process_id": "array_element", - "arguments": { - "data": {"from_argument": "data"}, - "index": 0 - } - }, - "red": { - "process_id": "array_element", - "arguments": { - "data": {"from_argument": "data"}, - "index": 1 - } - }, - "blue": { - "process_id": "array_element", - "arguments": { - "data": {"from_argument": "data"}, - "index": 2 - } - }, - "sub": { - "process_id": "subtract", - "arguments": { - "data": [{"from_node": "nir"}, {"from_node": "red"}] - } - }, - "p1": { - "process_id": "product", - "arguments": { - "data": [6, {"from_node": "red"}] - } - }, - "p2": { - "process_id": "product", - "arguments": { - "data": [-7.5, {"from_node": "blue"}] - } - }, - "sum": { - "process_id": "sum", - "arguments": { - "data": [1, {"from_node": "nir"}, {"from_node": "p1"}, {"from_node": "p2"}] - } - }, - "div": { - "process_id": "divide", - "arguments": { - "data": [{"from_node": "sub"}, {"from_node": "sum"}] - } - }, - "p3": { - "process_id": "product", - "arguments": { - "data": [2.5, {"from_node": "div"}] - }, - "result": true - } - } - } - } - }, - "mintime": { - "process_id": "reduce", - "description": "Compute a minimum time composite by reducing the temporal dimension", - "arguments": { - "data": {"from_node": "evi"}, - "dimension": "temporal", - "reducer": { - "callback": { - "min": { - "process_id": "min", - "arguments": { - "data": {"from_argument": "data"} - }, - "result": true - } - } - } - } - }, - "save": { - "process_id": "save_result", - "arguments": { - "data": {"from_node": "mintime"}, - "format": "GTiff" - }, - "result": true - } -} -``` - -## Result - -TBD \ No newline at end of file diff --git a/examples/evi/visual.png b/examples/evi/visual.png deleted file mode 100644 index e8f49b9a..00000000 Binary files a/examples/evi/visual.png and /dev/null differ diff --git a/examples/ndvi-uc1/README.md b/examples/ndvi-uc1/README.md deleted file mode 100644 index aa9e3491..00000000 --- a/examples/ndvi-uc1/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# NDVI (POC Use Case 1) - -This example derives maximum NDVI measurements over pixel time series of Sentinel 2 imagery. - -This process graph is meant to be used as secondary web service. If you want to run it as a batch job, you'd need to store the results to a file with the `save_result` process. - -This process graph assumes the dataset is called `Sentinel-2`. It receives the spatial extent for the data to compute from the secondary web service as variables in `spatial_extent_west`, `spatial_extent_east` etc. The temporal extent covered is January 2018. - -Process Graph #1 computes the NDVI based on the common band names in the metadata. If these entries are not available, you'd need to switch the process to `normalized_difference` in combination with `filter_bands` to manually specify the red and nir bands. This is shown in Process Graph #2. - -## Process Graphs - -### #1 - -```json -{ - "loadco1": { - "process_id": "load_collection", - "arguments": { - "id": "Sentinel-2", - "spatial_extent": { - "west": { - "variable_id": "spatial_extent_west" - }, - "east": { - "variable_id": "spatial_extent_east" - }, - "north": { - "variable_id": "spatial_extent_north" - }, - "south": { - "variable_id": "spatial_extent_south" - } - }, - "temporal_extent": [ - "2018-01-01", - "2018-02-01" - ] - } - }, - "ndvi1": { - "process_id": "ndvi", - "arguments": { - "data": { - "from_node": "loadco1" - } - } - }, - "reduce1": { - "process_id": "reduce", - "arguments": { - "data": { - "from_node": "ndvi1" - }, - "dimension": "temporal", - "reducer": { - "callback": { - "max1": { - "process_id": "max", - "arguments": { - "data": { - "from_argument": "data" - } - }, - "result": true - } - } - } - }, - "result": true - } -} -``` - -### #2 - -```json -{ - "load_collection": { - "arguments": { - "id": "Sentinel-2", - "spatial_extent": { - "west": { - "variable_id": "spatial_extent_west" - }, - "east": { - "variable_id": "spatial_extent_east" - }, - "north": { - "variable_id": "spatial_extent_north" - }, - "south": { - "variable_id": "spatial_extent_south" - } - }, - "temporal_extent": [ - "2018-01-01", - "2018-02-01" - ] - }, - "process_id": "load_collection" - }, - "b1": { - "arguments": { - "data": { - "from_node": "load_collection" - }, - "bands": [ - "B4" - ] - }, - "process_id": "filter_bands" - }, - "b2": { - "arguments": { - "data": { - "from_node": "load_collection" - }, - "bands": [ - "B8" - ] - }, - "process_id": "filter_bands" - }, - "normalized_difference": { - "arguments": { - "band1": { - "from_node": "b1" - }, - "band2": { - "from_node": "b2" - } - }, - "process_id": "normalized_difference" - }, - "reduce": { - "arguments": { - "data": { - "from_node": "normalized_difference" - }, - "dimension": "temporal", - "reducer": { - "callback": { - "max": { - "arguments": { - "data": { - "from_argument": "data" - } - }, - "process_id": "max", - "result": true - } - } - } - }, - "process_id": "reduce" - } -} -``` - -## Result - -Executing this process graph on Google Earth Engine gives the following exemplary results for a user-defined area: - -![Resulting Image](gee-result.png) \ No newline at end of file diff --git a/examples/ndvi-uc1/gee-result.png b/examples/ndvi-uc1/gee-result.png deleted file mode 100644 index f8dafc63..00000000 Binary files a/examples/ndvi-uc1/gee-result.png and /dev/null differ diff --git a/examples/zonal-uc3/README.md b/examples/zonal-uc3/README.md deleted file mode 100644 index dcfc8a54..00000000 --- a/examples/zonal-uc3/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Zonal Statistics (POC Use Case 3) - -This example computes time series of zonal (regional) statistics of Sentinel 2 imagery over user-specified polygons. - -This process graph is meant to be used as batch job or can be lazy evaluated. It returns a JSON file with the computed results. - -This process graph assumes the dataset is called `Sentinel-2`. The temporal extent covered is January 2017, an arbitrary spatial extent was chosen and it uses band `B8` for the computations. Please note that we still need to remove (reduce) the spectral dimension from the data cube (see node `reduce1`) as removing all bands except one still keeps the spectral dimension for the bands. - -Only a single GeoJSON polygon is specified, which fully covers the spatial extent specified in `load_collection`. We compute the mean for the values in the polygon. - -## Process Graph - -```json -{ - "loadco1": { - "process_id": "load_collection", - "arguments": { - "id": "Sentinel-2", - "spatial_extent": { - "west": 16.1, - "east": 16.6, - "north": 48.6, - "south": 47.2 - }, - "temporal_extent": [ - "2017-01-01", - "2017-02-01" - ], - "bands": [ - "B8" - ] - } - }, - "reduce1": { - "process_id": "reduce", - "arguments": { - "data": { - "from_node": "loadco1" - }, - "dimension": "spectral" - } - }, - "aggreg1": { - "process_id": "aggregate_polygon", - "arguments": { - "data": { - "from_node": "reduce1" - }, - "polygons": { - "type": "Polygon", - "coordinates": [ - [ - [ - 16.138916, - 48.320647 - ], - [ - 16.524124, - 48.320647 - ], - [ - 16.524124, - 48.1386 - ], - [ - 16.138916, - 48.1386 - ], - [ - 16.138916, - 48.320647 - ] - ] - ] - }, - "reducer": { - "callback": { - "mean1": { - "process_id": "mean", - "arguments": { - "data": { - "from_argument": "data" - } - }, - "result": true - } - } - } - } - }, - "savere1": { - "process_id": "save_result", - "arguments": { - "data": { - "from_node": "aggreg1" - }, - "format": "JSON" - }, - "result": true - } -} -``` - -## Result - -We haven't yet clearly specified the output format for this process. Therefore, the results may vary between back-ends. Executing a similar process graph on Google Earth Engine gives the following results: - -``` -{ - "result": 6303.442644344102, - "result_pixel_count": null, - "result_invalid_count: null -} -``` \ No newline at end of file