Skip to content

Commit

Permalink
deploy: 8d97190
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Nov 2, 2023
1 parent 4fc0526 commit 62833c9
Showing 28 changed files with 1,621 additions and 1,565 deletions.
77 changes: 77 additions & 0 deletions _sources/part2/advanced_workflows.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Advanced workflows in openEO

## Authors & Contributors

- Jeroen Dries, VITO (Belgium)

## Objectives

- Learn about what is achievable with standardized openEO processes
- What are openEO platform 'credits'
- Learn about metadata generation in openEO


## Case 1 Rank composites

Scientifically correct compositing is the foundation of many EO processing workflows.
This case shows a max-NDVI composite, which is also a template for more advanced composites.

Key takeaways:
- Use array_apply to 'loop' over data
- Create masks to selectively load data

https://github.com/Open-EO/openeo-community-examples/blob/main/python/RankComposites/rank_composites.ipynb

## Case 2 Machine learning training and inference
@@ -14,13 +31,73 @@ regarded by many as a baseline against which more complex approaches can be comp
Operational products, like [Copernicus landcover 3.0](https://land.copernicus.eu/global/products/lc) are
also based on random forest.

Key takeaways:
- Transform a timeseries datacube into features for learning
- Use ML processes directly from openEO

Dynamic landcover: https://docs.openeo.cloud/usecases/landcover/

## Case 3 ESA WorldWater

ESA WorldWater is an example of rule based classification, using Sentinel-2 and Sentinel-1, it was developed
by DHI-GRAS.

Key takeaways:
- Use of complex, rule-based classification

Note: the most recent code of this example is still under review in a pull request, so we include the relevant bits inline.

https://github.com/DHI-GRAS/worldwater-toolbox
https://github.com/DHI-GRAS/worldwater-toolbox/blob/ccd01afef4d634c3727c7f3d06e423acf7680131/world_water_toolbox/wwt.py

ESA Worldwater formulas are written using predefined functions:

```python
from openeo.processes import if_, exp, array_element, log, count, gte, eq, sum

LOOKUPTABLE = {
"Deserts": {
"S1": lambda vh, vv: 1 / (1 + exp(- (-7.03 + (-0.44 * vv)))),
"S2": lambda ndvi, ndwi: 1 / (1 + exp(- (0.133 + (-5.92 * ndvi) + (14.82 * ndwi)))),
"S1_S2": lambda vv, ndvi, ndwi: 1 / (1 + exp(- (-3.69 + (-0.25 * vv) + (0.47 * ndvi) + (15.3 * ndwi)))),
},
"Mountain": {
"S1": lambda vh, vv: 1 / (1 + exp(- (-3.76 + (-0.262 * vv)))),
"S2": lambda ndvi, ndwi: 1 / (1 + exp(- (0.262 + (0.75 * ndvi) + (12.65 * ndwi)))),
"S1_S2": lambda vv, ndvi, ndwi: 1 / (1 + exp(- (-1.13 + (-0.11 * vv) + (3.03 * ndvi) + (13.21 * ndwi)))),
},
...
}

```


An openEO 'apply_dimension' over bands is used to compute final water occurance.

```python
from openeo.processes import if_, exp, array_element, log, count, gte, eq, sum

merged = s1_s2_water.merge_cubes(s2_median_water).merge_cubes(s1_median_water)

def combined(bands):
s1_s2_water = bands.array_element(0)
s1_s2_mask = s1_s2_water >= 0

s2_median_water = bands.array_element(1)
s2_mask = if_(s1_s2_mask == 0, s2_median_water) >= 0

s1_median_water = bands.array_element(2)
s1_mask = if_(s2_mask == 0, if_(s1_s2_mask == 0, s1_median_water)) >= 0

s1_s2_masked = if_(s1_s2_mask != 0, s1_s2_water, 0)
s2_masked = if_(s2_mask != 0, s2_median_water, 0)
s1_masked = if_(s1_mask != 0, s1_median_water, 0)

return s1_s2_masked + s2_masked + s1_masked

merge_all = merged.apply_dimension(combined, dimension='bands')

```

A similar water detection example is the AquaMonitor, developed by Deltares:
https://github.com/c-scale-community/use-case-aquamonitor
6 changes: 1 addition & 5 deletions about/timeline.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions afterword/envds-book.html
Original file line number Diff line number Diff line change
@@ -190,11 +190,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions afterword/pythia.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions afterword/resources.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions before/EOSC.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions before/copernicus.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions before/openeo.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions before/setup.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions genindex.html
Original file line number Diff line number Diff line change
@@ -188,11 +188,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions intro.html
Original file line number Diff line number Diff line change
@@ -190,11 +190,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
Binary file modified objects.inv
Binary file not shown.
6 changes: 1 addition & 5 deletions part1/motivation.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
6 changes: 1 addition & 5 deletions part1/overview.html
Original file line number Diff line number Diff line change
@@ -191,11 +191,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 2 - OpenEO</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="../part2/agenda_and_links.html">Agenda</a></li>
<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Case 1 Rank composites</a></li>




<li class="toctree-l1"><a class="reference internal" href="../part2/advanced_workflows.html">Advanced workflows</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Part 3</span></p>
<ul class="nav bd-sidenav">
Loading

0 comments on commit 62833c9

Please sign in to comment.