diff --git a/404.html b/404.html index 15c439059..948c05b9f 100644 --- a/404.html +++ b/404.html @@ -8,13 +8,13 @@ - + -

404

There's nothing here.
+ - + diff --git a/api/index.html b/api/index.html index 99cc05c75..d7e288984 100644 --- a/api/index.html +++ b/api/index.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@
- + diff --git a/assets/js/40.bbc26780.js b/assets/js/40.ff15617b.js similarity index 99% rename from assets/js/40.bbc26780.js rename to assets/js/40.ff15617b.js index 0deb43d67..632a2b3b3 100644 --- a/assets/js/40.bbc26780.js +++ b/assets/js/40.ff15617b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{367:function(t,a,s){t.exports=s.p+"assets/img/seamask.7825e940.png"},368:function(t,a,s){t.exports=s.p+"assets/img/dashboard.c1519458.png"},369:function(t,a,s){t.exports=s.p+"assets/img/dashboard_with_raster.3d92dc9a.png"},597:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"vessel-detection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vessel-detection"}},[t._v("#")]),t._v(" Vessel Detection")]),t._v(" "),a("p",[t._v("In this notebook we will learn how to apply adaptive thresholding to SENTINEL1_GRD data within OpenEO Platform. We will then take a look at our results against vessel location data from the Maritime Traffic Agency over the Adriatic. We will be using the the openeo-python-client to prepare our process graph, and a Plotly Dash dashboard to interact with our results.")]),t._v(" "),a("h2",{attrs:{id:"adaptive-thresholding-in-xarray"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adaptive-thresholding-in-xarray"}},[t._v("#")]),t._v(" Adaptive Thresholding in Xarray")]),t._v(" "),a("p",[t._v("After investigating the code initially provided by Planetek, we arrived at this xarray implementation of adaptive thresholding.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("WINDOW_LAT_SIZE "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v("\nWINDOW_LON_SIZE "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v("\nTHRESHOLD_FACT "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\nout "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ones_like"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nrolling_mean "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rolling"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n longitude"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("WINDOW_LAT_SIZE"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" latitude"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("WINDOW_LON_SIZE"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nthresholded_image "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" rolling_mean "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" THRESHOLD_FACT\nraster "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" out"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("thresholded_image "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" other"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We are going to port this into an OpenEO process graph.")]),t._v(" "),a("h3",{attrs:{id:"_1-authenticate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-authenticate"}},[t._v("#")]),t._v(" 1. Authenticate")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nbackend "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),t._v("\nconn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("backend"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"_2-pre-processing-prep"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-pre-processing-prep"}},[t._v("#")]),t._v(" 2. Pre-processing prep")]),t._v(" "),a("p",[t._v("This process graph requires either a sea or land mask to remove the land from our AOI. A seamask has been prepared for this example and is available on github. It was derived using the "),a("a",{attrs:{href:"https://land.copernicus.eu/content/corine-land-cover-nomenclature-guidelines/html/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Water Bodies"),a("OutboundLink")],1),t._v(" classes from Corine Land Cover.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" folium\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# We are going to use the following GeoJson to operate as a sea mask for out process graph.")]),t._v("\nSEA_MASK "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://raw.githubusercontent.com/SerRichard/sea_mask/main/sea-mask-4326.json"')]),t._v("\n\nfig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" folium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Figure"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("width"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("600")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" height"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("400")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" folium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Map"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("location"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.465488")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.602316")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" zoom_start"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfolium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("GeoJson"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("SEA_MASK"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_to"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_child"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[a("img",{attrs:{src:s(367),alt:"SeaMask to be used"}})]),t._v(" "),a("h3",{attrs:{id:"_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"}},[t._v("#")]),t._v(" 3. Defining a process graph to detect vessels in our AOI.")]),t._v(" "),a("p",[t._v("The spatial_extent we have defined includes, but is not limited to the sea mask that we will be using. We will use both available polarizations from the SENTINEL1_GRD collection, and run this graph on a little over a weeks worth of data.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.194377989297493")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.758093271633888")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.24420099164355")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.85455845353388")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-10-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-10-09"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ns1_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Load the geometries as a vector cube. This is currently a custom process, so is not available at all backend. Could be replaced with load_url if this is an issue.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("sea_mask "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s1_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"load_vector_cube"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"URL"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" SEA_MASK"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Replace the values that lie outside of our polygon with NaN values.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("masked_data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s1_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mask_polygon"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sea_mask"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("To achieve the equivalent functionality of "),a("code",[t._v("data.rolling()")]),t._v(", we will use the process apply_kernel. The kernel will be the length and width of the window we want to apply the convolution to. The value of each pixel in the kernel is equal to "),a("code",[t._v("1/(kernel_width*kernel_height)")]),t._v(", spreading the weight evenly will achieve a mean for across the pixels in the kernel. The resut of the convolution is multiplied then multipled in the process by the factor value.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("kernel_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.00104")]),t._v("\nkernel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n kernel_value "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("range")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" x "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("range")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\napplied_kernel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" masked_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kernel"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("factor"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Next we want to compare the results of apply_kernel, against the values of the data we initially masked. We can use the process merge_cubes with the overlap resolver set to the less than process to acheive this.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("lt_comparison "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" applied_kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("merge_cubes"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n masked_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" overlap_resolver"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lt"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Convert the resulting boolean datacube to a vector cube, and output the result in save result as a GeoJson. This will make the comparison of our results with the Maritime traffic data more straight forward.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("output_data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lt_comparison"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("raster_to_vector"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("vessel_detection "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" output_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeoJSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"_4-run-auxilliary-job"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-run-auxilliary-job"}},[t._v("#")]),t._v(" 4. Run Auxilliary job")]),t._v(" "),a("p",[t._v("You can optionally run the following job, if you would like to compare the original Sentinel1_GRD data, against the results from the vessel detection. This comparison makes it easier to visually validate the results, and spot erroneous polygons.")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('sentinel1_data = s1_datacube.save_result(format="GTiff")\nsentinel1_data_job = sentinel1_data.create_job(title = "UC2-Auxilliary-Job")\nsentinel1_data_job.start_job()\n')])])]),a("h2",{attrs:{id:"result-visualisation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#result-visualisation"}},[t._v("#")]),t._v(" Result Visualisation")]),t._v(" "),a("p",[t._v("A small dashboard has been provided with the Plotly Dash library to quickly visualise the results of our processing. We're using this dashboard so we can interface with the PyGeoApi server that hosts the Maritime Traffic data. You will need to use the canonical url of the job result, this can be found in the notebook via a helper fuinction, or in the job information via the web editor.")]),t._v(" "),a("p",[t._v("PyGeoApi Data: https://features.dev.services.eodc.eu/collections/adriatic_vessels")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" eodc"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("visualisation"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("vessel_detection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("app "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" app\napp"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h4",{attrs:{id:"plotly-dashboard-for-results-viewing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#plotly-dashboard-for-results-viewing"}},[t._v("#")]),t._v(" Plotly Dashboard for results viewing")]),t._v(" "),a("p",[a("img",{attrs:{src:s(368),alt:"Plotly Dashboard"}})]),t._v(" "),a("h4",{attrs:{id:"with-the-additional-auxilliary-job"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#with-the-additional-auxilliary-job"}},[t._v("#")]),t._v(" With the additional auxilliary job")]),t._v(" "),a("p",[a("img",{attrs:{src:s(369),alt:"Plotly Dashboard"}})]),t._v(" "),a("h2",{attrs:{id:"use-case-recap"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#use-case-recap"}},[t._v("#")]),t._v(" Use Case -- Recap")]),t._v(" "),a("p",[t._v("We've been through a number of iterations to arrive at this implementation.")]),t._v(" "),a("ol",[a("li",[t._v('Recieved an initial implementation from Planetek, which we packaged and released as a custom function, "vessel_detection".')]),t._v(" "),a("li",[t._v('Porting to Xarray. This resulted in a single function called "adaptive_thresholding", that removed the dependency to the ellipsoid corrected SENTINEL1_GRD imagery.')]),t._v(" "),a("li",[t._v("Porting to existing OpenEO processes. This addresses the feedback from the previous review, i.e. the implementation should be reproducable for this use case.")])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{367:function(t,a,s){t.exports=s.p+"assets/img/seamask.7825e940.png"},368:function(t,a,s){t.exports=s.p+"assets/img/dashboard.c1519458.png"},369:function(t,a,s){t.exports=s.p+"assets/img/dashboard_with_raster.3d92dc9a.png"},598:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"vessel-detection"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vessel-detection"}},[t._v("#")]),t._v(" Vessel Detection")]),t._v(" "),a("p",[t._v("In this notebook we will learn how to apply adaptive thresholding to SENTINEL1_GRD data within OpenEO Platform. We will then take a look at our results against vessel location data from the Maritime Traffic Agency over the Adriatic. We will be using the the openeo-python-client to prepare our process graph, and a Plotly Dash dashboard to interact with our results.")]),t._v(" "),a("h2",{attrs:{id:"adaptive-thresholding-in-xarray"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#adaptive-thresholding-in-xarray"}},[t._v("#")]),t._v(" Adaptive Thresholding in Xarray")]),t._v(" "),a("p",[t._v("After investigating the code initially provided by Planetek, we arrived at this xarray implementation of adaptive thresholding.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("WINDOW_LAT_SIZE "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v("\nWINDOW_LON_SIZE "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v("\nTHRESHOLD_FACT "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v("\nout "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ones_like"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nrolling_mean "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rolling"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n longitude"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("WINDOW_LAT_SIZE"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" latitude"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("WINDOW_LON_SIZE"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" center"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nthresholded_image "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" rolling_mean "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" THRESHOLD_FACT\nraster "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" out"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("thresholded_image "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" other"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We are going to port this into an OpenEO process graph.")]),t._v(" "),a("h3",{attrs:{id:"_1-authenticate"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_1-authenticate"}},[t._v("#")]),t._v(" 1. Authenticate")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nbackend "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),t._v("\nconn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("backend"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"_2-pre-processing-prep"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_2-pre-processing-prep"}},[t._v("#")]),t._v(" 2. Pre-processing prep")]),t._v(" "),a("p",[t._v("This process graph requires either a sea or land mask to remove the land from our AOI. A seamask has been prepared for this example and is available on github. It was derived using the "),a("a",{attrs:{href:"https://land.copernicus.eu/content/corine-land-cover-nomenclature-guidelines/html/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Water Bodies"),a("OutboundLink")],1),t._v(" classes from Corine Land Cover.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" folium\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# We are going to use the following GeoJson to operate as a sea mask for out process graph.")]),t._v("\nSEA_MASK "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://raw.githubusercontent.com/SerRichard/sea_mask/main/sea-mask-4326.json"')]),t._v("\n\nfig "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" folium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Figure"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("width"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("600")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" height"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("400")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" folium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Map"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("location"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.465488")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.602316")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" zoom_start"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfolium"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("GeoJson"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("SEA_MASK"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_to"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfig"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("add_child"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[a("img",{attrs:{src:s(367),alt:"SeaMask to be used"}})]),t._v(" "),a("h3",{attrs:{id:"_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"}},[t._v("#")]),t._v(" 3. Defining a process graph to detect vessels in our AOI.")]),t._v(" "),a("p",[t._v("The spatial_extent we have defined includes, but is not limited to the sea mask that we will be using. We will use both available polarizations from the SENTINEL1_GRD collection, and run this graph on a little over a weeks worth of data.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("spatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.194377989297493")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.758093271633888")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.24420099164355")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("44.85455845353388")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-10-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2021-10-09"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ns1_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SENTINEL1_GRD"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VV"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"VH"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Load the geometries as a vector cube. This is currently a custom process, so is not available at all backend. Could be replaced with load_url if this is an issue.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("sea_mask "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s1_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"load_vector_cube"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"URL"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" SEA_MASK"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Replace the values that lie outside of our polygon with NaN values.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("masked_data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s1_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mask_polygon"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sea_mask"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("To achieve the equivalent functionality of "),a("code",[t._v("data.rolling()")]),t._v(", we will use the process apply_kernel. The kernel will be the length and width of the window we want to apply the convolution to. The value of each pixel in the kernel is equal to "),a("code",[t._v("1/(kernel_width*kernel_height)")]),t._v(", spreading the weight evenly will achieve a mean for across the pixels in the kernel. The resut of the convolution is multiplied then multipled in the process by the factor value.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("kernel_value "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.00104")]),t._v("\nkernel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n kernel_value "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" y "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("range")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" x "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("range")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\napplied_kernel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" masked_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("kernel"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("factor"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Next we want to compare the results of apply_kernel, against the values of the data we initially masked. We can use the process merge_cubes with the overlap resolver set to the less than process to acheive this.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("lt_comparison "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" applied_kernel"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("merge_cubes"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n masked_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" overlap_resolver"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"lt"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("Convert the resulting boolean datacube to a vector cube, and output the result in save result as a GeoJson. This will make the comparison of our results with the Maritime traffic data more straight forward.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("output_data "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lt_comparison"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("raster_to_vector"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("vessel_detection "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" output_data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeoJSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h3",{attrs:{id:"_4-run-auxilliary-job"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#_4-run-auxilliary-job"}},[t._v("#")]),t._v(" 4. Run Auxilliary job")]),t._v(" "),a("p",[t._v("You can optionally run the following job, if you would like to compare the original Sentinel1_GRD data, against the results from the vessel detection. This comparison makes it easier to visually validate the results, and spot erroneous polygons.")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('sentinel1_data = s1_datacube.save_result(format="GTiff")\nsentinel1_data_job = sentinel1_data.create_job(title = "UC2-Auxilliary-Job")\nsentinel1_data_job.start_job()\n')])])]),a("h2",{attrs:{id:"result-visualisation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#result-visualisation"}},[t._v("#")]),t._v(" Result Visualisation")]),t._v(" "),a("p",[t._v("A small dashboard has been provided with the Plotly Dash library to quickly visualise the results of our processing. We're using this dashboard so we can interface with the PyGeoApi server that hosts the Maritime Traffic data. You will need to use the canonical url of the job result, this can be found in the notebook via a helper fuinction, or in the job information via the web editor.")]),t._v(" "),a("p",[t._v("PyGeoApi Data: https://features.dev.services.eodc.eu/collections/adriatic_vessels")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" eodc"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("visualisation"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("vessel_detection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("app "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" app\napp"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("run"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h4",{attrs:{id:"plotly-dashboard-for-results-viewing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#plotly-dashboard-for-results-viewing"}},[t._v("#")]),t._v(" Plotly Dashboard for results viewing")]),t._v(" "),a("p",[a("img",{attrs:{src:s(368),alt:"Plotly Dashboard"}})]),t._v(" "),a("h4",{attrs:{id:"with-the-additional-auxilliary-job"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#with-the-additional-auxilliary-job"}},[t._v("#")]),t._v(" With the additional auxilliary job")]),t._v(" "),a("p",[a("img",{attrs:{src:s(369),alt:"Plotly Dashboard"}})]),t._v(" "),a("h2",{attrs:{id:"use-case-recap"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#use-case-recap"}},[t._v("#")]),t._v(" Use Case -- Recap")]),t._v(" "),a("p",[t._v("We've been through a number of iterations to arrive at this implementation.")]),t._v(" "),a("ol",[a("li",[t._v('Recieved an initial implementation from Planetek, which we packaged and released as a custom function, "vessel_detection".')]),t._v(" "),a("li",[t._v('Porting to Xarray. This resulted in a single function called "adaptive_thresholding", that removed the dependency to the ellipsoid corrected SENTINEL1_GRD imagery.')]),t._v(" "),a("li",[t._v("Porting to existing OpenEO processes. This addresses the feedback from the previous review, i.e. the implementation should be reproducable for this use case.")])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/53.0f456a8e.js b/assets/js/53.0bb3e5ca.js similarity index 99% rename from assets/js/53.0f456a8e.js rename to assets/js/53.0bb3e5ca.js index f22202d3e..9c9bed13f 100644 --- a/assets/js/53.0f456a8e.js +++ b/assets/js/53.0bb3e5ca.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{360:function(t,s,a){t.exports=a.p+"assets/img/RGBplot_sen2like.a0105b85.png"},361:function(t,s,a){t.exports=a.p+"assets/img/LAI_S2L.e1e81fff.png"},591:function(t,s,a){"use strict";a.r(s);var n=a(4),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"crop-conditions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#crop-conditions"}},[t._v("#")]),t._v(" Crop conditions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("Attention")]),t._v(" "),s("p",[t._v("To use this service, you have to be registered at openEO platform. If you are not yet registered, you can apply "),s("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])]),t._v(" "),s("p",[t._v("To enable higher time-series resolution vegetation indices (such as NDVI, LAI, FAPAR, FCOVER) than the Sentinel-2 time series, we have implemented the computation based on the Sen2Like processor which enables users to process these indices on-demand.")]),t._v(" "),s("p",[t._v("The Sen2Like processor was developed by ESA as part of the EU Copernicus program. It creates Sentinel-2 like harmonized (Level-2H) or fused (Level-2F) surface reflectances by harmonizing Sentinel-2 and Landsat 8/Landsat 9 to increase the temporal revisits. Based on the resulting L2F product, multiple indices can be computed, such as the NDVI and LAI.\nThe fusion also involves the upscaling of Landsat 8/Landsat 9 data to Sentinel-2 resolution.\nWith the new L2F data higher time-series resolution vegetation indices (such as NDVI, LAI, FAPAR, FCOVER) can be calculated.")]),t._v(" "),s("p",[t._v("This document describes how to use the Sen2Like processor in OpenEO for a requested spatio-temporal extent and how to use the new data to calculate indices. We’ve prepared "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-sen2like.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(" that you can use to run the Sen2Like process and another "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(" to calculate some indices.")]),t._v(" "),s("h2",{attrs:{id:"_1-data-preparation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-data-preparation"}},[t._v("#")]),t._v(" 1. data preparation")]),t._v(" "),s("p",[t._v("To start the Sen2Like openEO processing, first we need to connect to the openEO backend.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("datacube "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" THIS\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n\nconn "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("As Sen2Like can only process "),s("code",[t._v("SENTINEL2_L1C")]),t._v(" data, we chose this as our collection and specify the spatial and temporal extent and the bands to compute.\nThe sen2like processing automatically includes the Landsat 8 & 9 data into the computation, so we do not need to call it explicitely. The processing also automatically includes other additional data, such as the digital elevation model and data from the Copernicus Atmosphere Monitoring Service.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("spatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("17.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("49.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-09-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL2_L1C'")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B05"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B06"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B07"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8A"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B11"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B12"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\nS2 "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_2-sen2like-processing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-sen2like-processing"}},[t._v("#")]),t._v(" 2. Sen2like processing")]),t._v(" "),s("p",[t._v("Here, we apply the Sen2Like processing. The "),s("code",[t._v("export_original_files")]),t._v("-parameter has to be true to specify the L2F. A high cloud cover can make data inaccurate, so we ignore files with a higher cloud cover than 50%.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2like "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" S2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sen2like'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" THIS"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'target_product'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'L2F'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'export_original_files'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cloud_cover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("We select a temporal subset of the data to create an RGB.\nRGB stands for red (Band 4), green (Band 3), blue (Band 2) and describes the true colors of an image in remote sensing.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2_small "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2like"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_temporal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bbox"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nrgb "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2_small"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("We save the data into a NetCDF, a file format for storing multidimensional scientific data (variables). Two types of output are created: The Sen2Like original .SAFE files for the extent of four UTM tiles and the NetCDF for a smaller sector.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("rgb_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rgb"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_3-running-the-job"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-running-the-job"}},[t._v("#")]),t._v(" 3. Running the Job")]),t._v(" "),s("p",[t._v("We create and start the openEO job.\nTo reuse the results (e.g. for the "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("indices notebook"),s("OutboundLink")],1),t._v("), we need to know the job id. To see the job status the job-variable has to be called.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rgb_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\njob\n")])])]),s("p",[t._v('Once the job status is "finished", we can download and explore the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("results "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sen2like_outputs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_4-explore-the-openeo-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-explore-the-openeo-results"}},[t._v("#")]),t._v(" 4. Explore the openEO results")]),t._v(" "),s("p",[t._v("To create a plot of our data, we need the libraries numpy, xarray and matplotlib.pyplot. First, the desired data set must be selected.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" xarray "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" xr\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" matplotlib"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pyplot "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" plt\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("path "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./sen2like_outputs/"')]),t._v("\nfiles "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" os"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("listdir"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("endswith"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('".nc"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\ntemp_xarray "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("open_dataset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" chunks"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("expand_dims"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("elif")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("expand_dims"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n temp_xarray"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("append"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("combine_by_coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("temp_xarray"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fill_value"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9999")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("data_t "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("To get a true color image the colors need to get adjusted. Then, we can plot our data.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("brg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("zeros"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("shape"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("shape"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B03"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("14")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B02"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.6")]),t._v("\nbrg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("clip"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("brg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("astype"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("uint8"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("figure"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("title"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"RGB sen2like, Austria 2023"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("brg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("cmap"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'brg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[s("img",{attrs:{src:a(360),alt:"image"}})]),t._v(" "),s("h2",{attrs:{id:"_5-indices-calculations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-indices-calculations"}},[t._v("#")]),t._v(" 5. Indices calculations")]),t._v(" "),s("p",[t._v("To calculate some Indices on our L2F data, we’ve prepared another "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(". We make use of the "),s("code",[t._v("load_stac")]),t._v(" process, to reload the previously computed Sen2Like outputs. This is especially useful, when we compute multiple indices from the same Sen2Like outputs, as the Sen2Like processing only needs to be done once.")]),t._v(" "),s("p",[t._v('To load the results, insert the url with the saved "job_id" into the "load_stac" process. The spatio-temporal extent can be the same or smaller/shorter as in the selected data. We select the bands "B03", "B04", "B05", "B06", "B07", "B8A", "B11", "B12", as these are required in the computation for the following indices.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2like_job_id "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eodc-5d4c1746-33b2-42fb-914c-d36987747ae6"')]),t._v("\nspatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B05"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B06"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B07"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8A"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B11"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B12"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"https://openeo.eodc.eu/openeo/1.1.0/jobs/')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("sen2like_job_id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('/results"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-1-leaf-area-index-lai"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-leaf-area-index-lai"}},[t._v("#")]),t._v(" 5.1 Leaf Area Index (LAI)")]),t._v(" "),s("p",[t._v("The LAI process is based on the computation specified at "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/lai/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(". All needed Bands and angles are included in the Sen2Like output data.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("lai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'lai'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nlai_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v('We create and start the openEO job. Once the job status is "finished", we can download the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./lai/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-2leaf-chlorophyll-content-cab"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-2leaf-chlorophyll-content-cab"}},[t._v("#")]),t._v(" 5.2\tLeaf Chlorophyll Content (CAB)")]),t._v(" "),s("p",[t._v("With the same input as the LAI, the CAB can be calculated. The processing is based on the computation from "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/cab/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("cab "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cab'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncab_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cab"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cab_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./cab/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-3fraction-of-green-vegetation-cover-fcover"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-3fraction-of-green-vegetation-cover-fcover"}},[t._v("#")]),t._v(" 5.3\tFraction of green Vegetation Cover (FCOVER)")]),t._v(" "),s("p",[t._v("In the same manner, we compute the Fraction of green Vegetation Cover (FCOVER), which is based on the FCOVER-calculations from "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/fcover/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fcover "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'fcover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfcover_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fcover"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fcover_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./fcover/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"}},[t._v("#")]),t._v(" 5.4\tFraction of Absorbed Photosynthetically Active Radiation (FAPAR)")]),t._v(" "),s("p",[t._v("The FAPAR-computation can be found at "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/fapar/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fapar "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'fapar'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfapar_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fapar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fapar_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./fapar/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-5normalized-difference-vegetation-index"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-5normalized-difference-vegetation-index"}},[t._v("#")]),t._v(" 5.5\tNormalized difference vegetation index")]),t._v(" "),s("p",[t._v('The computation of the indices could also be done in one process graph with the Sen2Like processing. In this case, we start again with the "load_collection" process and select the bands "B04" and "B08".')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("spatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-09-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL2_L1C'")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\nS2 "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n\nsen2like "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" S2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sen2like'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" THIS"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'target_product'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'L2F'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'export_original_files'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cloud_cover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v('We make use of the "ndvi" process and select a format and options for saving. Then we create and start the job and download the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("ndvi "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2like"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ndvi"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("nir"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" red"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./ndvi/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-6-explore-the-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-6-explore-the-results"}},[t._v("#")]),t._v(" 5.6 Explore the results")]),t._v(" "),s("p",[t._v("The functionality is shown using the LAI, but it works the same for the other indices. To create a plot of the results, we need the libraries os, numpy, mathplotlib and xarray. First, the LAI files are loaded. A map with the results is then created using matplotlib.pyplot.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" os\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" matplotlib"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pyplot "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" plt\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" xarray "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" xr\n\npath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./lai/"')]),t._v("\nfiles "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" os"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("listdir"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("startswith"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Time"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nlai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("open_mfdataset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name\nlai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lai"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9999")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("plt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("figure"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cmap"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"YlGn"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("colorbar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[s("img",{attrs:{src:a(361),alt:"image"}})])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{360:function(t,s,a){t.exports=a.p+"assets/img/RGBplot_sen2like.a0105b85.png"},361:function(t,s,a){t.exports=a.p+"assets/img/LAI_S2L.e1e81fff.png"},590:function(t,s,a){"use strict";a.r(s);var n=a(4),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"crop-conditions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#crop-conditions"}},[t._v("#")]),t._v(" Crop conditions")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("Attention")]),t._v(" "),s("p",[t._v("To use this service, you have to be registered at openEO platform. If you are not yet registered, you can apply "),s("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])]),t._v(" "),s("p",[t._v("To enable higher time-series resolution vegetation indices (such as NDVI, LAI, FAPAR, FCOVER) than the Sentinel-2 time series, we have implemented the computation based on the Sen2Like processor which enables users to process these indices on-demand.")]),t._v(" "),s("p",[t._v("The Sen2Like processor was developed by ESA as part of the EU Copernicus program. It creates Sentinel-2 like harmonized (Level-2H) or fused (Level-2F) surface reflectances by harmonizing Sentinel-2 and Landsat 8/Landsat 9 to increase the temporal revisits. Based on the resulting L2F product, multiple indices can be computed, such as the NDVI and LAI.\nThe fusion also involves the upscaling of Landsat 8/Landsat 9 data to Sentinel-2 resolution.\nWith the new L2F data higher time-series resolution vegetation indices (such as NDVI, LAI, FAPAR, FCOVER) can be calculated.")]),t._v(" "),s("p",[t._v("This document describes how to use the Sen2Like processor in OpenEO for a requested spatio-temporal extent and how to use the new data to calculate indices. We’ve prepared "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-sen2like.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(" that you can use to run the Sen2Like process and another "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(" to calculate some indices.")]),t._v(" "),s("h2",{attrs:{id:"_1-data-preparation"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-data-preparation"}},[t._v("#")]),t._v(" 1. data preparation")]),t._v(" "),s("p",[t._v("To start the Sen2Like openEO processing, first we need to connect to the openEO backend.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("datacube "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" THIS\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n\nconn "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("As Sen2Like can only process "),s("code",[t._v("SENTINEL2_L1C")]),t._v(" data, we chose this as our collection and specify the spatial and temporal extent and the bands to compute.\nThe sen2like processing automatically includes the Landsat 8 & 9 data into the computation, so we do not need to call it explicitely. The processing also automatically includes other additional data, such as the digital elevation model and data from the Copernicus Atmosphere Monitoring Service.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("spatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("17.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("49.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-09-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL2_L1C'")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B05"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B06"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B07"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8A"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B11"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B12"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\nS2 "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_2-sen2like-processing"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-sen2like-processing"}},[t._v("#")]),t._v(" 2. Sen2like processing")]),t._v(" "),s("p",[t._v("Here, we apply the Sen2Like processing. The "),s("code",[t._v("export_original_files")]),t._v("-parameter has to be true to specify the L2F. A high cloud cover can make data inaccurate, so we ignore files with a higher cloud cover than 50%.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2like "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" S2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sen2like'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" THIS"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'target_product'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'L2F'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'export_original_files'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cloud_cover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("We select a temporal subset of the data to create an RGB.\nRGB stands for red (Band 4), green (Band 3), blue (Band 2) and describes the true colors of an image in remote sensing.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2_small "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2like"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_temporal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bbox"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nrgb "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2_small"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("We save the data into a NetCDF, a file format for storing multidimensional scientific data (variables). Two types of output are created: The Sen2Like original .SAFE files for the extent of four UTM tiles and the NetCDF for a smaller sector.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("rgb_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rgb"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_3-running-the-job"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3-running-the-job"}},[t._v("#")]),t._v(" 3. Running the Job")]),t._v(" "),s("p",[t._v("We create and start the openEO job.\nTo reuse the results (e.g. for the "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("indices notebook"),s("OutboundLink")],1),t._v("), we need to know the job id. To see the job status the job-variable has to be called.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" rgb_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\njob\n")])])]),s("p",[t._v('Once the job status is "finished", we can download and explore the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("results "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sen2like_outputs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"_4-explore-the-openeo-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_4-explore-the-openeo-results"}},[t._v("#")]),t._v(" 4. Explore the openEO results")]),t._v(" "),s("p",[t._v("To create a plot of our data, we need the libraries numpy, xarray and matplotlib.pyplot. First, the desired data set must be selected.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np \n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" xarray "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" xr\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" matplotlib"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pyplot "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" plt\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("path "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./sen2like_outputs/"')]),t._v("\nfiles "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" os"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("listdir"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("endswith"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('".nc"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\ntemp_xarray "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("open_dataset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" chunks"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("expand_dims"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("elif")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n temp_xr "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("expand_dims"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n temp_xarray"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("append"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("temp_xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("combine_by_coords"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("temp_xarray"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fill_value"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9999")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("data_t "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("isel"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("To get a true color image the colors need to get adjusted. Then, we can plot our data.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("brg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("zeros"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("shape"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("shape"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B04"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B03"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("14")]),t._v("\nbrg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data_t"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("B02"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("values"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.6")]),t._v("\nbrg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("clip"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("brg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("astype"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("uint8"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("figure"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("title"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"RGB sen2like, Austria 2023"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("brg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("cmap"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'brg'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[s("img",{attrs:{src:a(360),alt:"image"}})]),t._v(" "),s("h2",{attrs:{id:"_5-indices-calculations"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-indices-calculations"}},[t._v("#")]),t._v(" 5. Indices calculations")]),t._v(" "),s("p",[t._v("To calculate some Indices on our L2F data, we’ve prepared another "),s("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC15-indices.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("Jupyter Notebook"),s("OutboundLink")],1),t._v(". We make use of the "),s("code",[t._v("load_stac")]),t._v(" process, to reload the previously computed Sen2Like outputs. This is especially useful, when we compute multiple indices from the same Sen2Like outputs, as the Sen2Like processing only needs to be done once.")]),t._v(" "),s("p",[t._v('To load the results, insert the url with the saved "job_id" into the "load_stac" process. The spatio-temporal extent can be the same or smaller/shorter as in the selected data. We select the bands "B03", "B04", "B05", "B06", "B07", "B8A", "B11", "B12", as these are required in the computation for the following indices.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("sen2like_job_id "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eodc-5d4c1746-33b2-42fb-914c-d36987747ae6"')]),t._v("\nspatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B03"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B05"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B06"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B07"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B8A"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B11"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B12"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ndata "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"https://openeo.eodc.eu/openeo/1.1.0/jobs/')]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("sen2like_job_id"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('/results"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-1-leaf-area-index-lai"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-leaf-area-index-lai"}},[t._v("#")]),t._v(" 5.1 Leaf Area Index (LAI)")]),t._v(" "),s("p",[t._v("The LAI process is based on the computation specified at "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/lai/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(". All needed Bands and angles are included in the Sen2Like output data.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("lai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'lai'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nlai_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v('We create and start the openEO job. Once the job status is "finished", we can download the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./lai/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-2leaf-chlorophyll-content-cab"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-2leaf-chlorophyll-content-cab"}},[t._v("#")]),t._v(" 5.2\tLeaf Chlorophyll Content (CAB)")]),t._v(" "),s("p",[t._v("With the same input as the LAI, the CAB can be calculated. The processing is based on the computation from "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/cab/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("cab "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cab'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncab_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cab"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cab_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./cab/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-3fraction-of-green-vegetation-cover-fcover"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-3fraction-of-green-vegetation-cover-fcover"}},[t._v("#")]),t._v(" 5.3\tFraction of green Vegetation Cover (FCOVER)")]),t._v(" "),s("p",[t._v("In the same manner, we compute the Fraction of green Vegetation Cover (FCOVER), which is based on the FCOVER-calculations from "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/fcover/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fcover "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'fcover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfcover_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fcover"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fcover_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./fcover/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"}},[t._v("#")]),t._v(" 5.4\tFraction of Absorbed Photosynthetically Active Radiation (FAPAR)")]),t._v(" "),s("p",[t._v("The FAPAR-computation can be found at "),s("a",{attrs:{href:"https://custom-scripts.sentinel-hub.com/sentinel-2/fapar/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Sentinelhub"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("fapar "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'fapar'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nfapar_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fapar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" fapar_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./fapar/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-5normalized-difference-vegetation-index"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-5normalized-difference-vegetation-index"}},[t._v("#")]),t._v(" 5.5\tNormalized difference vegetation index")]),t._v(" "),s("p",[t._v('The computation of the indices could also be done in one process graph with the Sen2Like processing. In this case, we start again with the "load_collection" process and select the bands "B04" and "B08".')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("spatial_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.6")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.7")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("47.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-06-01"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2023-09-30"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SENTINEL2_L1C'")]),t._v("\nbands "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n\nS2 "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n\nsen2like "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" S2"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sen2like'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'data'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" THIS"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'target_product'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'L2F'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'export_original_files'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'cloud_cover'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v('We make use of the "ndvi" process and select a format and options for saving. Then we create and start the job and download the results.')]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("ndvi "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sen2like"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("ndvi"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("nir"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" red"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_nc "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NetCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time-series"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("job "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_nc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_job"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\njob"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./ndvi/"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_5-6-explore-the-results"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_5-6-explore-the-results"}},[t._v("#")]),t._v(" 5.6 Explore the results")]),t._v(" "),s("p",[t._v("The functionality is shown using the LAI, but it works the same for the other indices. To create a plot of the results, we need the libraries os, numpy, mathplotlib and xarray. First, the LAI files are loaded. A map with the results is then created using matplotlib.pyplot.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" os\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" numpy "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" np\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" matplotlib"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pyplot "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" plt\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" xarray "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" xr\n\npath "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./lai/"')]),t._v("\nfiles "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" os"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("listdir"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("path"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("file")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("startswith"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Time"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nlai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" xr"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("open_mfdataset"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("files"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("name\nlai "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("where"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lai"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9999")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" np"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("nan"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("plt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("figure"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("figsize"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lai"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" cmap"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"YlGn"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nplt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("colorbar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[s("img",{attrs:{src:a(361),alt:"image"}})])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/54.253c3f6f.js b/assets/js/54.0c819fd9.js similarity index 97% rename from assets/js/54.253c3f6f.js rename to assets/js/54.0c819fd9.js index 412adc93b..e209b7b70 100644 --- a/assets/js/54.253c3f6f.js +++ b/assets/js/54.0c819fd9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{364:function(t,e,a){t.exports=a.p+"assets/img/S1_S2_predictedvsfitted.8c6b7fdb.jpg"},365:function(t,e,a){t.exports=a.p+"assets/img/Change_S1S2.6b6633ae.jpg"},595:function(t,e,a){"use strict";a.r(e);var s=a(4),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"forest-change-detection"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#forest-change-detection"}},[t._v("#")]),t._v(" Forest Change Detection")]),t._v(" "),e("p",[t._v("Spatially and temporally explicit information of forest ecosystems is essential for a broad range of applications and Earth observation has become a key instrument for forest management and for monitoring forest cover dynamics.\nForest change detection tries to identify critical variations in the time series signal, with a strong focus on forests (e.g., illegal deforestation, wind throw, fire).\nForests follow a seasonal growth: during the summer months, they carry more leaves which leads to higher surface reflectance whereas in winter the reflectance will be much lower. This up and down in the surface reflectance of vegetated areas, can be mapped as a sinusoidal function with peaks in the vegetative periods (summer) and valleys in between. Knowing the shape of this sinusoidal function allow us to inspect disturbances, checking how much the new signal differ from the reference harmonic behavior.")]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://user-images.githubusercontent.com/31700619/131147116-f0b94015-cde2-4630-9fe6-4a854f8d2474.png",alt:"Sample result from the curve fitting and prediction steps"}}),t._v(" "),e("figcaption",[t._v("Figure 1: Sample result from the curve fitting and prediction steps. In blue the S2 B08 data and in orange the predicted values following the harmonic seasonal function.")])]),t._v(" "),e("p",[t._v("This approach can be applied to single pixels, looking into a particular area of interest, or more in general over a wide area, where each pixel time series is treated independently.\nThe following figure shows such pixels with detected change from both Sentinel-1 and Sentinel-2\n")]),e("figure",[e("img",{attrs:{src:a(364),alt:"S1 and S2 curve fitting and prediction steps"}}),t._v(" "),e("figcaption",[t._v("Figure 2: Curve fitting and prediction for Sentinel-1 and Sentinel-2. In blue the S2 B08 and S1SIGÖ VH data and in orange the respective predicted values following the harmonic seasonal function.")])]),e("p"),t._v(" "),e("p",[t._v("In this section, we will show how to combine openEO functionality into a basic change detection pipeline.")]),t._v(" "),e("h2",{attrs:{id:"data-preparation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),e("p",[t._v("To correctly find the right fitting for the harmonic function, we need cloud-free data if using optical data, or shadow masked data if using radar data, over a timeseries of at least two years (but more is better!). Pixels covered by clouds or shadows deviate from the expected trend of the vegetation and therefore we must start with pre-processed data.")]),t._v(" "),e("p",[t._v("The current implementation of the "),e("code",[t._v("fit_curve()")]),t._v(" / "),e("code",[t._v("predict_curve()")]),t._v(" process and available processing and memory resources limit the spatio-temporal extent of data which can be processed in a single job. If a large extent should be processed, the extent has to be split into multiple parts and can be processed in multiple jobs.")]),t._v(" "),e("h2",{attrs:{id:"seasonal-curve-fitting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#seasonal-curve-fitting"}},[t._v("#")]),t._v(" Seasonal curve fitting")]),t._v(" "),e("p",[t._v("Supposing that the training input data is a cloud-free Sentinel-2 timeseries we can write the following code using the openEO clients to find the optimal function coefficients:")]),t._v(" "),e("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" cos"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sin"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_element\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("fit_function")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("ProcessBuilder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("ProcessBuilder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n t "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pi "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("31557600")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" x\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" cos"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("t"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" sin"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("t"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncurve_fitting "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fit_curve"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n parameters"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Initial guess of the parameters")]),t._v("\n dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fit the function along the temporal dimension")]),t._v("\n function"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("fit_function\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[e("div",{staticClass:"language-js extra-class"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 31557600 are the seconds in one year")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" fitFunction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Formula")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'$$0 + $$1*cos(2*pi()/31557600*x) + $$2*sin(2*pi()/31557600*x)'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ncurve_fitting "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("fit_curve")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Initial guess of the parameters")]),t._v("\n fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fit the function along the temporal dimension")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),e("h2",{attrs:{id:"predicting-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#predicting-values"}},[t._v("#")]),t._v(" Predicting values")]),t._v(" "),e("p",[t._v("With the seasonal function coefficients, we can predict the expected value for a particular time step. In the following case, we are computing the values following the seasonal trend for the training time steps:")]),t._v(" "),e("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("temporal_labels "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dimension_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncurve_prediction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_curve"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("parameters"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("curve_fitting"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("function"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("labels"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[e("div",{staticClass:"language-js extra-class"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[t._v("temporal_labels "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("dimension_labels")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ncurve_prediction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("predict_curve")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" curve_fitting"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" temporal_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),e("p",[t._v("The difference between the training data and the predicted values following the seasonal model is a key information, which is used to perform the change detection with new data. Please have a look at the "),e("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC6%20-%20Forest%20Dynamics.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("reference notebook"),e("OutboundLink")],1),t._v(" for the complete pipeline.")]),t._v(" "),e("p",[t._v("The results obtained over an area of South Tyrol in Northern Italy which was hit by the Vaia storm are shown below. Similar damages are detected from Sentinel-1 and Sentinel-2\n")]),e("figure",[e("img",{attrs:{src:a(365),alt:"Change detection from Sentinel-1 and Sentinel-2"}}),t._v(" "),e("figcaption",[t._v("Figure 3: Change detection maps for the Vaia storm from Sentinel-1 and Sentinel-2.")])]),e("p")],1)}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{362:function(t,e,a){t.exports=a.p+"assets/img/S1_S2_predictedvsfitted.8c6b7fdb.jpg"},363:function(t,e,a){t.exports=a.p+"assets/img/Change_S1S2.6b6633ae.jpg"},591:function(t,e,a){"use strict";a.r(e);var s=a(4),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"forest-change-detection"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#forest-change-detection"}},[t._v("#")]),t._v(" Forest Change Detection")]),t._v(" "),e("p",[t._v("Spatially and temporally explicit information of forest ecosystems is essential for a broad range of applications and Earth observation has become a key instrument for forest management and for monitoring forest cover dynamics.\nForest change detection tries to identify critical variations in the time series signal, with a strong focus on forests (e.g., illegal deforestation, wind throw, fire).\nForests follow a seasonal growth: during the summer months, they carry more leaves which leads to higher surface reflectance whereas in winter the reflectance will be much lower. This up and down in the surface reflectance of vegetated areas, can be mapped as a sinusoidal function with peaks in the vegetative periods (summer) and valleys in between. Knowing the shape of this sinusoidal function allow us to inspect disturbances, checking how much the new signal differ from the reference harmonic behavior.")]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://user-images.githubusercontent.com/31700619/131147116-f0b94015-cde2-4630-9fe6-4a854f8d2474.png",alt:"Sample result from the curve fitting and prediction steps"}}),t._v(" "),e("figcaption",[t._v("Figure 1: Sample result from the curve fitting and prediction steps. In blue the S2 B08 data and in orange the predicted values following the harmonic seasonal function.")])]),t._v(" "),e("p",[t._v("This approach can be applied to single pixels, looking into a particular area of interest, or more in general over a wide area, where each pixel time series is treated independently.\nThe following figure shows such pixels with detected change from both Sentinel-1 and Sentinel-2\n")]),e("figure",[e("img",{attrs:{src:a(362),alt:"S1 and S2 curve fitting and prediction steps"}}),t._v(" "),e("figcaption",[t._v("Figure 2: Curve fitting and prediction for Sentinel-1 and Sentinel-2. In blue the S2 B08 and S1SIGÖ VH data and in orange the respective predicted values following the harmonic seasonal function.")])]),e("p"),t._v(" "),e("p",[t._v("In this section, we will show how to combine openEO functionality into a basic change detection pipeline.")]),t._v(" "),e("h2",{attrs:{id:"data-preparation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),e("p",[t._v("To correctly find the right fitting for the harmonic function, we need cloud-free data if using optical data, or shadow masked data if using radar data, over a timeseries of at least two years (but more is better!). Pixels covered by clouds or shadows deviate from the expected trend of the vegetation and therefore we must start with pre-processed data.")]),t._v(" "),e("p",[t._v("The current implementation of the "),e("code",[t._v("fit_curve()")]),t._v(" / "),e("code",[t._v("predict_curve()")]),t._v(" process and available processing and memory resources limit the spatio-temporal extent of data which can be processed in a single job. If a large extent should be processed, the extent has to be split into multiple parts and can be processed in multiple jobs.")]),t._v(" "),e("h2",{attrs:{id:"seasonal-curve-fitting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#seasonal-curve-fitting"}},[t._v("#")]),t._v(" Seasonal curve fitting")]),t._v(" "),e("p",[t._v("Supposing that the training input data is a cloud-free Sentinel-2 timeseries we can write the following code using the openEO clients to find the optimal function coefficients:")]),t._v(" "),e("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" cos"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sin"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_element\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("fit_function")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("ProcessBuilder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("ProcessBuilder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n t "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("pi "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("31557600")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" x\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" cos"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("t"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" parameters"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" sin"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("t"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncurve_fitting "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fit_curve"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n parameters"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Initial guess of the parameters")]),t._v("\n dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fit the function along the temporal dimension")]),t._v("\n function"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("fit_function\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[e("div",{staticClass:"language-js extra-class"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 31557600 are the seconds in one year")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" fitFunction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Formula")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'$$0 + $$1*cos(2*pi()/31557600*x) + $$2*sin(2*pi()/31557600*x)'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ncurve_fitting "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("fit_curve")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Initial guess of the parameters")]),t._v("\n fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fit the function along the temporal dimension")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),e("h2",{attrs:{id:"predicting-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#predicting-values"}},[t._v("#")]),t._v(" Predicting values")]),t._v(" "),e("p",[t._v("With the seasonal function coefficients, we can predict the expected value for a particular time step. In the following case, we are computing the values following the seasonal trend for the training time steps:")]),t._v(" "),e("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("temporal_labels "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dimension_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncurve_prediction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_curve"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("parameters"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("curve_fitting"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("function"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("labels"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[e("div",{staticClass:"language-js extra-class"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[t._v("temporal_labels "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("dimension_labels")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\ncurve_prediction "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("predict_curve")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("l2a_bands"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" curve_fitting"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fitFunction"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" temporal_labels"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),e("p",[t._v("The difference between the training data and the predicted values following the seasonal model is a key information, which is used to perform the change detection with new data. Please have a look at the "),e("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC6%20-%20Forest%20Dynamics.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("reference notebook"),e("OutboundLink")],1),t._v(" for the complete pipeline.")]),t._v(" "),e("p",[t._v("The results obtained over an area of South Tyrol in Northern Italy which was hit by the Vaia storm are shown below. Similar damages are detected from Sentinel-1 and Sentinel-2\n")]),e("figure",[e("img",{attrs:{src:a(363),alt:"Change detection from Sentinel-1 and Sentinel-2"}}),t._v(" "),e("figcaption",[t._v("Figure 3: Change detection maps for the Vaia storm from Sentinel-1 and Sentinel-2.")])]),e("p")],1)}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/55.049d7676.js b/assets/js/55.354f9414.js similarity index 98% rename from assets/js/55.049d7676.js rename to assets/js/55.354f9414.js index a6c6167ff..af2c0cf1d 100644 --- a/assets/js/55.049d7676.js +++ b/assets/js/55.354f9414.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{362:function(t,e,s){t.exports=s.p+"assets/img/gfm-flood-extent.46cc6068.png"},363:function(t,e,s){t.exports=s.p+"assets/img/gfm-observed-water.6638af3f.png"},592:function(t,e,s){"use strict";s.r(e);var a=s(4),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"global-flood-monitoring"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#global-flood-monitoring"}},[t._v("#")]),t._v(" Global Flood Monitoring")]),t._v(" "),e("p",[t._v("The Global Flood Monitoring (GFM) product is a component of the EU’s Copernicus\nEmergency Management Service (CEMS) that provides continuous monitoring of\nfloods worldwide, by processing and analysing in near real-time all\nincoming Sentinel-1 SAR acquisitions over land.")]),t._v(" "),e("p",[t._v("The operational implementation the GFM product includes the following key\nelements:")]),t._v(" "),e("ul",[e("li",[t._v("Downloading of worldwide Sentinel-1 SAR acquisitions (Level-1 IW GRDH)")]),t._v(" "),e("li",[t._v("Pre-processing of the downloaded Sentinel-1 data to backscatter data (SIG0)")]),t._v(" "),e("li",[t._v("Operational application of three fully automated flood mapping algorithms.")]),t._v(" "),e("li",[t._v("An ensemble-based approach is then used to combine the three flood extent\noutputs of the individual flood algorithms.")]),t._v(" "),e("li",[t._v("Generation of the required GFM output layers, including Observed flood extent,\nReference water mask, Exclusion Mask and Likelihood Values.")]),t._v(" "),e("li",[t._v("Web service-based access and dissemination of the GFM product output layers.")])]),t._v(" "),e("h2",{attrs:{id:"output-layers-used-in-openeo"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#output-layers-used-in-openeo"}},[t._v("#")]),t._v(" Output layers used in openEO")]),t._v(" "),e("ul",[e("li",[t._v("Observed flood extent (ENSEMBLE of all three individual flood outputs)")]),t._v(" "),e("li",[t._v("Reference water mask (permament and seasonal water bodies)")])]),t._v(" "),e("h2",{attrs:{id:"links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#links"}},[t._v("#")]),t._v(" Links")]),t._v(" "),e("p",[t._v("More documentation can be found in the "),e("a",{attrs:{href:"https://extwiki.eodc.eu/GFM",target:"_blank",rel:"noopener noreferrer"}},[t._v("GFM Wiki"),e("OutboundLink")],1),t._v(".\nThe Jupyter Notebook that is explained below can be found "),e("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC11.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"compute-the-maximum-flood-extent"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#compute-the-maximum-flood-extent"}},[t._v("#")]),t._v(" Compute the maximum flood extent")]),t._v(" "),e("p",[t._v("In this example, we have a closer look at an area in Pakistan, which was ravaged by the unprecedented floods of 2022. The flooding caused severe damage and economic losses and is referred to as the worst flood in the history of Pakistan.\nWe compute the sum of flooded pixels over time.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n\nbackend "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),t._v("\nconn "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("backend"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nspatial_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("67.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("70")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("24.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-09-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-10-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" \ncollection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GFM'")]),t._v("\n\ngfm_data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ensemble_flood_extent"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ngfm_sum "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("sum")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngfm_sum_tiff "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_sum"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wgs84-1degree"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"}},[t._v("#")]),t._v(" Explore how the flood extent relates to the Global Human Settlement Built-up layer")]),t._v(" "),e("p",[t._v("We display the flood extent next to the Global Human Settlement Built-up layer.")]),t._v(" "),e("p",[t._v("The Global Human Settlement Layer (GHSL) project produces global spatial\ninformation about the human presence on the planet over time in the form of\nbuilt-up maps, population density maps and settlement maps.")]),t._v(" "),e("p",[t._v("Here, the GHS-BUILT-S spatial raster dataset at 10m resolution is used which\ndepicts the distribution of built-up surfaces, expressed as number of square metres.")]),t._v(" "),e("p",[t._v("Values are between 0 and 100 and represent the amount of square metres of\nbuilt-up surface in the cell.")]),t._v(" "),e("p",[t._v("https://ghsl.jrc.ec.europa.eu/about.php")]),t._v(" "),e("p",[t._v("The GHSL is available in "),e("code",[t._v("wgs84")]),t._v(". Therefore, the "),e("code",[t._v("tile_grid")]),t._v(" for the GFM data was set to "),e("code",[t._v("wgs84")]),t._v(" as well.")]),t._v(" "),e("figure",[e("img",{attrs:{src:s(362),alt:"Flood extent"}}),t._v(" "),e("figcaption",[t._v("Figure 1: Estimate of how the built-up surface was effected by the flood in Pakistan in September 2022. Some of the highest values of the GHSL can be found around 25.16 N 69.11 E, which marks Digri Tehsil, the second largest town of Mirpurkhas District, Pakistan. ")])]),t._v(" "),e("h2",{attrs:{id:"statistical-analysis"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#statistical-analysis"}},[t._v("#")]),t._v(" Statistical analysis")]),t._v(" "),e("p",[t._v("In the example given above, we picked the "),e("code",[t._v("sum")]),t._v(" in "),e("code",[t._v('gfm_sum = gfm_data.reduce_dimension(dimension="t", reducer=sum)')]),t._v(". OpenEO provides a range of reducers to choose from. E.g.:")]),t._v(" "),e("ul",[e("li",[t._v("Compute the flood frequency: set the reducer to "),e("code",[t._v("mean")])]),t._v(" "),e("li",[t._v("Generate the mask of flooded pixels: set the reducer to "),e("code",[t._v("any")])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("gfm_flood_frequency "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("mean"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngfm_flood_frequency_tiff "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_flood_frequency"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wgs84-1degree"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"observed-water-flood-extent-refwater"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#observed-water-flood-extent-refwater"}},[t._v("#")]),t._v(" Observed water (flood_extent + refwater)")]),t._v(" "),e("p",[t._v("The observed water combines both flood extent and the reference water mask. The reference water mask represents permanent or seasonal water bodies, which are clearly distinct from flood events.\nWith openEO, the two layers "),e("code",[t._v("ensemble_flood_extent")]),t._v(" and "),e("code",[t._v("reference_water_mask")]),t._v(" can be combined directly and stored into one file. No need to download layers individually.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("spatial_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("67.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("70")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("24.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-09-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-10-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" \ncollection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GFM'")]),t._v("\n\ngfm_data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ensemble_flood_extent"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reference_water_mask"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# retrieve all pixels which have been detected as water during the given period")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# -> observed water")]),t._v("\nobserved_water "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("any")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("any")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Save the result in Equi7Grid and as GeoTiff")]),t._v("\nobserved_water_tif "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" observed_water"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"equi7"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"explore-the-observed-water"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#explore-the-observed-water"}},[t._v("#")]),t._v(" Explore the observed water")]),t._v(" "),e("p",[t._v("The original GFM data is stored in the Equi7 Grid and the Asian Equi7 coordinate reference system. With the "),e("code",[t._v("tile_grid")]),t._v(" parameter, the user can either keep the data like this, or pick a different CRS.")]),t._v(" "),e("figure",[e("img",{attrs:{src:s(363),alt:"Observed water"}}),t._v(" "),e("figcaption",[t._v("Figure 2: The observed water mask in Pakistan in September 2022.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{364:function(t,e,s){t.exports=s.p+"assets/img/gfm-flood-extent.46cc6068.png"},365:function(t,e,s){t.exports=s.p+"assets/img/gfm-observed-water.6638af3f.png"},593:function(t,e,s){"use strict";s.r(e);var a=s(4),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"global-flood-monitoring"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#global-flood-monitoring"}},[t._v("#")]),t._v(" Global Flood Monitoring")]),t._v(" "),e("p",[t._v("The Global Flood Monitoring (GFM) product is a component of the EU’s Copernicus\nEmergency Management Service (CEMS) that provides continuous monitoring of\nfloods worldwide, by processing and analysing in near real-time all\nincoming Sentinel-1 SAR acquisitions over land.")]),t._v(" "),e("p",[t._v("The operational implementation the GFM product includes the following key\nelements:")]),t._v(" "),e("ul",[e("li",[t._v("Downloading of worldwide Sentinel-1 SAR acquisitions (Level-1 IW GRDH)")]),t._v(" "),e("li",[t._v("Pre-processing of the downloaded Sentinel-1 data to backscatter data (SIG0)")]),t._v(" "),e("li",[t._v("Operational application of three fully automated flood mapping algorithms.")]),t._v(" "),e("li",[t._v("An ensemble-based approach is then used to combine the three flood extent\noutputs of the individual flood algorithms.")]),t._v(" "),e("li",[t._v("Generation of the required GFM output layers, including Observed flood extent,\nReference water mask, Exclusion Mask and Likelihood Values.")]),t._v(" "),e("li",[t._v("Web service-based access and dissemination of the GFM product output layers.")])]),t._v(" "),e("h2",{attrs:{id:"output-layers-used-in-openeo"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#output-layers-used-in-openeo"}},[t._v("#")]),t._v(" Output layers used in openEO")]),t._v(" "),e("ul",[e("li",[t._v("Observed flood extent (ENSEMBLE of all three individual flood outputs)")]),t._v(" "),e("li",[t._v("Reference water mask (permament and seasonal water bodies)")])]),t._v(" "),e("h2",{attrs:{id:"links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#links"}},[t._v("#")]),t._v(" Links")]),t._v(" "),e("p",[t._v("More documentation can be found in the "),e("a",{attrs:{href:"https://extwiki.eodc.eu/GFM",target:"_blank",rel:"noopener noreferrer"}},[t._v("GFM Wiki"),e("OutboundLink")],1),t._v(".\nThe Jupyter Notebook that is explained below can be found "),e("a",{attrs:{href:"https://github.com/eodcgmbh/openeo-examples/blob/master/UCs/UC11.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"compute-the-maximum-flood-extent"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#compute-the-maximum-flood-extent"}},[t._v("#")]),t._v(" Compute the maximum flood extent")]),t._v(" "),e("p",[t._v("In this example, we have a closer look at an area in Pakistan, which was ravaged by the unprecedented floods of 2022. The flooding caused severe damage and economic losses and is referred to as the worst flood in the history of Pakistan.\nWe compute the sum of flooded pixels over time.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n\nbackend "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openeo.cloud"')]),t._v("\nconn "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("backend"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nspatial_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("67.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("70")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("24.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-09-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-10-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" \ncollection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GFM'")]),t._v("\n\ngfm_data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ensemble_flood_extent"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ngfm_sum "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("sum")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngfm_sum_tiff "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_sum"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wgs84-1degree"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"}},[t._v("#")]),t._v(" Explore how the flood extent relates to the Global Human Settlement Built-up layer")]),t._v(" "),e("p",[t._v("We display the flood extent next to the Global Human Settlement Built-up layer.")]),t._v(" "),e("p",[t._v("The Global Human Settlement Layer (GHSL) project produces global spatial\ninformation about the human presence on the planet over time in the form of\nbuilt-up maps, population density maps and settlement maps.")]),t._v(" "),e("p",[t._v("Here, the GHS-BUILT-S spatial raster dataset at 10m resolution is used which\ndepicts the distribution of built-up surfaces, expressed as number of square metres.")]),t._v(" "),e("p",[t._v("Values are between 0 and 100 and represent the amount of square metres of\nbuilt-up surface in the cell.")]),t._v(" "),e("p",[t._v("https://ghsl.jrc.ec.europa.eu/about.php")]),t._v(" "),e("p",[t._v("The GHSL is available in "),e("code",[t._v("wgs84")]),t._v(". Therefore, the "),e("code",[t._v("tile_grid")]),t._v(" for the GFM data was set to "),e("code",[t._v("wgs84")]),t._v(" as well.")]),t._v(" "),e("figure",[e("img",{attrs:{src:s(364),alt:"Flood extent"}}),t._v(" "),e("figcaption",[t._v("Figure 1: Estimate of how the built-up surface was effected by the flood in Pakistan in September 2022. Some of the highest values of the GHSL can be found around 25.16 N 69.11 E, which marks Digri Tehsil, the second largest town of Mirpurkhas District, Pakistan. ")])]),t._v(" "),e("h2",{attrs:{id:"statistical-analysis"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#statistical-analysis"}},[t._v("#")]),t._v(" Statistical analysis")]),t._v(" "),e("p",[t._v("In the example given above, we picked the "),e("code",[t._v("sum")]),t._v(" in "),e("code",[t._v('gfm_sum = gfm_data.reduce_dimension(dimension="t", reducer=sum)')]),t._v(". OpenEO provides a range of reducers to choose from. E.g.:")]),t._v(" "),e("ul",[e("li",[t._v("Compute the flood frequency: set the reducer to "),e("code",[t._v("mean")])]),t._v(" "),e("li",[t._v("Generate the mask of flooded pixels: set the reducer to "),e("code",[t._v("any")])])]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("gfm_flood_frequency "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("mean"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngfm_flood_frequency_tiff "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_flood_frequency"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wgs84-1degree"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"observed-water-flood-extent-refwater"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#observed-water-flood-extent-refwater"}},[t._v("#")]),t._v(" Observed water (flood_extent + refwater)")]),t._v(" "),e("p",[t._v("The observed water combines both flood extent and the reference water mask. The reference water mask represents permanent or seasonal water bodies, which are clearly distinct from flood events.\nWith openEO, the two layers "),e("code",[t._v("ensemble_flood_extent")]),t._v(" and "),e("code",[t._v("reference_water_mask")]),t._v(" can be combined directly and stored into one file. No need to download layers individually.")]),t._v(" "),e("div",{staticClass:"language-python extra-class"},[e("pre",{pre:!0,attrs:{class:"language-python"}},[e("code",[t._v("spatial_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("67.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("70")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("24.5")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-09-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-10-01"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" \ncollection "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GFM'")]),t._v("\n\ngfm_data "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" conn"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n spatial_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n temporal_extent"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n bands "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ensemble_flood_extent"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"reference_water_mask"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# retrieve all pixels which have been detected as water during the given period")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# -> observed water")]),t._v("\nobserved_water "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gfm_data"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("any")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("any")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Save the result in Equi7Grid and as GeoTiff")]),t._v("\nobserved_water_tif "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" observed_water"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" options"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"tile_grid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"equi7"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),e("h2",{attrs:{id:"explore-the-observed-water"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#explore-the-observed-water"}},[t._v("#")]),t._v(" Explore the observed water")]),t._v(" "),e("p",[t._v("The original GFM data is stored in the Equi7 Grid and the Asian Equi7 coordinate reference system. With the "),e("code",[t._v("tile_grid")]),t._v(" parameter, the user can either keep the data like this, or pick a different CRS.")]),t._v(" "),e("figure",[e("img",{attrs:{src:s(365),alt:"Observed water"}}),t._v(" "),e("figcaption",[t._v("Figure 2: The observed water mask in Pakistan in September 2022.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/57.687e115a.js b/assets/js/57.6c62528b.js similarity index 99% rename from assets/js/57.687e115a.js rename to assets/js/57.6c62528b.js index 48140bb3e..be5e89725 100644 --- a/assets/js/57.687e115a.js +++ b/assets/js/57.6c62528b.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{347:function(e,t,a){e.exports=a.p+"assets/img/api.2a906ee1.png"},568:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-api"}},[e._v("#")]),e._v(" Federation API")]),e._v(" "),t("p",[e._v("The general contract is the "),t("a",{attrs:{href:"https://api.openeo.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(" in the latest stable version of the 1.x branch.")]),e._v(" "),t("p",[e._v('The aggregator that proxies the back-ends in the federation also implements the same API, but it also implements the "Federation Extension" (currently in draft state).')]),e._v(" "),t("h2",{attrs:{id:"profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#profiles"}},[e._v("#")]),e._v(" Profiles")]),e._v(" "),t("p",[e._v("In addition to the general openEO API specification and their "),t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/profiles/api.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("API Profiles"),t("OutboundLink")],1),e._v(",\nopenEO Platform requires to implement an additional API profile:\n"),t("em",[e._v("LP: Required for openEO Platform")]),e._v(", which requires the openEO profile "),t("em",[e._v("L2: Recommended")]),e._v(".\nThe requirement to implement two of "),t("em",[e._v("L1A")]),e._v(", "),t("em",[e._v("L1B")]),e._v(", and "),t("em",[e._v("L1C")]),e._v(" has been restricted for openEO Platform to always require "),t("em",[e._v("L1A: Synchronous Processing")]),e._v(" and "),t("em",[e._v("L1B: Batch Jobs")]),e._v(" (see req. no. 703). This means that "),t("em",[e._v("L1C: Secondary Web Services")]),e._v(" is optional.")]),e._v(" "),t("figure",[t("img",{attrs:{src:a(347),alt:"The hierarchy of openEO and openEO Platform API profiles."}}),e._v(" "),t("figcaption",[e._v("An overview of the openEO and openEO Platform API profiles.")])]),e._v(" "),t("h3",{attrs:{id:"lp-required-for-openeo-platform"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lp-required-for-openeo-platform"}},[e._v("#")]),e._v(" LP: Required for openEO Platform")]),e._v(" "),t("p",[e._v("The profile only lists requirements that are not covered by the openEO profile "),t("em",[e._v("L2: Recommended")]),e._v(" yet.")]),e._v(" "),t("h4",{attrs:{id:"api-fundamentals"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-fundamentals"}},[e._v("#")]),e._v(" API fundamentals")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("14")]),e._v(" "),t("td",[e._v("All > Billing")]),e._v(" "),t("td",[e._v("Supports the openEO Platform credit system")])])])]),e._v(" "),t("h4",{attrs:{id:"file-formats"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-formats"}},[e._v("#")]),e._v(" File Formats")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("45")]),e._v(" "),t("td",[t("code",[e._v("GET /file_formats")])]),e._v(" "),t("td",[e._v("File format names and parameters aligned with openEO Platform as defined for the pre-defined "),t("RouterLink",{attrs:{to:"/federation/backends/fileformats.html"}},[e._v("file formats")])],1)])])]),e._v(" "),t("h4",{attrs:{id:"other"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#other"}},[e._v("#")]),e._v(" Other")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("90")]),e._v(" "),t("td",[t("code",[e._v("GET /health")])]),e._v(" "),t("td",[e._v("Returns 2XX or 5XX http status code (without authentication)")])])])]),e._v(" "),t("h4",{attrs:{id:"auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#auth"}},[e._v("#")]),e._v(" Auth")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("113")]),e._v(" "),t("td",[t("code",[e._v("GET /credentials/oidc")])]),e._v(" "),t("td",[e._v("Supports EGI as identity provider (including tokens)")])]),e._v(" "),t("tr",[t("td",[e._v("118")]),e._v(" "),t("td",[t("code",[e._v("GET /credentials/oidc")])]),e._v(" "),t("td",[e._v("Supports the required entitlements of the vo.openeo.cloud virtual organization, especially the claim eduperson_entitlement")])])])]),e._v(" "),t("p",[e._v("For more details about "),t("a",{attrs:{href:"#authentication-and-authorization"}},[e._v("Authentication and Authorization")]),e._v(", please see the corresponding chapters below.")]),e._v(" "),t("h4",{attrs:{id:"pre-defined-processes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#pre-defined-processes"}},[e._v("#")]),e._v(" Pre-defined Processes")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("205")]),e._v(" "),t("td",[t("code",[e._v("GET /processes")]),e._v(" > processes")]),e._v(" "),t("td",[e._v("All processes are valid according to the specification (id, description, parameters, returns are required)")])]),e._v(" "),t("tr",[t("td",[e._v("208")]),e._v(" "),t("td",[t("code",[e._v("GET /processes")]),e._v(" > processes")]),e._v(" "),t("td",[e._v("Processes are marked as experimental or deprecated if applicable")])])])]),e._v(" "),t("h4",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("311")]),e._v(" "),t("td",[t("code",[e._v("GET /collections")]),e._v(" > collections")]),e._v(" "),t("td",[e._v("Collections are marked as experimental or deprecated if applicable")])]),e._v(" "),t("tr",[t("td",[e._v("324")]),e._v(" "),t("td",[t("code",[e._v("GET /collections/{id}")]),e._v(" > id")]),e._v(" "),t("td",[e._v("IDs follow the openEO Platform naming convention")])]),e._v(" "),t("tr",[t("td",[e._v("327")]),e._v(" "),t("td",[t("code",[e._v("GET /collections/{id}")]),e._v(" > providers")]),e._v(" "),t("td",[e._v("Each collection needs to expose the backend offering the data")])])])]),e._v(" "),t("h4",{attrs:{id:"data-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-processing"}},[e._v("#")]),e._v(" Data Processing")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("703")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Batch jobs and synchronous processing are implemented (secondary web services are optional)")])]),e._v(" "),t("tr",[t("td",[e._v("704")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Time after which batch job results get automatically deleted: 90 days or later")])]),e._v(" "),t("tr",[t("td",[e._v("705")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Time after which batch job metadata gets automatically deleted: 1 year or later")])])])]),e._v(" "),t("h4",{attrs:{id:"batch-jobs-results"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-jobs-results"}},[e._v("#")]),e._v(" Batch Jobs > Results")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("873")]),e._v(" "),t("td",[t("code",[e._v("GET /jobs/{id}/results")]),e._v(" > public access link")]),e._v(" "),t("td",[e._v("Default expiry time of the signed URLs for results: 7 days")])])])]),e._v(" "),t("h4",{attrs:{id:"synchronous-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#synchronous-processing"}},[e._v("#")]),e._v(" Synchronous Processing")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("920")]),e._v(" "),t("td",[t("code",[e._v("POST /result")]),e._v(" > timeout")]),e._v(" "),t("td",[e._v("The timeout for synchronous calls is: 5 minutes")])])])]),e._v(" "),t("h2",{attrs:{id:"authentication-and-authorization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authentication-and-authorization"}},[e._v("#")]),e._v(" Authentication and authorization")]),e._v(" "),t("p",[e._v("This important aspect of the federation is standardized by the "),t("a",{attrs:{href:"https://aarc-project.eu/architecture/",target:"_blank",rel:"noopener noreferrer"}},[e._v("AARC Blueprint Architecture"),t("OutboundLink")],1),e._v(". EGI Check-in is the concrete implementation that is currently in use.")]),e._v(" "),t("h3",{attrs:{id:"authentication"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[e._v("#")]),e._v(" Authentication")]),e._v(" "),t("p",[e._v("The openEO platform federation standardizes on the use of "),t("a",{attrs:{href:"https://aai.egi.eu",target:"_blank",rel:"noopener noreferrer"}},[e._v("EGI Check-in"),t("OutboundLink")],1),e._v(" as identity provider. Backends have to support the use of openID connect + PKCE, to enable this and register a client with EGI Check-in.")]),e._v(" "),t("h3",{attrs:{id:"authorization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authorization"}},[e._v("#")]),e._v(" Authorization")]),e._v(" "),t("h4",{attrs:{id:"entitlements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#entitlements"}},[e._v("#")]),e._v(" Entitlements")]),e._v(" "),t("p",[e._v("Users of the federation are organized under the 'vo.openeo.cloud' virtual organization in EGI Check-in. Inside the virtual organization, different roles can be assigned to a user, to indicate that they have a certain subscription, or even on a more fine-grained level are entitled to specific actions or resources.\nThe mechanism to check this, is again supported by EGI Check-in, under the 'eduperson_entitlement' claim: "),t("a",{attrs:{href:"https://docs.egi.eu/providers/check-in/sp/#claims",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://docs.egi.eu/providers/check-in/sp/#claims"),t("OutboundLink")],1)]),e._v(" "),t("h4",{attrs:{id:"credits"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#credits"}},[e._v("#")]),e._v(" Credits")]),e._v(" "),t("p",[e._v("The second criterium for authorization is based on credits that are available to a user. Credits allow the platform to limit the volume of data access and processing operations that a user can perform during a given time frame. The amount of available credits depends on the subscription.\nWhen the credit balance of a user goes below zero, processing operations can be blocked.")]),e._v(" "),t("h4",{attrs:{id:"aggregator-rules"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#aggregator-rules"}},[e._v("#")]),e._v(" Aggregator rules")]),e._v(" "),t("p",[e._v("Based on the subscription and available credits, the aggregator can implement these rules:")]),e._v(" "),t("ol",[t("li",[e._v("Credit checks to block starting of batch jobs, synchronous requests to /result and viewing services.")]),e._v(" "),t("li",[e._v("Rate limiting (TBD)")])]),e._v(" "),t("h4",{attrs:{id:"backend-rules"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#backend-rules"}},[e._v("#")]),e._v(" Backend rules")]),e._v(" "),t("p",[e._v("Some authorization rules will need to be enforced by the backends themselves:")]),e._v(" "),t("ol",[t("li",[e._v("Basic access and access to user specific resources based on subscription role.")]),e._v(" "),t("li",[e._v("Number of concurrent batch jobs")]),e._v(" "),t("li",[e._v("Available processing resources, batch job priorities")]),e._v(" "),t("li",[e._v("Batch job result data volume")]),e._v(" "),t("li",[e._v("Access to restricted collections")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{347:function(e,t,a){e.exports=a.p+"assets/img/api.2a906ee1.png"},569:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"federation-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#federation-api"}},[e._v("#")]),e._v(" Federation API")]),e._v(" "),t("p",[e._v("The general contract is the "),t("a",{attrs:{href:"https://api.openeo.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(" in the latest stable version of the 1.x branch.")]),e._v(" "),t("p",[e._v('The aggregator that proxies the back-ends in the federation also implements the same API, but it also implements the "Federation Extension" (currently in draft state).')]),e._v(" "),t("h2",{attrs:{id:"profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#profiles"}},[e._v("#")]),e._v(" Profiles")]),e._v(" "),t("p",[e._v("In addition to the general openEO API specification and their "),t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/profiles/api.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("API Profiles"),t("OutboundLink")],1),e._v(",\nopenEO Platform requires to implement an additional API profile:\n"),t("em",[e._v("LP: Required for openEO Platform")]),e._v(", which requires the openEO profile "),t("em",[e._v("L2: Recommended")]),e._v(".\nThe requirement to implement two of "),t("em",[e._v("L1A")]),e._v(", "),t("em",[e._v("L1B")]),e._v(", and "),t("em",[e._v("L1C")]),e._v(" has been restricted for openEO Platform to always require "),t("em",[e._v("L1A: Synchronous Processing")]),e._v(" and "),t("em",[e._v("L1B: Batch Jobs")]),e._v(" (see req. no. 703). This means that "),t("em",[e._v("L1C: Secondary Web Services")]),e._v(" is optional.")]),e._v(" "),t("figure",[t("img",{attrs:{src:a(347),alt:"The hierarchy of openEO and openEO Platform API profiles."}}),e._v(" "),t("figcaption",[e._v("An overview of the openEO and openEO Platform API profiles.")])]),e._v(" "),t("h3",{attrs:{id:"lp-required-for-openeo-platform"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lp-required-for-openeo-platform"}},[e._v("#")]),e._v(" LP: Required for openEO Platform")]),e._v(" "),t("p",[e._v("The profile only lists requirements that are not covered by the openEO profile "),t("em",[e._v("L2: Recommended")]),e._v(" yet.")]),e._v(" "),t("h4",{attrs:{id:"api-fundamentals"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-fundamentals"}},[e._v("#")]),e._v(" API fundamentals")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("14")]),e._v(" "),t("td",[e._v("All > Billing")]),e._v(" "),t("td",[e._v("Supports the openEO Platform credit system")])])])]),e._v(" "),t("h4",{attrs:{id:"file-formats"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#file-formats"}},[e._v("#")]),e._v(" File Formats")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("45")]),e._v(" "),t("td",[t("code",[e._v("GET /file_formats")])]),e._v(" "),t("td",[e._v("File format names and parameters aligned with openEO Platform as defined for the pre-defined "),t("RouterLink",{attrs:{to:"/federation/backends/fileformats.html"}},[e._v("file formats")])],1)])])]),e._v(" "),t("h4",{attrs:{id:"other"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#other"}},[e._v("#")]),e._v(" Other")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("90")]),e._v(" "),t("td",[t("code",[e._v("GET /health")])]),e._v(" "),t("td",[e._v("Returns 2XX or 5XX http status code (without authentication)")])])])]),e._v(" "),t("h4",{attrs:{id:"auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#auth"}},[e._v("#")]),e._v(" Auth")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("113")]),e._v(" "),t("td",[t("code",[e._v("GET /credentials/oidc")])]),e._v(" "),t("td",[e._v("Supports EGI as identity provider (including tokens)")])]),e._v(" "),t("tr",[t("td",[e._v("118")]),e._v(" "),t("td",[t("code",[e._v("GET /credentials/oidc")])]),e._v(" "),t("td",[e._v("Supports the required entitlements of the vo.openeo.cloud virtual organization, especially the claim eduperson_entitlement")])])])]),e._v(" "),t("p",[e._v("For more details about "),t("a",{attrs:{href:"#authentication-and-authorization"}},[e._v("Authentication and Authorization")]),e._v(", please see the corresponding chapters below.")]),e._v(" "),t("h4",{attrs:{id:"pre-defined-processes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#pre-defined-processes"}},[e._v("#")]),e._v(" Pre-defined Processes")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("205")]),e._v(" "),t("td",[t("code",[e._v("GET /processes")]),e._v(" > processes")]),e._v(" "),t("td",[e._v("All processes are valid according to the specification (id, description, parameters, returns are required)")])]),e._v(" "),t("tr",[t("td",[e._v("208")]),e._v(" "),t("td",[t("code",[e._v("GET /processes")]),e._v(" > processes")]),e._v(" "),t("td",[e._v("Processes are marked as experimental or deprecated if applicable")])])])]),e._v(" "),t("h4",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("311")]),e._v(" "),t("td",[t("code",[e._v("GET /collections")]),e._v(" > collections")]),e._v(" "),t("td",[e._v("Collections are marked as experimental or deprecated if applicable")])]),e._v(" "),t("tr",[t("td",[e._v("324")]),e._v(" "),t("td",[t("code",[e._v("GET /collections/{id}")]),e._v(" > id")]),e._v(" "),t("td",[e._v("IDs follow the openEO Platform naming convention")])]),e._v(" "),t("tr",[t("td",[e._v("327")]),e._v(" "),t("td",[t("code",[e._v("GET /collections/{id}")]),e._v(" > providers")]),e._v(" "),t("td",[e._v("Each collection needs to expose the backend offering the data")])])])]),e._v(" "),t("h4",{attrs:{id:"data-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#data-processing"}},[e._v("#")]),e._v(" Data Processing")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("703")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Batch jobs and synchronous processing are implemented (secondary web services are optional)")])]),e._v(" "),t("tr",[t("td",[e._v("704")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Time after which batch job results get automatically deleted: 90 days or later")])]),e._v(" "),t("tr",[t("td",[e._v("705")]),e._v(" "),t("td"),e._v(" "),t("td",[e._v("Time after which batch job metadata gets automatically deleted: 1 year or later")])])])]),e._v(" "),t("h4",{attrs:{id:"batch-jobs-results"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#batch-jobs-results"}},[e._v("#")]),e._v(" Batch Jobs > Results")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("873")]),e._v(" "),t("td",[t("code",[e._v("GET /jobs/{id}/results")]),e._v(" > public access link")]),e._v(" "),t("td",[e._v("Default expiry time of the signed URLs for results: 7 days")])])])]),e._v(" "),t("h4",{attrs:{id:"synchronous-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#synchronous-processing"}},[e._v("#")]),e._v(" Synchronous Processing")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("#")]),e._v(" "),t("th",[e._v("Functionality")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("920")]),e._v(" "),t("td",[t("code",[e._v("POST /result")]),e._v(" > timeout")]),e._v(" "),t("td",[e._v("The timeout for synchronous calls is: 5 minutes")])])])]),e._v(" "),t("h2",{attrs:{id:"authentication-and-authorization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authentication-and-authorization"}},[e._v("#")]),e._v(" Authentication and authorization")]),e._v(" "),t("p",[e._v("This important aspect of the federation is standardized by the "),t("a",{attrs:{href:"https://aarc-project.eu/architecture/",target:"_blank",rel:"noopener noreferrer"}},[e._v("AARC Blueprint Architecture"),t("OutboundLink")],1),e._v(". EGI Check-in is the concrete implementation that is currently in use.")]),e._v(" "),t("h3",{attrs:{id:"authentication"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authentication"}},[e._v("#")]),e._v(" Authentication")]),e._v(" "),t("p",[e._v("The openEO platform federation standardizes on the use of "),t("a",{attrs:{href:"https://aai.egi.eu",target:"_blank",rel:"noopener noreferrer"}},[e._v("EGI Check-in"),t("OutboundLink")],1),e._v(" as identity provider. Backends have to support the use of openID connect + PKCE, to enable this and register a client with EGI Check-in.")]),e._v(" "),t("h3",{attrs:{id:"authorization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#authorization"}},[e._v("#")]),e._v(" Authorization")]),e._v(" "),t("h4",{attrs:{id:"entitlements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#entitlements"}},[e._v("#")]),e._v(" Entitlements")]),e._v(" "),t("p",[e._v("Users of the federation are organized under the 'vo.openeo.cloud' virtual organization in EGI Check-in. Inside the virtual organization, different roles can be assigned to a user, to indicate that they have a certain subscription, or even on a more fine-grained level are entitled to specific actions or resources.\nThe mechanism to check this, is again supported by EGI Check-in, under the 'eduperson_entitlement' claim: "),t("a",{attrs:{href:"https://docs.egi.eu/providers/check-in/sp/#claims",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://docs.egi.eu/providers/check-in/sp/#claims"),t("OutboundLink")],1)]),e._v(" "),t("h4",{attrs:{id:"credits"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#credits"}},[e._v("#")]),e._v(" Credits")]),e._v(" "),t("p",[e._v("The second criterium for authorization is based on credits that are available to a user. Credits allow the platform to limit the volume of data access and processing operations that a user can perform during a given time frame. The amount of available credits depends on the subscription.\nWhen the credit balance of a user goes below zero, processing operations can be blocked.")]),e._v(" "),t("h4",{attrs:{id:"aggregator-rules"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#aggregator-rules"}},[e._v("#")]),e._v(" Aggregator rules")]),e._v(" "),t("p",[e._v("Based on the subscription and available credits, the aggregator can implement these rules:")]),e._v(" "),t("ol",[t("li",[e._v("Credit checks to block starting of batch jobs, synchronous requests to /result and viewing services.")]),e._v(" "),t("li",[e._v("Rate limiting (TBD)")])]),e._v(" "),t("h4",{attrs:{id:"backend-rules"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#backend-rules"}},[e._v("#")]),e._v(" Backend rules")]),e._v(" "),t("p",[e._v("Some authorization rules will need to be enforced by the backends themselves:")]),e._v(" "),t("ol",[t("li",[e._v("Basic access and access to user specific resources based on subscription role.")]),e._v(" "),t("li",[e._v("Number of concurrent batch jobs")]),e._v(" "),t("li",[e._v("Available processing resources, batch job priorities")]),e._v(" "),t("li",[e._v("Batch job result data volume")]),e._v(" "),t("li",[e._v("Access to restricted collections")])])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/63.fa32bd88.js b/assets/js/63.79a4f4d8.js similarity index 78% rename from assets/js/63.fa32bd88.js rename to assets/js/63.79a4f4d8.js index 69064fe90..6323945d2 100644 --- a/assets/js/63.fa32bd88.js +++ b/assets/js/63.79a4f4d8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{570:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("ApiSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{568:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("ApiSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/64.4fb55b08.js b/assets/js/64.f3e4e1c2.js similarity index 79% rename from assets/js/64.4fb55b08.js rename to assets/js/64.f3e4e1c2.js index e6a92fb42..337e151aa 100644 --- a/assets/js/64.4fb55b08.js +++ b/assets/js/64.f3e4e1c2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{567:function(t,n,s){"use strict";s.r(n);var o=s(4),e=Object(o.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("DataCollections")],1)}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{566:function(t,n,s){"use strict";s.r(n);var o=s(4),e=Object(o.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("DataCollections")],1)}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/65.f26fda01.js b/assets/js/65.2730c349.js similarity index 98% rename from assets/js/65.f26fda01.js rename to assets/js/65.2730c349.js index daebbe719..f6badf9f5 100644 --- a/assets/js/65.f26fda01.js +++ b/assets/js/65.2730c349.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{566:function(e,t,o){"use strict";o.r(t);var a=o(4),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"platform-credit-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-usage"}},[e._v("#")]),e._v(" Platform credit usage")]),e._v(" "),t("p",[e._v("As a user of openEO platform, you require a subscription to get access. Various packages are "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available"),t("OutboundLink")],1),e._v(",\nbut they all come with a number of 'platform credits' that you can consume in various ways.")]),e._v(" "),t("p",[e._v("Currently, credits can be deducted based on:")]),e._v(" "),t("ul",[t("li",[e._v("CPU usage (cores/second)")]),e._v(" "),t("li",[e._v("Memory usage (GB/second)")]),e._v(" "),t("li",[e._v("Storage (GB/day)")]),e._v(" "),t("li",[e._v("Data access to specific layers (e.g. Sentinel Hub or commercial)")]),e._v(" "),t("li",[e._v("Usage of services contributed by third parties, through an 'added value' cost (e.g. per hectare)")])]),e._v(" "),t("p",[e._v("For example, let's say we compute a Sentinel-2 based NDWI for an area of 10 hectares to a series of GeoTiffs (one per observation).")]),e._v(" "),t("p",[e._v("When running this example, the batch job reports the usage, which can be seen in the\n"),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Platform Editor"),t("OutboundLink")],1),e._v(' by clicking the "i" button for an individual batch job:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/159861044-d758443f-9056-4474-909f-ebd8400de9dd.png",alt:"Usage Metrics shown in the Platform Editor"}}),e._v(" "),t("figcaption",[e._v("Usage Metrics shown in the Platform Editor for an example batch job.")])]),e._v(" "),t("p",[e._v("13,400,773 mb-seconds corresponds to 3.64 GB hours or 3.64 credits\n5099 CPU seconds corresponds to 1.4 CPU hour which translates to 2.12 credits")]),e._v(" "),t("p",[e._v("Summing this up, we arrive at 5.76 credits. In the current free tier, you receive 1000 credits, which amounts to quite a few of jobs like this!\nIt is important to note however that resource consumption (CPU and memory in this case) is not fixed over time because the\nperformance characteristics of a particular cloud tends to fluctuate depending on overall load.\nCloud providers do try to avoid this, but in general only manage to do so within the limits of a given SLA.")]),e._v(" "),t("h2",{attrs:{id:"platform-credit-rates"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-rates"}},[e._v("#")]),e._v(" Platform credit rates")]),e._v(" "),t("p",[e._v("The example above also shows that conversion rates need to be applied to convert resource usage into credits.\nAs openEO platform consists of different software components that are operated on different clouds, these conversion rates are not set to a fixed value\nfor the platform as a whole. For instance, a backend running on more expensive but faster CPU's, might charge more for a CPU hour compared to a provider\nrunning on slower but cheaper CPU's.")]),e._v(" "),t("p",[e._v("While this might seem to make the costs unpredictable, we recommend users to also evaluate their own resource usage.\nIf the cost for a particular job appears relatively high, it might be worthwhile to try running it against a different backend if possible.")]),e._v(" "),t("p",[e._v("The platform will also notify users of changes to the conversion rate, especially if a resource would become more expensive.\nIf you do notice an unexpected increase in credit usage, we recommend contacting the platform through the helpdesk, to ensure that this is expected.")]),e._v(" "),t("h2",{attrs:{id:"estimating-resource-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#estimating-resource-usage"}},[e._v("#")]),e._v(" Estimating resource usage")]),e._v(" "),t("p",[e._v("Often you want to know up front what kind of costs you will incur by using the platform, especially when generating larger results\nor running the same job at fixed times. For the platform however, this is not trivial to do without actually running your job, because the resource\nconsumption heavily depends on the exact combination of processes that you are using.")]),e._v(" "),t("p",[e._v("Hence, the way to estimate job usage is to start small. For instance, for a query on 10m resolution, you may want to start with a 10ha area,\nand simply run that job. As shown above, this will usually incur a cost of only a few cents. In the worst case, you might discover that this already\ncosts a few euros, but then you would also notice that your job is taking multiple hours to run.")]),e._v(" "),t("p",[e._v("In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that\na larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales,\nand what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{567:function(e,t,o){"use strict";o.r(t);var a=o(4),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"platform-credit-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-usage"}},[e._v("#")]),e._v(" Platform credit usage")]),e._v(" "),t("p",[e._v("As a user of openEO platform, you require a subscription to get access. Various packages are "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available"),t("OutboundLink")],1),e._v(",\nbut they all come with a number of 'platform credits' that you can consume in various ways.")]),e._v(" "),t("p",[e._v("Currently, credits can be deducted based on:")]),e._v(" "),t("ul",[t("li",[e._v("CPU usage (cores/second)")]),e._v(" "),t("li",[e._v("Memory usage (GB/second)")]),e._v(" "),t("li",[e._v("Storage (GB/day)")]),e._v(" "),t("li",[e._v("Data access to specific layers (e.g. Sentinel Hub or commercial)")]),e._v(" "),t("li",[e._v("Usage of services contributed by third parties, through an 'added value' cost (e.g. per hectare)")])]),e._v(" "),t("p",[e._v("For example, let's say we compute a Sentinel-2 based NDWI for an area of 10 hectares to a series of GeoTiffs (one per observation).")]),e._v(" "),t("p",[e._v("When running this example, the batch job reports the usage, which can be seen in the\n"),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Platform Editor"),t("OutboundLink")],1),e._v(' by clicking the "i" button for an individual batch job:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/159861044-d758443f-9056-4474-909f-ebd8400de9dd.png",alt:"Usage Metrics shown in the Platform Editor"}}),e._v(" "),t("figcaption",[e._v("Usage Metrics shown in the Platform Editor for an example batch job.")])]),e._v(" "),t("p",[e._v("13,400,773 mb-seconds corresponds to 3.64 GB hours or 3.64 credits\n5099 CPU seconds corresponds to 1.4 CPU hour which translates to 2.12 credits")]),e._v(" "),t("p",[e._v("Summing this up, we arrive at 5.76 credits. In the current free tier, you receive 1000 credits, which amounts to quite a few of jobs like this!\nIt is important to note however that resource consumption (CPU and memory in this case) is not fixed over time because the\nperformance characteristics of a particular cloud tends to fluctuate depending on overall load.\nCloud providers do try to avoid this, but in general only manage to do so within the limits of a given SLA.")]),e._v(" "),t("h2",{attrs:{id:"platform-credit-rates"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#platform-credit-rates"}},[e._v("#")]),e._v(" Platform credit rates")]),e._v(" "),t("p",[e._v("The example above also shows that conversion rates need to be applied to convert resource usage into credits.\nAs openEO platform consists of different software components that are operated on different clouds, these conversion rates are not set to a fixed value\nfor the platform as a whole. For instance, a backend running on more expensive but faster CPU's, might charge more for a CPU hour compared to a provider\nrunning on slower but cheaper CPU's.")]),e._v(" "),t("p",[e._v("While this might seem to make the costs unpredictable, we recommend users to also evaluate their own resource usage.\nIf the cost for a particular job appears relatively high, it might be worthwhile to try running it against a different backend if possible.")]),e._v(" "),t("p",[e._v("The platform will also notify users of changes to the conversion rate, especially if a resource would become more expensive.\nIf you do notice an unexpected increase in credit usage, we recommend contacting the platform through the helpdesk, to ensure that this is expected.")]),e._v(" "),t("h2",{attrs:{id:"estimating-resource-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#estimating-resource-usage"}},[e._v("#")]),e._v(" Estimating resource usage")]),e._v(" "),t("p",[e._v("Often you want to know up front what kind of costs you will incur by using the platform, especially when generating larger results\nor running the same job at fixed times. For the platform however, this is not trivial to do without actually running your job, because the resource\nconsumption heavily depends on the exact combination of processes that you are using.")]),e._v(" "),t("p",[e._v("Hence, the way to estimate job usage is to start small. For instance, for a query on 10m resolution, you may want to start with a 10ha area,\nand simply run that job. As shown above, this will usually incur a cost of only a few cents. In the worst case, you might discover that this already\ncosts a few euros, but then you would also notice that your job is taking multiple hours to run.")]),e._v(" "),t("p",[e._v("In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that\na larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales,\nand what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/66.6b681c6f.js b/assets/js/66.6cd67341.js similarity index 99% rename from assets/js/66.6b681c6f.js rename to assets/js/66.6cd67341.js index f9d0597a6..f8a38c3e9 100644 --- a/assets/js/66.6b681c6f.js +++ b/assets/js/66.6cd67341.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{569:function(e,t,o){"use strict";o.r(t);var a=o(4),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("p",[e._v("This page describes requirements on STAC collection metadata for backend providers in the openEO platform federation.\nThese requirements should be considered an addition to what is already required by the "),t("a",{attrs:{href:"https://api.openeo.org/#tag/EO-Data-Discovery/operation/describe-collection",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(" and the "),t("RouterLink",{attrs:{to:"/federation/backends/api.html#profiles"}},[e._v("API profiles")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"collection-availability"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collection-availability"}},[e._v("#")]),e._v(" Collection availability")]),e._v(" "),t("p",[e._v("The collections are a key asset of the platform, and users need to know what they can expect from a certain collection.\nThe federation relies on openEO collection metadata following the STAC specification to communicate this towards the user. Backend providers\nneed to comply with these requirements for their collection:")]),e._v(" "),t("p",[e._v("The 'experimental' flag from https://stac-extensions.github.io/version/v1.1.0/schema.json needs to be set on experimental collections.\nA collection can be experimental either because there are issues with the actual data or catalog, or because of backend specific issues that make the use of the collection unstable.\nA collection marked as experimental does not need to comply with further requirements.")]),e._v(" "),t("h3",{attrs:{id:"requirements-for-non-experimental-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements-for-non-experimental-collections"}},[e._v("#")]),e._v(" Requirements for non-experimental collections")]),e._v(" "),t("p",[e._v("The main goal for non-experimental features is to achieve high user satisfaction by providing stability & usability "),t("em",[e._v("and")]),e._v(" to comply with federation agreements that make it possible to offer a unified service.\nThe list below makes this more concrete, but is not expected to cover all aspects. It is therefore important that providers, who know their implementations and datasets best, properly judge if a specific collection can be\nconsidered non-experimental.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these\nproviders with respect to the properties (timeliness, completeness,...) of a specific collection.\nThe providers with role 'host' and 'producer' are mandatory.")])]),e._v(" "),t("li",[t("p",[e._v("The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.")])]),e._v(" "),t("li",[t("p",[e._v("Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.")])]),e._v(" "),t("li",[t("p",[e._v("Collection metadata should be valid STAC metadata and must include all extensions in "),t("code",[e._v("stac_extensions")]),e._v(". Tools such as "),t("a",{attrs:{href:"https://github.com/stac-utils/stac-validator",target:"_blank",rel:"noopener noreferrer"}},[e._v("STAC-validator"),t("OutboundLink")],1),e._v(" can indicate obvious issues.")])]),e._v(" "),t("li",[t("p",[e._v("FAIR principle R1: "),t("a",{attrs:{href:"https://www.go-fair.org/fair-principles/r1-metadata-richly-described-plurality-accurate-relevant-attributes/",target:"_blank",rel:"noopener noreferrer"}},[e._v("(Meta)data are richly described with a plurality of accurate and relevant attributes"),t("OutboundLink")],1)])]),e._v(" "),t("li",[t("p",[e._v("Collections have to follow harmonization guidelines specified below, if applicable.")])]),e._v(" "),t("li",[t("p",[e._v("Collections naming (id, dimensions, bands) should remain constant.")])]),e._v(" "),t("li",[t("p",[e._v("Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.")])]),e._v(" "),t("li",[t("p",[e._v("Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.")])]),e._v(" "),t("li",[t("p",[e._v("Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.")])])]),e._v(" "),t("h2",{attrs:{id:"harmonization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#harmonization"}},[e._v("#")]),e._v(" Harmonization")]),e._v(" "),t("p",[e._v("When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.")]),e._v(" "),t("ul",[t("li",[e._v("SENTINEL1_GRD")]),e._v(" "),t("li",[e._v("SENTINEL2_L1C")]),e._v(" "),t("li",[t("a",{attrs:{href:"#sentinel2-l2a"}},[e._v("SENTINEL2_L2A")])]),e._v(" "),t("li",[e._v("SENTINEL3_OLCI_L1B")])]),e._v(" "),t("h3",{attrs:{id:"common-naming-convention"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-naming-convention"}},[e._v("#")]),e._v(" Common naming convention")]),e._v(" "),t("p",[e._v("In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:")]),e._v(" "),t("ul",[t("li",[e._v('Names should be written in capital letters ("all caps")')]),e._v(" "),t("li",[e._v("Names should consist of a combination of different optional attributes (see table)")]),e._v(" "),t("li",[e._v("The different attributes should be separated by an underscore")])]),e._v(" "),t("p",[e._v("Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):")]),e._v(" "),t("ul",[t("li",[e._v("collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)")]),e._v(" "),t("li",[e._v("derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Attribute")]),e._v(" "),t("th",[e._v("Type")]),e._v(" "),t("th",[e._v("Description")]),e._v(" "),t("th",[e._v("Examples")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("Provider")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections produced or order by the listed provider.")]),e._v(" "),t("td",[t("code",[e._v("ESA")]),e._v(", "),t("code",[e._v("CNSE")]),e._v(", "),t("code",[e._v("EMODNET")]),e._v(", "),t("code",[e._v("TERRASCOPE")]),e._v(". "),t("code",[e._v("CAMS")]),e._v(", "),t("code",[e._v("CGLS")])])]),e._v(" "),t("tr",[t("td",[e._v("Satellite/Platform")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the satellite/platform that acquired the data in the collection.")]),e._v(" "),t("td",[t("code",[e._v("SENTINEL2")]),e._v(", "),t("code",[e._v("LANDSAT8")]),e._v(", "),t("code",[e._v("PALSAR2")])])]),e._v(" "),t("tr",[t("td",[e._v("Processing level")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the level to which the data was processed (often processed raw data).")]),e._v(" "),t("td",[t("code",[e._v("L2A")]),e._v(", "),t("code",[e._v("L3")]),e._v(", "),t("code",[e._v("L2_1")])])]),e._v(" "),t("tr",[t("td",[e._v("Version")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections that are produced in several versions.")]),e._v(" "),t("td",[t("code",[e._v("V1")]),e._v(", "),t("code",[e._v("V2")])])]),e._v(" "),t("tr",[t("td",[e._v("Resolution")]),e._v(" "),t("td",[e._v("string ("),t("code",[e._v("number + unit")]),e._v(" or "),t("code",[e._v("string")]),e._v(")")]),e._v(" "),t("td",[e._v("Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection.")]),e._v(" "),t("td",[t("code",[e._v("10M")]),e._v(", "),t("code",[e._v("120M")]),e._v(", "),t("code",[e._v("EUROPE")]),e._v(", "),t("code",[e._v("GLOBAL")])])]),e._v(" "),t("tr",[t("td",[e._v("Product Description")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Human readable description of the data within the collection. Can also be an abbreviation or acronym.")]),e._v(" "),t("td",[t("code",[e._v("LAND_COVER_MAP")]),e._v(", "),t("code",[e._v("WORLDCOVER")]),e._v(", "),t("code",[e._v("NDVI")]),e._v(", "),t("code",[e._v("LAI")])])]),e._v(" "),t("tr",[t("td",[e._v("Year")]),e._v(" "),t("td",[e._v("number")]),e._v(" "),t("td",[e._v("Often used for derived products that where updated in the specified year or created based on data of the specified year.")]),e._v(" "),t("td",[t("code",[e._v("2022")])])])])]),e._v(" "),t("p",[e._v("Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., "),t("code",[e._v("SENTINEL2_L1C")]),e._v(" ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).")]),e._v(" "),t("p",[e._v("*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.")]),e._v(" "),t("h3",{attrs:{id:"sentinel2-l2a"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel2-l2a"}},[e._v("#")]),e._v(" Sentinel2-L2A")]),e._v(" "),t("p",[e._v("The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.")]),e._v(" "),t("h4",{attrs:{id:"bands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bands"}},[e._v("#")]),e._v(" Bands")]),e._v(" "),t("p",[e._v("Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("SCL")]),e._v(" = the Sen2Cor scene classification band")]),e._v(" "),t("li",[t("code",[e._v("approximateViewAzimuth")]),e._v(" = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewAzimuthAngles")]),e._v(") or the mean angle ("),t("code",[e._v("viewAzimuthMean")]),e._v(") is explicitly specified, the data is processed on the backend that holds the specified band.")]),e._v(" "),t("li",[t("code",[e._v("viewZenithMean")]),e._v(" = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewZenithMean")]),e._v(") or the mean angle ("),t("code",[e._v("viewZenithAngles")]),e._v(") is explicitly specified, the data is processed on the backend that holds those bands.")]),e._v(" "),t("li",[t("code",[e._v("sunAzimuthAngles")]),e._v("/"),t("code",[e._v("sunZenithAngles")]),e._v(" = collective term for the exact sun azimuth and sun zenith angle.")])]),e._v(" "),t("h3",{attrs:{id:"common-properties"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-properties"}},[e._v("#")]),e._v(" Common Properties")]),e._v(" "),t("p",[e._v("We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.")]),e._v(" "),t("h4",{attrs:{id:"common"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common"}},[e._v("#")]),e._v(" Common")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satorbit_state",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:orbit_state"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satrelative_orbit",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:relative_orbit"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"optical-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optical-instruments"}},[e._v("#")]),e._v(" Optical instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/eo#eocloud_cover",target:"_blank",rel:"noopener noreferrer"}},[e._v("eo:cloud_cover"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"sar-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sar-instruments"}},[e._v("#")]),e._v(" SAR instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sar#item-properties-or-asset-fields",target:"_blank",rel:"noopener noreferrer"}},[e._v("sar:instrument_mode"),t("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{570:function(e,t,o){"use strict";o.r(t);var a=o(4),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collections"}},[e._v("#")]),e._v(" Collections")]),e._v(" "),t("p",[e._v("This page describes requirements on STAC collection metadata for backend providers in the openEO platform federation.\nThese requirements should be considered an addition to what is already required by the "),t("a",{attrs:{href:"https://api.openeo.org/#tag/EO-Data-Discovery/operation/describe-collection",target:"_blank",rel:"noopener noreferrer"}},[e._v("openEO API"),t("OutboundLink")],1),e._v(" and the "),t("RouterLink",{attrs:{to:"/federation/backends/api.html#profiles"}},[e._v("API profiles")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"collection-availability"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#collection-availability"}},[e._v("#")]),e._v(" Collection availability")]),e._v(" "),t("p",[e._v("The collections are a key asset of the platform, and users need to know what they can expect from a certain collection.\nThe federation relies on openEO collection metadata following the STAC specification to communicate this towards the user. Backend providers\nneed to comply with these requirements for their collection:")]),e._v(" "),t("p",[e._v("The 'experimental' flag from https://stac-extensions.github.io/version/v1.1.0/schema.json needs to be set on experimental collections.\nA collection can be experimental either because there are issues with the actual data or catalog, or because of backend specific issues that make the use of the collection unstable.\nA collection marked as experimental does not need to comply with further requirements.")]),e._v(" "),t("h3",{attrs:{id:"requirements-for-non-experimental-collections"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements-for-non-experimental-collections"}},[e._v("#")]),e._v(" Requirements for non-experimental collections")]),e._v(" "),t("p",[e._v("The main goal for non-experimental features is to achieve high user satisfaction by providing stability & usability "),t("em",[e._v("and")]),e._v(" to comply with federation agreements that make it possible to offer a unified service.\nThe list below makes this more concrete, but is not expected to cover all aspects. It is therefore important that providers, who know their implementations and datasets best, properly judge if a specific collection can be\nconsidered non-experimental.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these\nproviders with respect to the properties (timeliness, completeness,...) of a specific collection.\nThe providers with role 'host' and 'producer' are mandatory.")])]),e._v(" "),t("li",[t("p",[e._v("The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.")])]),e._v(" "),t("li",[t("p",[e._v("Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.")])]),e._v(" "),t("li",[t("p",[e._v("Collection metadata should be valid STAC metadata and must include all extensions in "),t("code",[e._v("stac_extensions")]),e._v(". Tools such as "),t("a",{attrs:{href:"https://github.com/stac-utils/stac-validator",target:"_blank",rel:"noopener noreferrer"}},[e._v("STAC-validator"),t("OutboundLink")],1),e._v(" can indicate obvious issues.")])]),e._v(" "),t("li",[t("p",[e._v("FAIR principle R1: "),t("a",{attrs:{href:"https://www.go-fair.org/fair-principles/r1-metadata-richly-described-plurality-accurate-relevant-attributes/",target:"_blank",rel:"noopener noreferrer"}},[e._v("(Meta)data are richly described with a plurality of accurate and relevant attributes"),t("OutboundLink")],1)])]),e._v(" "),t("li",[t("p",[e._v("Collections have to follow harmonization guidelines specified below, if applicable.")])]),e._v(" "),t("li",[t("p",[e._v("Collections naming (id, dimensions, bands) should remain constant.")])]),e._v(" "),t("li",[t("p",[e._v("Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.")])]),e._v(" "),t("li",[t("p",[e._v("Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.")])]),e._v(" "),t("li",[t("p",[e._v("Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.")])])]),e._v(" "),t("h2",{attrs:{id:"harmonization"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#harmonization"}},[e._v("#")]),e._v(" Harmonization")]),e._v(" "),t("p",[e._v("When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.")]),e._v(" "),t("ul",[t("li",[e._v("SENTINEL1_GRD")]),e._v(" "),t("li",[e._v("SENTINEL2_L1C")]),e._v(" "),t("li",[t("a",{attrs:{href:"#sentinel2-l2a"}},[e._v("SENTINEL2_L2A")])]),e._v(" "),t("li",[e._v("SENTINEL3_OLCI_L1B")])]),e._v(" "),t("h3",{attrs:{id:"common-naming-convention"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-naming-convention"}},[e._v("#")]),e._v(" Common naming convention")]),e._v(" "),t("p",[e._v("In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:")]),e._v(" "),t("ul",[t("li",[e._v('Names should be written in capital letters ("all caps")')]),e._v(" "),t("li",[e._v("Names should consist of a combination of different optional attributes (see table)")]),e._v(" "),t("li",[e._v("The different attributes should be separated by an underscore")])]),e._v(" "),t("p",[e._v("Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):")]),e._v(" "),t("ul",[t("li",[e._v("collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)")]),e._v(" "),t("li",[e._v("derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Attribute")]),e._v(" "),t("th",[e._v("Type")]),e._v(" "),t("th",[e._v("Description")]),e._v(" "),t("th",[e._v("Examples")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("Provider")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections produced or order by the listed provider.")]),e._v(" "),t("td",[t("code",[e._v("ESA")]),e._v(", "),t("code",[e._v("CNSE")]),e._v(", "),t("code",[e._v("EMODNET")]),e._v(", "),t("code",[e._v("TERRASCOPE")]),e._v(". "),t("code",[e._v("CAMS")]),e._v(", "),t("code",[e._v("CGLS")])])]),e._v(" "),t("tr",[t("td",[e._v("Satellite/Platform")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the satellite/platform that acquired the data in the collection.")]),e._v(" "),t("td",[t("code",[e._v("SENTINEL2")]),e._v(", "),t("code",[e._v("LANDSAT8")]),e._v(", "),t("code",[e._v("PALSAR2")])])]),e._v(" "),t("tr",[t("td",[e._v("Processing level")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Name of the level to which the data was processed (often processed raw data).")]),e._v(" "),t("td",[t("code",[e._v("L2A")]),e._v(", "),t("code",[e._v("L3")]),e._v(", "),t("code",[e._v("L2_1")])])]),e._v(" "),t("tr",[t("td",[e._v("Version")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Often used for derived collections that are produced in several versions.")]),e._v(" "),t("td",[t("code",[e._v("V1")]),e._v(", "),t("code",[e._v("V2")])])]),e._v(" "),t("tr",[t("td",[e._v("Resolution")]),e._v(" "),t("td",[e._v("string ("),t("code",[e._v("number + unit")]),e._v(" or "),t("code",[e._v("string")]),e._v(")")]),e._v(" "),t("td",[e._v("Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection.")]),e._v(" "),t("td",[t("code",[e._v("10M")]),e._v(", "),t("code",[e._v("120M")]),e._v(", "),t("code",[e._v("EUROPE")]),e._v(", "),t("code",[e._v("GLOBAL")])])]),e._v(" "),t("tr",[t("td",[e._v("Product Description")]),e._v(" "),t("td",[e._v("string")]),e._v(" "),t("td",[e._v("Human readable description of the data within the collection. Can also be an abbreviation or acronym.")]),e._v(" "),t("td",[t("code",[e._v("LAND_COVER_MAP")]),e._v(", "),t("code",[e._v("WORLDCOVER")]),e._v(", "),t("code",[e._v("NDVI")]),e._v(", "),t("code",[e._v("LAI")])])]),e._v(" "),t("tr",[t("td",[e._v("Year")]),e._v(" "),t("td",[e._v("number")]),e._v(" "),t("td",[e._v("Often used for derived products that where updated in the specified year or created based on data of the specified year.")]),e._v(" "),t("td",[t("code",[e._v("2022")])])])])]),e._v(" "),t("p",[e._v("Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., "),t("code",[e._v("SENTINEL2_L1C")]),e._v(" ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).")]),e._v(" "),t("p",[e._v("*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.")]),e._v(" "),t("h3",{attrs:{id:"sentinel2-l2a"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sentinel2-l2a"}},[e._v("#")]),e._v(" Sentinel2-L2A")]),e._v(" "),t("p",[e._v("The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.")]),e._v(" "),t("h4",{attrs:{id:"bands"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bands"}},[e._v("#")]),e._v(" Bands")]),e._v(" "),t("p",[e._v("Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("SCL")]),e._v(" = the Sen2Cor scene classification band")]),e._v(" "),t("li",[t("code",[e._v("approximateViewAzimuth")]),e._v(" = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewAzimuthAngles")]),e._v(") or the mean angle ("),t("code",[e._v("viewAzimuthMean")]),e._v(") is explicitly specified, the data is processed on the backend that holds the specified band.")]),e._v(" "),t("li",[t("code",[e._v("viewZenithMean")]),e._v(" = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle ("),t("code",[e._v("viewZenithMean")]),e._v(") or the mean angle ("),t("code",[e._v("viewZenithAngles")]),e._v(") is explicitly specified, the data is processed on the backend that holds those bands.")]),e._v(" "),t("li",[t("code",[e._v("sunAzimuthAngles")]),e._v("/"),t("code",[e._v("sunZenithAngles")]),e._v(" = collective term for the exact sun azimuth and sun zenith angle.")])]),e._v(" "),t("h3",{attrs:{id:"common-properties"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common-properties"}},[e._v("#")]),e._v(" Common Properties")]),e._v(" "),t("p",[e._v("We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.")]),e._v(" "),t("h4",{attrs:{id:"common"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#common"}},[e._v("#")]),e._v(" Common")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satorbit_state",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:orbit_state"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sat#satrelative_orbit",target:"_blank",rel:"noopener noreferrer"}},[e._v("sat:relative_orbit"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"optical-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#optical-instruments"}},[e._v("#")]),e._v(" Optical instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/eo#eocloud_cover",target:"_blank",rel:"noopener noreferrer"}},[e._v("eo:cloud_cover"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"sar-instruments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sar-instruments"}},[e._v("#")]),e._v(" SAR instruments")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/stac-extensions/sar#item-properties-or-asset-fields",target:"_blank",rel:"noopener noreferrer"}},[e._v("sar:instrument_mode"),t("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/69.b5818ca3.js b/assets/js/69.09f05241.js similarity index 79% rename from assets/js/69.b5818ca3.js rename to assets/js/69.09f05241.js index 6b242f53e..26485efa0 100644 --- a/assets/js/69.b5818ca3.js +++ b/assets/js/69.09f05241.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{576:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("FileFormatsSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{575:function(t,n,s){"use strict";s.r(n);var e=s(4),o=Object(e.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("FileFormatsSpec")],1)}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/70.7acc0c78.js b/assets/js/70.25877a77.js similarity index 99% rename from assets/js/70.7acc0c78.js rename to assets/js/70.25877a77.js index 1334bc4f9..6c6c7ab3f 100644 --- a/assets/js/70.7acc0c78.js +++ b/assets/js/70.25877a77.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{575:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"get-started-with-the-openeo-python-client-client-side-processing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client-client-side-processing"}},[t._v("#")]),t._v(" Get started with the openEO Python Client Client Side Processing")]),t._v(" "),a("h2",{attrs:{id:"background"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#background"}},[t._v("#")]),t._v(" Background")]),t._v(" "),a("p",[t._v("The client-side processing functionality allows to test and use openEO with its processes locally, i.e. without any connection to an openEO back-end.\nIt relies on the projects "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-pg-parser-networkx%3E",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-pg-parser-networkx"),a("OutboundLink")],1),t._v(", which provides an openEO process graph parsing tool, and "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-processes-dask",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-processes-dask"),a("OutboundLink")],1),t._v(", which provides an Xarray and Dask implementation of most openEO processes.")]),t._v(" "),a("h2",{attrs:{id:"installation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("This feature requires "),a("code",[t._v("Python>=3.9")]),t._v(".")])]),t._v(" "),a("p",[t._v("The openEO Python client library can easily be installed with a tool like "),a("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),a("div",{staticClass:"language-shell script extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("pip "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("localprocessing"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),a("p",[t._v("Every openEO process graph relies on data which is typically provided by a cloud infrastructure (the openEO back-end).\nThe client-side processing adds the possibility to read and use local netCDFs, geoTIFFs, ZARR files, and remote STAC Collections or Items for your experiments.")]),t._v(" "),a("h3",{attrs:{id:"stac-collections-and-items"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#stac-collections-and-items"}},[t._v("#")]),t._v(" STAC Collections and Items")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("The provided examples using STAC rely on third party STAC Catalogs, we can't guarantee that the urls will remain valid.")])]),t._v(" "),a("p",[t._v("With the "),a("code",[t._v("load_stac")]),t._v(" process it's possible to load and use data provided by remote or local STAC Collections or Items.\nThe following code snippet loads Sentinel-2 L2A data from a public STAC Catalog, using specific spatial and temporal extent, band name and also properties for cloud coverage.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("47")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-06-15"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_cube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ns2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("When calling the "),a("code",[t._v(".execute()")]),t._v(" method on a "),a("code",[t._v("Datacube")]),t._v(" created from a "),a("code",[t._v("LocalConnection")]),t._v(", an "),a("code",[t._v("xarray.DataArray")]),t._v(" object containing dask arrays is returned:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" >>> s2_cube.execute()\n \n dask.array\n Coordinates: (12/53)\n * time (time) datetime64[ns] 2019-01-02...\n id (time) >> # Check if the data is loaded correctly\n>>> s2_datacube.execute()\n\ndask.array\nCoordinates:\n * t (t) datetime64[ns] 2022-06-02 2022-06-05 ... 2022-06-27 2022-06-30\n * x (x) float64 6.75e+05 6.75e+05 6.75e+05 ... 6.843e+05 6.843e+05\n * y (y) float64 5.155e+06 5.155e+06 5.155e+06 ... 5.148e+06 5.148e+06\n crs |S1 ...\n * bands (bands) object 'B04' 'B03' 'B02' 'B08' 'SCL'\nAttributes:\n Conventions: CF-1.9\n institution: openEO platform - Geotrellis backend: 0.9.5a1\n description:\n title:\n")])])]),a("p",[t._v("As you can see in the previous example, we are using a call to "),a("code",[t._v(".execute()")]),t._v(" which will execute locally the generated openEO process graph.\nIn this case, the process graph consist only in a single "),a("code",[t._v("load_collection")]),t._v(", which performs lazy loading of the data. With this first step you can check if the data is being read correctly by openEO.")]),t._v(" "),a("p",[t._v("Looking at the metadata of this netCDF sample, we can see that it contains the bands B04, B03, B02, B08 and SCL.\nAdditionally, we also see that it is composed by more than one element in time and that it covers the month of June 2022.")]),t._v(" "),a("p",[t._v("We can now do a simple processing for demo purposes, let's compute the median NDVI in time and visualize the result:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("b04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cmap"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Greens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We can perform the same example using data provided by STAC Collection:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.40")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.52")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-30"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nb04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"client-side-processing-example-notebooks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-processing-example-notebooks"}},[t._v("#")]),t._v(" Client-Side Processing Example Notebooks")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks/Client_Side_Processing",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the openEO Python Client repo"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/_alternatives/31_data_processing_stac.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the Cubes and Clouds repo"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"additional-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),a("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{579:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"get-started-with-the-openeo-python-client-client-side-processing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-python-client-client-side-processing"}},[t._v("#")]),t._v(" Get started with the openEO Python Client Client Side Processing")]),t._v(" "),a("h2",{attrs:{id:"background"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#background"}},[t._v("#")]),t._v(" Background")]),t._v(" "),a("p",[t._v("The client-side processing functionality allows to test and use openEO with its processes locally, i.e. without any connection to an openEO back-end.\nIt relies on the projects "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-pg-parser-networkx%3E",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-pg-parser-networkx"),a("OutboundLink")],1),t._v(", which provides an openEO process graph parsing tool, and "),a("a",{attrs:{href:"https://github.com/Open-EO/openeo-processes-dask",target:"_blank",rel:"noopener noreferrer"}},[t._v("openeo-processes-dask"),a("OutboundLink")],1),t._v(", which provides an Xarray and Dask implementation of most openEO processes.")]),t._v(" "),a("h2",{attrs:{id:"installation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("This feature requires "),a("code",[t._v("Python>=3.9")]),t._v(".")])]),t._v(" "),a("p",[t._v("The openEO Python client library can easily be installed with a tool like "),a("code",[t._v("pip")]),t._v(", for example:")]),t._v(" "),a("div",{staticClass:"language-shell script extra-class"},[a("pre",{pre:!0,attrs:{class:"language-shell"}},[a("code",[t._v("pip "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("localprocessing"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])])]),a("h2",{attrs:{id:"usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),a("p",[t._v("Every openEO process graph relies on data which is typically provided by a cloud infrastructure (the openEO back-end).\nThe client-side processing adds the possibility to read and use local netCDFs, geoTIFFs, ZARR files, and remote STAC Collections or Items for your experiments.")]),t._v(" "),a("h3",{attrs:{id:"stac-collections-and-items"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#stac-collections-and-items"}},[t._v("#")]),t._v(" STAC Collections and Items")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),a("p",[t._v("The provided examples using STAC rely on third party STAC Catalogs, we can't guarantee that the urls will remain valid.")])]),t._v(" "),a("p",[t._v("With the "),a("code",[t._v("load_stac")]),t._v(" process it's possible to load and use data provided by remote or local STAC Collections or Items.\nThe following code snippet loads Sentinel-2 L2A data from a public STAC Catalog, using specific spatial and temporal extent, band name and also properties for cloud coverage.")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("47")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-06-15"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_cube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ns2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("When calling the "),a("code",[t._v(".execute()")]),t._v(" method on a "),a("code",[t._v("Datacube")]),t._v(" created from a "),a("code",[t._v("LocalConnection")]),t._v(", an "),a("code",[t._v("xarray.DataArray")]),t._v(" object containing dask arrays is returned:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v(" >>> s2_cube.execute()\n \n dask.array\n Coordinates: (12/53)\n * time (time) datetime64[ns] 2019-01-02...\n id (time) >> # Check if the data is loaded correctly\n>>> s2_datacube.execute()\n\ndask.array\nCoordinates:\n * t (t) datetime64[ns] 2022-06-02 2022-06-05 ... 2022-06-27 2022-06-30\n * x (x) float64 6.75e+05 6.75e+05 6.75e+05 ... 6.843e+05 6.843e+05\n * y (y) float64 5.155e+06 5.155e+06 5.155e+06 ... 5.148e+06 5.148e+06\n crs |S1 ...\n * bands (bands) object 'B04' 'B03' 'B02' 'B08' 'SCL'\nAttributes:\n Conventions: CF-1.9\n institution: openEO platform - Geotrellis backend: 0.9.5a1\n description:\n title:\n")])])]),a("p",[t._v("As you can see in the previous example, we are using a call to "),a("code",[t._v(".execute()")]),t._v(" which will execute locally the generated openEO process graph.\nIn this case, the process graph consist only in a single "),a("code",[t._v("load_collection")]),t._v(", which performs lazy loading of the data. With this first step you can check if the data is being read correctly by openEO.")]),t._v(" "),a("p",[t._v("Looking at the metadata of this netCDF sample, we can see that it contains the bands B04, B03, B02, B08 and SCL.\nAdditionally, we also see that it is composed by more than one element in time and that it covers the month of June 2022.")]),t._v(" "),a("p",[t._v("We can now do a simple processing for demo purposes, let's compute the median NDVI in time and visualize the result:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("b04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B04"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B08"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("plot"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("imshow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("cmap"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Greens"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("p",[t._v("We can perform the same example using data provided by STAC Collection:")]),t._v(" "),a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("local "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" LocalConnection\nlocal_conn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" LocalConnection"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nurl "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a"')]),t._v("\nspatial_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.40")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.52")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("46.46")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("11.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ntemporal_extent "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-01"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2022-06-30"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nbands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nproperties "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"eo:cloud_cover"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("dict")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("lt"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\ns2_datacube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" local_conn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("url"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("spatial_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("temporal_extent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n properties"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("properties"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nb04 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"red"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nb08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" s2_datacube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nir"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("b08 "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" b04"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_median "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("reduce_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"time"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"median"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresult_ndvi "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ndvi_median"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("h2",{attrs:{id:"client-side-processing-example-notebooks"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-processing-example-notebooks"}},[t._v("#")]),t._v(" Client-Side Processing Example Notebooks")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks/Client_Side_Processing",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the openEO Python Client repo"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/_alternatives/31_data_processing_stac.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("From the Cubes and Clouds repo"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"additional-information"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#additional-information"}},[t._v("#")]),t._v(" Additional Information")]),t._v(" "),a("p",[t._v("Additional information and resources about the openEO Python Client Library:")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openEO Python Client Library Documentation"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Official openeo.cloud sample notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Python scripts"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client/tree/master/examples/notebooks",target:"_blank",rel:"noopener noreferrer"}},[t._v("Example Jupyter Notebooks"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("a",{attrs:{href:"https://github.com/Open-EO/openeo-python-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Repository on GitHub"),a("OutboundLink")],1)]),t._v(" "),a("li",[a("RouterLink",{attrs:{to:"/getting-started/python/shiny.html"}},[t._v("Run openEO processes in a Python Shiny App")])],1)])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/71.2a288608.js b/assets/js/71.0b3530a5.js similarity index 97% rename from assets/js/71.2a288608.js rename to assets/js/71.0b3530a5.js index 0de3dcdd4..8fa59c9ff 100644 --- a/assets/js/71.2a288608.js +++ b/assets/js/71.0b3530a5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{577:function(e,t,o){"use strict";o.r(t);var r=o(4),a=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"get-started-with-the-openeo-platform-editor"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-platform-editor"}},[e._v("#")]),e._v(" Get started with the openEO Platform Editor")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("You need to "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("get an openEO Platform account"),t("OutboundLink")],1),e._v(" to access the processing infrastructure.")])]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("openEO Platform Editor")]),e._v(" (also called "),t("em",[e._v("Web Editor")]),e._v(") is a browser-based graphical user interface for openEO Platform. It allows to use the openEO Platform services without any coding experience. You can explore the service offerings such as data collections and processes, but also create and run custom processes on our infrastructure and then visualize the results. Result visualization is still a bit limited, but all other features of the Platform are supported.")]),e._v(" "),t("p",[e._v("The Editor is available at "),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://editor.openeo.cloud"),t("OutboundLink")],1),e._v(' and loads up in "Discovery mode" by default, which means you can explore the service offerings without being logged in. On the left side you can find the service offerings like data collections and processes and on the right side the process editor is shown.')]),e._v(" "),t("p",[e._v('To enable more functionality, e.g. to compute something in a batch job, you have to login. Hover over the button with the text "Guest" in the top right corner and it will show you a "Login" button. Once you clicked on it, the login screen shows up. Here you can simply click the "Log in with EGI Check-in" button and the login procedure will start. See the chapters on the '),t("RouterLink",{attrs:{to:"/join/free_tier.html"}},[e._v("Free Tier")]),e._v(" or the "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available plans"),t("OutboundLink")],1),e._v(" for more details on the procedure to register and log in.")],1),e._v(" "),t("p",[e._v("After you've completed this the login procedure, the Editor shows up again and you'll notice that a new area in the lower middle part of the Editor aprears. This is the user workspace, where you can see all your stored data, e.g. batch jobs or uploaded files.")]),e._v(" "),t("p",[e._v('If you need any more help you can always click the "Help" button in the top right area of the Editor and you\'ll start a guided tour through the Editor. If there are any additional questions, please contact us.')])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{576:function(e,t,o){"use strict";o.r(t);var r=o(4),a=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"get-started-with-the-openeo-platform-editor"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-the-openeo-platform-editor"}},[e._v("#")]),e._v(" Get started with the openEO Platform Editor")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("Note")]),e._v(" "),t("p",[e._v("You need to "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("get an openEO Platform account"),t("OutboundLink")],1),e._v(" to access the processing infrastructure.")])]),e._v(" "),t("p",[e._v("The "),t("em",[e._v("openEO Platform Editor")]),e._v(" (also called "),t("em",[e._v("Web Editor")]),e._v(") is a browser-based graphical user interface for openEO Platform. It allows to use the openEO Platform services without any coding experience. You can explore the service offerings such as data collections and processes, but also create and run custom processes on our infrastructure and then visualize the results. Result visualization is still a bit limited, but all other features of the Platform are supported.")]),e._v(" "),t("p",[e._v("The Editor is available at "),t("a",{attrs:{href:"https://editor.openeo.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://editor.openeo.cloud"),t("OutboundLink")],1),e._v(' and loads up in "Discovery mode" by default, which means you can explore the service offerings without being logged in. On the left side you can find the service offerings like data collections and processes and on the right side the process editor is shown.')]),e._v(" "),t("p",[e._v('To enable more functionality, e.g. to compute something in a batch job, you have to login. Hover over the button with the text "Guest" in the top right corner and it will show you a "Login" button. Once you clicked on it, the login screen shows up. Here you can simply click the "Log in with EGI Check-in" button and the login procedure will start. See the chapters on the '),t("RouterLink",{attrs:{to:"/join/free_tier.html"}},[e._v("Free Tier")]),e._v(" or the "),t("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[e._v("available plans"),t("OutboundLink")],1),e._v(" for more details on the procedure to register and log in.")],1),e._v(" "),t("p",[e._v("After you've completed this the login procedure, the Editor shows up again and you'll notice that a new area in the lower middle part of the Editor aprears. This is the user workspace, where you can see all your stored data, e.g. batch jobs or uploaded files.")]),e._v(" "),t("p",[e._v('If you need any more help you can always click the "Help" button in the top right area of the Editor and you\'ll start a guided tour through the Editor. If there are any additional questions, please contact us.')])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/73.adc7b05b.js b/assets/js/73.40f6fdef.js similarity index 98% rename from assets/js/73.adc7b05b.js rename to assets/js/73.40f6fdef.js index ae8c69062..1a9658d1a 100644 --- a/assets/js/73.adc7b05b.js +++ b/assets/js/73.40f6fdef.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{579:function(t,e,o){"use strict";o.r(e);var n=o(4),a=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-openeo-platform-in-jupyterlab-python"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-openeo-platform-in-jupyterlab-python"}},[t._v("#")]),t._v(" Get started with openEO Platform in JupyterLab (Python)")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("p",[t._v("A hosted JupyterLab environment for openEO Platform is available at "),e("strong",[e("a",{attrs:{href:"https://lab.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[t._v("lab.openeo.cloud"),e("OutboundLink")],1)]),t._v(".")]),t._v(" "),e("p",[t._v("It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.")]),t._v(" "),e("p",[t._v("You need to authenticate before you can use it:")]),t._v(" "),e("ol",[e("li",[t._v('Select from the "Sign in" dropdown menu the "openEO Platform" option')]),t._v(" "),e("li",[t._v("It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" before you proceed.")]),t._v(" "),e("li",[t._v('After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".')]),t._v(" "),e("li",[t._v("You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.")]),t._v(" "),e("li",[t._v("You can now open a new Python 3 Notebook and, for example, start to follow the general "),e("RouterLink",{attrs:{to:"/getting-started/python/"}},[t._v("Python Getting Started Guide")]),t._v("."),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We\'ll try to remove this annoyance in the future.')])])],1)]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda.\n"),e("a",{attrs:{href:"https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Anaconda documentation"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Please also refer to the the official documentation for the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Python Client"),e("OutboundLink")],1),t._v(" and "),e("a",{attrs:{href:"https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("JupyterLab"),e("OutboundLink")],1),t._v(" for more details.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{577:function(t,e,o){"use strict";o.r(e);var n=o(4),a=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"get-started-with-openeo-platform-in-jupyterlab-python"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-started-with-openeo-platform-in-jupyterlab-python"}},[t._v("#")]),t._v(" Get started with openEO Platform in JupyterLab (Python)")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Important")]),t._v(" "),e("p",[t._v("You need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" to access the processing infrastructure.")])]),t._v(" "),e("p",[t._v("A hosted JupyterLab environment for openEO Platform is available at "),e("strong",[e("a",{attrs:{href:"https://lab.openeo.cloud/",target:"_blank",rel:"noopener noreferrer"}},[t._v("lab.openeo.cloud"),e("OutboundLink")],1)]),t._v(".")]),t._v(" "),e("p",[t._v("It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.")]),t._v(" "),e("p",[t._v("You need to authenticate before you can use it:")]),t._v(" "),e("ol",[e("li",[t._v('Select from the "Sign in" dropdown menu the "openEO Platform" option')]),t._v(" "),e("li",[t._v("It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to "),e("a",{attrs:{href:"https://openeo.cloud/#plans",target:"_blank",rel:"noopener noreferrer"}},[t._v("get an openEO Platform account"),e("OutboundLink")],1),t._v(" before you proceed.")]),t._v(" "),e("li",[t._v('After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".')]),t._v(" "),e("li",[t._v("You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.")]),t._v(" "),e("li",[t._v("You can now open a new Python 3 Notebook and, for example, start to follow the general "),e("RouterLink",{attrs:{to:"/getting-started/python/"}},[t._v("Python Getting Started Guide")]),t._v("."),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v('You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We\'ll try to remove this annoyance in the future.')])])],1)]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("Note")]),t._v(" "),e("p",[t._v("You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.")]),t._v(" "),e("p",[t._v("If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda.\n"),e("a",{attrs:{href:"https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Anaconda documentation"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Please also refer to the the official documentation for the "),e("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/",target:"_blank",rel:"noopener noreferrer"}},[t._v("openEO Python Client"),e("OutboundLink")],1),t._v(" and "),e("a",{attrs:{href:"https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("JupyterLab"),e("OutboundLink")],1),t._v(" for more details.")])])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/81.8cb7b02b.js b/assets/js/81.40cacd79.js similarity index 99% rename from assets/js/81.8cb7b02b.js rename to assets/js/81.40cacd79.js index 72a0895ef..ea3c1f85d 100644 --- a/assets/js/81.8cb7b02b.js +++ b/assets/js/81.40cacd79.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{590:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"crop-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#crop-classification"}},[t._v("#")]),t._v(" Crop Classification")]),t._v(" "),a("p",[t._v("The goal of this section is to show how openEO functionality can be integrated into a basic feature engineering pipeline. We will do this using crop classification as an example.")]),t._v(" "),a("p",[t._v("The constantly increasing demand of food has resulted in a highly intensified agricultural production. This intensification on the one hand requires more planning and management, and on the other, threatens ecosystem services that need to be monitored by scientists and decision makers who rely on detailed spatial information of crop cover in agricultural areas.")]),t._v(" "),a("p",[t._v("Crop classification on a large scale is a challenging task, but with the recent advances in satellite sensor technology and the push of a.o. the ESA for higher resolution open satellite data with a frequent revisit time this task has become possible.")]),t._v(" "),a("p",[t._v("There are various approaches to crop classification. One can use basic rule-based classification, or use more sophisticated methods such as one of various machine learning models. In this example, we will show both of these approaches.")]),t._v(" "),a("p",[t._v("Generally, any classification task will contain the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("(1) Preprocessing & feature engineering")]),t._v(" "),a("li",[t._v("(2) Training")]),t._v(" "),a("li",[t._v("(3) Classification & model evaluation")])]),t._v(" "),a("p",[t._v("We will have a more detailed look at all three of these steps, and provide code examples along the way.")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138343588-951f9b24-e039-4598-bd31-2d771ce5a615.png",alt:"cropcover_closeup"}})]),t._v(" "),a("h2",{attrs:{id:"preprocessing-feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing-feature-engineering"}},[t._v("#")]),t._v(" Preprocessing & feature engineering")]),t._v(" "),a("p",[t._v("Feature engineering refers to extracting a number of discriminative features from a single pixel timeseries or even a time series of EO data tiles. These features can in turn be used for any type of classification, ranging from an expert rule-based decision approach to regular machine learning techniques such as random forest or deep learning techniques based on neural networks.")]),t._v(" "),a("p",[t._v("Concrete examples of such features include basic statistics such as the percentiles or standard deviation of a vegetation index or the mean band value for given month, but can also be more complex such as derivatives of phenology or texture.")]),t._v(" "),a("p",[t._v("In general, data scientists like to explore the usefulness of a given feature set for a use case, or may even define new features. In some cases, the openEO processes will allow computing them, and in others, a 'user defined function' may be used to compute features that are not directly supported in openEO.")]),t._v(" "),a("h3",{attrs:{id:"data-preparation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),a("p",[t._v('To correctly compute and use statistics over a timeseries, we need gap-free composites at fixed timesteps. The goal of temporal aggregation is to create these gap-free composites at equidistant temporal intervals. This is especially true in the case of optical data, which is often cloudmasked before this step, introducing a lot of gaps ("no-data" values).')]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Create monthly composite")]),t._v("\ncomposite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_temporal_period"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n period "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fill gaps with linear interpolation")]),t._v("\ninterpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("mean")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" composite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_temporal_period")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill gaps with linear interpolation")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" interpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"computing-temporal-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#computing-temporal-features"}},[t._v("#")]),t._v(" Computing temporal features")]),t._v(" "),a("p",[t._v("For this use case, we will fully reduce the temporal dimension per band by calculating a number of stastics. These stastics are three quantiles, the mean and the standard deviation for each band. After computing the actual features, we have to make sure to rename the bands to reflect what has been calculated.")]),t._v(" "),a("p",[t._v("The effect of setting "),a("code",[t._v("target_dimension")]),t._v(" to "),a("code",[t._v("bands")]),t._v(" is that the 'time' dimension is removed, and replaced by the 'bands' dimension. We will use this same procedure to do band math on temporal features in the chapter "),a("a",{attrs:{href:"#rule-based-classification"}},[t._v('"Rule-based classification"')]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_concat\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("compute_features")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" array_concat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("quantiles"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("probabilities"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("compute_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nnew_band_names "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" new_band_names"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("computeFeatures")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_concat")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("quantiles")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sd")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" features "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" computeFeatures"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" collectionBands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B2'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill this with the bands you've available in the data cube")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" stats "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" newBandNames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" collectionBands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" stats"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rename_labels")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Now, a complete datacube with features is available for further usage.")]),t._v(" "),a("h2",{attrs:{id:"model-training"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model-training"}},[t._v("#")]),t._v(" Model training")]),t._v(" "),a("p",[t._v("Crop classification is generally tackled using a form of supervised learning, which requires a set of features with their respective labels. These labels often come in the form of labeled field polygons, however these polygons do not contain any of the features that your model might require. They need to be extracted from the DataCube that you created in the previous section.")]),t._v(" "),a("p",[t._v("In OpenEO, we can perform feature point/polygon extraction using the parameter "),a("code",[t._v("sample_by_feature=True")]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("barley_points"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n title"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Point feature extraction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n description"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Feature extraction for p10,p50,p90,sd and tsteps"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n sample_by_feature"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n job_options"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("job_options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./data/barley_features"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("This will write the features of DataCube "),a("em",[t._v("features")]),t._v(" of every point in "),a("em",[t._v("barley_points")]),t._v(" to a separate netCDF file. Next we can read in all of these features with their respective label in a pandas dataframe, which can subsequently used for training. Training a model happens outside of openEO and will therefore not be explained in detail here,\nbut you can have a look at the random forest notebook if that is something you need help with.")]),t._v(" "),a("h2",{attrs:{id:"classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#classification"}},[t._v("#")]),t._v(" Classification")]),t._v(" "),a("h3",{attrs:{id:"rule-based-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rule-based-classification"}},[t._v("#")]),t._v(" Rule-based classification")]),t._v(" "),a("p",[t._v("A simple approach is to define rules based on your features to classify crops. For example, when looking at temporal profiles of corn, we can see that the NDVI of may is smaller than the NDVI of june. By creating and iteratively refining rules for each of these crop types, we can get a first classification result.")]),t._v(" "),a("p",[t._v("However, to do this, we need to be able to do band math on the temporal dimension. Remember "),a("code",[t._v('target_dimension="bands"')]),t._v(" that we used before to calculate the statistics over the temporal dimension? We can use this again to stack the temporal dimension onto the band dimension.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("all_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbandnames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jan"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mar"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"apr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sep"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"oct"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dec"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nall_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bandnames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we can do boolean comparison of features and see whether any given pixel matches the rules you determined.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jul "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_aug "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncorn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_jun"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbarley "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_apr "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_may"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" ndvi_jul"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Each of these rules results in a boolean that can be combined using geometric progression, to obtain a final cube containing all crop type predictions.")]),t._v(" "),a("h3",{attrs:{id:"supervised-classification-using-random-forest"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#supervised-classification-using-random-forest"}},[t._v("#")]),t._v(" Supervised classification using Random Forest")]),t._v(" "),a("p",[t._v("A more sophisticated approach is to use a machine learning model such as Random Forest. As mentioned before, training is done after feature extraction outside of openEO, and you can then pickle your model and store it on a repository.\nNext, you define a UDF that unpickles your model, predicts, and returns a new DataCube instance that contains the predicted values instead of the features.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("udf_rf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom openeo_udf.api.datacube import DataCube\nimport pickle\nimport urllib.request\nimport xarray\nfrom openeo.udf.xarraydatacube import XarrayDataCube\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n stacked_array = array.stack(pixel=("x","y"))\n stacked_array = stacked_array.transpose()\n clf = pickle.load(urllib.request.urlopen("https://artifactory.vgt.vito.be:443/auxdata-public/openeo/rf_model.pkl"))\n pred_array = clf.predict(stacked_array)\n return DataCube(xarray.DataArray(pred_array.reshape(1,*array.shape[1:]), dims=["bands","y","x"]))\n"""')]),t._v("\n\nclf_results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("code"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("udf_rf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pixel"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Note that if your labels are strings, you will have to map them to integers.\nYou can then download the classification results and plot it. Congratulations!")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138342824-32d38fbe-7931-497c-8da3-47bbab7a3870.png",alt:"cropcover_5_countries"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{592:function(t,a,s){"use strict";s.r(a);var n=s(4),e=Object(n.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"crop-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#crop-classification"}},[t._v("#")]),t._v(" Crop Classification")]),t._v(" "),a("p",[t._v("The goal of this section is to show how openEO functionality can be integrated into a basic feature engineering pipeline. We will do this using crop classification as an example.")]),t._v(" "),a("p",[t._v("The constantly increasing demand of food has resulted in a highly intensified agricultural production. This intensification on the one hand requires more planning and management, and on the other, threatens ecosystem services that need to be monitored by scientists and decision makers who rely on detailed spatial information of crop cover in agricultural areas.")]),t._v(" "),a("p",[t._v("Crop classification on a large scale is a challenging task, but with the recent advances in satellite sensor technology and the push of a.o. the ESA for higher resolution open satellite data with a frequent revisit time this task has become possible.")]),t._v(" "),a("p",[t._v("There are various approaches to crop classification. One can use basic rule-based classification, or use more sophisticated methods such as one of various machine learning models. In this example, we will show both of these approaches.")]),t._v(" "),a("p",[t._v("Generally, any classification task will contain the following steps:")]),t._v(" "),a("ul",[a("li",[t._v("(1) Preprocessing & feature engineering")]),t._v(" "),a("li",[t._v("(2) Training")]),t._v(" "),a("li",[t._v("(3) Classification & model evaluation")])]),t._v(" "),a("p",[t._v("We will have a more detailed look at all three of these steps, and provide code examples along the way.")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138343588-951f9b24-e039-4598-bd31-2d771ce5a615.png",alt:"cropcover_closeup"}})]),t._v(" "),a("h2",{attrs:{id:"preprocessing-feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing-feature-engineering"}},[t._v("#")]),t._v(" Preprocessing & feature engineering")]),t._v(" "),a("p",[t._v("Feature engineering refers to extracting a number of discriminative features from a single pixel timeseries or even a time series of EO data tiles. These features can in turn be used for any type of classification, ranging from an expert rule-based decision approach to regular machine learning techniques such as random forest or deep learning techniques based on neural networks.")]),t._v(" "),a("p",[t._v("Concrete examples of such features include basic statistics such as the percentiles or standard deviation of a vegetation index or the mean band value for given month, but can also be more complex such as derivatives of phenology or texture.")]),t._v(" "),a("p",[t._v("In general, data scientists like to explore the usefulness of a given feature set for a use case, or may even define new features. In some cases, the openEO processes will allow computing them, and in others, a 'user defined function' may be used to compute features that are not directly supported in openEO.")]),t._v(" "),a("h3",{attrs:{id:"data-preparation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#data-preparation"}},[t._v("#")]),t._v(" Data preparation")]),t._v(" "),a("p",[t._v('To correctly compute and use statistics over a timeseries, we need gap-free composites at fixed timesteps. The goal of temporal aggregation is to create these gap-free composites at equidistant temporal intervals. This is especially true in the case of optical data, which is often cloudmasked before this step, introducing a lot of gaps ("no-data" values).')]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Create monthly composite")]),t._v("\ncomposite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_temporal_period"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n period "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n reducer "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Fill gaps with linear interpolation")]),t._v("\ninterpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("mean")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" composite "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("aggregate_temporal_period")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sentinel2_cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"month"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill gaps with linear interpolation")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" interpolated "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("composite"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"array_interpolate_linear"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"t"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("h3",{attrs:{id:"computing-temporal-features"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#computing-temporal-features"}},[t._v("#")]),t._v(" Computing temporal features")]),t._v(" "),a("p",[t._v("For this use case, we will fully reduce the temporal dimension per band by calculating a number of stastics. These stastics are three quantiles, the mean and the standard deviation for each band. After computing the actual features, we have to make sure to rename the bands to reflect what has been calculated.")]),t._v(" "),a("p",[t._v("The effect of setting "),a("code",[t._v("target_dimension")]),t._v(" to "),a("code",[t._v("bands")]),t._v(" is that the 'time' dimension is removed, and replaced by the 'bands' dimension. We will use this same procedure to do band math on temporal features in the chapter "),a("a",{attrs:{href:"#rule-based-classification"}},[t._v('"Rule-based classification"')]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("processes "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" array_concat\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("def")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("compute_features")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" ProcessBuilder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" array_concat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("quantiles"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("probabilities"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mean"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" input_timeseries"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("sd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("compute_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nnew_band_names "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" new_band_names"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Create monthly composite")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("computeFeatures")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("array_concat")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("quantiles")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("mean")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sd")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" features "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" builder"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("apply_dimension")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("interpolated"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" computeFeatures"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" collectionBands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B1'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'B2'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fill this with the bands you've available in the data cube")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" stats "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p10"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p50"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"p90"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sd"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" newBandNames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" collectionBands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("let")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("of")]),t._v(" stats"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("push")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\nfeatures "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("rename_labels")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" newBandNames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Now, a complete datacube with features is available for further usage.")]),t._v(" "),a("h2",{attrs:{id:"model-training"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model-training"}},[t._v("#")]),t._v(" Model training")]),t._v(" "),a("p",[t._v("Crop classification is generally tackled using a form of supervised learning, which requires a set of features with their respective labels. These labels often come in the form of labeled field polygons, however these polygons do not contain any of the features that your model might require. They need to be extracted from the DataCube that you created in the previous section.")]),t._v(" "),a("p",[t._v("In OpenEO, we can perform feature point/polygon extraction using the parameter "),a("code",[t._v("sample_by_feature=True")]),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("barley_points"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n title"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Point feature extraction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n description"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Feature extraction for p10,p50,p90,sd and tsteps"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n sample_by_feature"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n job_options"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("job_options"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nresults"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"./data/barley_features"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("This will write the features of DataCube "),a("em",[t._v("features")]),t._v(" of every point in "),a("em",[t._v("barley_points")]),t._v(" to a separate netCDF file. Next we can read in all of these features with their respective label in a pandas dataframe, which can subsequently used for training. Training a model happens outside of openEO and will therefore not be explained in detail here,\nbut you can have a look at the random forest notebook if that is something you need help with.")]),t._v(" "),a("h2",{attrs:{id:"classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#classification"}},[t._v("#")]),t._v(" Classification")]),t._v(" "),a("h3",{attrs:{id:"rule-based-classification"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#rule-based-classification"}},[t._v("#")]),t._v(" Rule-based classification")]),t._v(" "),a("p",[t._v("A simple approach is to define rules based on your features to classify crops. For example, when looking at temporal profiles of corn, we can see that the NDVI of may is smaller than the NDVI of june. By creating and iteratively refining rules for each of these crop types, we can get a first classification result.")]),t._v(" "),a("p",[t._v("However, to do this, we need to be able to do band math on the temporal dimension. Remember "),a("code",[t._v('target_dimension="bands"')]),t._v(" that we used before to calculate the statistics over the temporal dimension? We can use this again to stack the temporal dimension onto the band dimension.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("all_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'t'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target_dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" process"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbandnames "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("band "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"_"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" band "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("metadata"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band_names "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" stat "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("in")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jan"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"feb"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mar"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"apr"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"sep"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"oct"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"nov"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"dec"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nall_bands "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'bands'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("bandnames"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" \n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we can do boolean comparison of features and see whether any given pixel matches the rules you determined.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_may"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jun"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_jul "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_jul"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nndvi_aug "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" all_bands"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("band"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"NDVI_aug"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncorn "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_may "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_jun"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nbarley "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_apr "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" ndvi_may"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ndvi_jun "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" ndvi_jul"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("==")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Each of these rules results in a boolean that can be combined using geometric progression, to obtain a final cube containing all crop type predictions.")]),t._v(" "),a("h3",{attrs:{id:"supervised-classification-using-random-forest"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#supervised-classification-using-random-forest"}},[t._v("#")]),t._v(" Supervised classification using Random Forest")]),t._v(" "),a("p",[t._v("A more sophisticated approach is to use a machine learning model such as Random Forest. As mentioned before, training is done after feature extraction outside of openEO, and you can then pickle your model and store it on a repository.\nNext, you define a UDF that unpickles your model, predicts, and returns a new DataCube instance that contains the predicted values instead of the features.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("udf_rf "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token triple-quoted-string string"}},[t._v('"""\nfrom openeo_udf.api.datacube import DataCube\nimport pickle\nimport urllib.request\nimport xarray\nfrom openeo.udf.xarraydatacube import XarrayDataCube\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n stacked_array = array.stack(pixel=("x","y"))\n stacked_array = stacked_array.transpose()\n clf = pickle.load(urllib.request.urlopen("https://artifactory.vgt.vito.be:443/auxdata-public/openeo/rf_model.pkl"))\n pred_array = clf.predict(stacked_array)\n return DataCube(xarray.DataArray(pred_array.reshape(1,*array.shape[1:]), dims=["bands","y","x"]))\n"""')]),t._v("\n\nclf_results "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("apply_dimension"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("code"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("udf_rf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" runtime"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Python"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rename_labels"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pixel"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Note that if your labels are strings, you will have to map them to integers.\nYou can then download the classification results and plot it. Congratulations!")]),t._v(" "),a("p",[t._v("To see a fully working example, you can check out "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20(rule-based).ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on rule-based classification"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC3%20-%20Crop%20type%20feature%20engineering%20using%20random%20forest.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("this Python notebook on classification using Random Forest"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/138342824-32d38fbe-7931-497c-8da3-47bbab7a3870.png",alt:"cropcover_5_countries"}})])],1)}),[],!1,null,null,null);a.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/82.d5071b1f.js b/assets/js/82.570ab4a9.js similarity index 99% rename from assets/js/82.d5071b1f.js rename to assets/js/82.570ab4a9.js index 189ed5940..ffd489a43 100644 --- a/assets/js/82.d5071b1f.js +++ b/assets/js/82.570ab4a9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{593:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"dynamic-land-cover-service"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-land-cover-service"}},[t._v("#")]),t._v(" Dynamic land cover service")]),t._v(" "),a("p",[t._v("In this notebook we will be studying land cover mapping. Land cover mapping has been done since the onset of remote sensing, and LC products have been identified as a fundamental variable needed for studying the functional and morphological changes occurring in the Earth's ecosystems and the environment, and plays therefore an important role in studying climate change and carbon circulation (Congalton et al., 2014; Feddema et al., 2005; Sellers et al., 1997). In addition to that, it provides valuable information for policy development and a wide range of applications within natural sciences and life sciences, making it one of the most widely studied applications within remote sensing (Yu et al., 2014, Tucker et al., 1985; Running, 2008; Yang et al., 2013).")]),t._v(" "),a("p",[t._v("With this variety in application fields comes a variety of user needs. Depending on the use case, there may be large differences in the target labels desired, the target year(s) requested, the output resolution needed, the featureset used, the stratification strategy employed, and more. The goal of this use case is to show that OpenEO as a platform can deal with this variability, and we will do so through creating a userfriendly interface in which the user can set a variety of parameters that will tailor the pipeline from -reference set & L2A+GRD > to model > to inference- to the users needs.")]),t._v(" "),a("p",[t._v("In this notebook, helper functionality from "),a("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[t._v("this repository"),a("OutboundLink")],1),t._v(" is used. It contains amongst others the entire feature building engineering workflow, so if you are interested in knowing how to do that or if you want to make more customizations towards your own use case, have a look at it. Note that the repository is not finalized, as it is a general repository also used for other purposes.")]),t._v(" "),a("p",[t._v("A full notebook for this use case can be found "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/Dynamic%20land%20cover%20mapping.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/162210357-48389c4a-d58c-46da-972d-14f6ade2312e.png",alt:"heelbelgie"}})]),t._v(" "),a("h2",{attrs:{id:"methodology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#methodology"}},[t._v("#")]),t._v(" Methodology")]),t._v(" "),a("h3",{attrs:{id:"reference-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reference-data"}},[t._v("#")]),t._v(" Reference data")]),t._v(" "),a("p",[t._v("The reference dataset used in this section is the Land Use/Cover Area frame Survey (LUCAS) Copernicus dataset of 2018. LUCAS is an evenly spaced in-situ land use and land cover ground survey exercise that extends over the entire of the European Union. The Copernicus module extends up to 51m in four cardinal directions to delineate polygons for each of these points. The final product contains about 60,000 polygons, from which subsequent points can be sampled (d'Andrimont et al., 2021). You as a user can specify how many points to sample from these polygons to train your model. In addition, the user can upload extra target data to improve performance.")]),t._v(" "),a("h3",{attrs:{id:"input-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#input-data"}},[t._v("#")]),t._v(" Input data")]),t._v(" "),a("p",[t._v("The service created runs on features constructed from GRD sigma0 and L2A data. This data will be accessed through OpenEO platform from Terrascope and Sentinel Hub. You, as a user, can determine a time range, though the year should be kept to 2018, as that is the year in which the LUCAS Copernicus dataset was assembled. Data from other years can be extracted for prediction, provided that the user uploads their own reference set.")]),t._v(" "),a("h3",{attrs:{id:"preprocessing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing"}},[t._v("#")]),t._v(" Preprocessing")]),t._v(" "),a("p",[t._v("The L2A data has been masked using the sen2cor sceneclassification, with a buffering approach developed at VITO and made available as a process called mask_scl_dilation. From the Sentinel-1 GRD collection, backscatter is calculated.")]),t._v(" "),a("h3",{attrs:{id:"feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-engineering"}},[t._v("#")]),t._v(" Feature engineering")]),t._v(" "),a("p",[t._v("We select and calculate the following products from our input collections:")]),t._v(" "),a("ul",[a("li",[t._v("7 indices (NDVI, NDMI, NDGI, ANIR, NDRE1, NDRE2, NDRE5) and 2 bands (B06, B12) from the L2A collection")]),t._v(" "),a("li",[t._v("VV, VH and VV/VH (ratio) from the GRD sigma0 collection")])]),t._v(" "),a("p",[t._v("All layers are rescaled to 0 to 30000 for computational efficiency. The indices/bands are then aggregated temporally (for Sentinel-2 data: 10-day window using the median. For Sentinel-1 data: 12 day window using the mean. The median was used for the S2 collection instead of the mean to prevent possible artifacts caused by cloud shadows). The output is then interpolated linearly and the S1 cube is resampled spatially to a 10m resolution. Finally, 10 features are calculated on each of the band dimensions. These 10 features are the standard deviation, 25th, 50th and 75th percentile, and 6 equidistant t-steps. Through this procedure, we end up with a total of 120 features (12 bands x 10 features).")]),t._v(" "),a("h3",{attrs:{id:"model"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model"}},[t._v("#")]),t._v(" Model")]),t._v(" "),a("p",[t._v("Where previously models had to be trained outside of openEO, we can now train Random Forest models in openEO itself. Hyperparameter tuning can be performed using a custom hyperparameter set. After training, the model is validated and used for prediction.")]),t._v(" "),a("h2",{attrs:{id:"implementation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#implementation"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),a("p",[t._v("First, we load in a dataset with target labels. In order for the model to work, the target labels need to be integers. Also, we extract some target points from the target polygons.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" geopandas "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" gpd\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo_classification"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("landuse_classification "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" sklearn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("model_selection "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" train_test_split\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" json\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" pathlib "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" Path\n\nmask "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" box"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.6")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gpd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("read_file"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://artifactory.vgt.vito.be/auxdata-public/openeo/LUCAS_2018_Copernicus.gpkg"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("mask"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("mask"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("apply")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("centroid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LC1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LC1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("apply")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("ord")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("65")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" y_test "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" train_test_split"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" test_size"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" random_state"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("333")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we will create our featureset and use this featureset to train a model. The indices from which you calculate features can be adjusted by a parameter, but if you'd want you could even create the entire feature engineering pipeline yourself. If you are interested in knowing how to do so, you can dive a little bit deeper into the openEO code found "),a("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/features.py",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" feature_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" load_lc_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"terrascope"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"both"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nX "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nml_model "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" X"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fit_class_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" num_trees"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("nrtrees"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nmodel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ml_model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_ml_model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntraining_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntraining_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_and_wait"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Subsequently, we can calculate a number of validation metrics from our test set. To do so, we do inference for the points of our y-test set and write these predictions out to a netCDF. The function "),a("code",[t._v("calculate_validation_metrics")]),t._v(" (not part of openEO itself, but simply a client-side helper function) then loads in the y-test geojson and the netCDF with predicted values, extracts the points and stores the predicted values alongside their actual target labels in a dataframe.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cwd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"results"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"testarea"')]),t._v("\nvalidation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"validation"')]),t._v("\nvalidation_path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mkdir"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("parents"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("exist_ok"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ny_test"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_file"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filename"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'y_test.geojson'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("driver"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeoJSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_test"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\npredicted "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("model"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("training_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("linear_scale_range"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntest_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" predicted"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntest_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" final_res "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" calculate_validation_metrics"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n path_to_test_geojson"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'y_test.geojson'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n path_to_test_raster"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openEO.nc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("After inspecting the metrics and possibly further finetuning the model or dataset, we can do inference on an area of choice and write the result. Happy mapping!")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" feature_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" load_lc_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"terrascope"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"both"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bbox"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.7")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.8")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\npredicted "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n model"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("training_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("linear_scale_range"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ninf_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" predicted"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ninf_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prediction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/162389189-f20d8b4d-6509-4965-bf13-60590438d75c.png",alt:"tile31UFS"}})])],1)}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{594:function(t,a,s){"use strict";s.r(a);var e=s(4),n=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"dynamic-land-cover-service"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-land-cover-service"}},[t._v("#")]),t._v(" Dynamic land cover service")]),t._v(" "),a("p",[t._v("In this notebook we will be studying land cover mapping. Land cover mapping has been done since the onset of remote sensing, and LC products have been identified as a fundamental variable needed for studying the functional and morphological changes occurring in the Earth's ecosystems and the environment, and plays therefore an important role in studying climate change and carbon circulation (Congalton et al., 2014; Feddema et al., 2005; Sellers et al., 1997). In addition to that, it provides valuable information for policy development and a wide range of applications within natural sciences and life sciences, making it one of the most widely studied applications within remote sensing (Yu et al., 2014, Tucker et al., 1985; Running, 2008; Yang et al., 2013).")]),t._v(" "),a("p",[t._v("With this variety in application fields comes a variety of user needs. Depending on the use case, there may be large differences in the target labels desired, the target year(s) requested, the output resolution needed, the featureset used, the stratification strategy employed, and more. The goal of this use case is to show that OpenEO as a platform can deal with this variability, and we will do so through creating a userfriendly interface in which the user can set a variety of parameters that will tailor the pipeline from -reference set & L2A+GRD > to model > to inference- to the users needs.")]),t._v(" "),a("p",[t._v("In this notebook, helper functionality from "),a("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[t._v("this repository"),a("OutboundLink")],1),t._v(" is used. It contains amongst others the entire feature building engineering workflow, so if you are interested in knowing how to do that or if you want to make more customizations towards your own use case, have a look at it. Note that the repository is not finalized, as it is a general repository also used for other purposes.")]),t._v(" "),a("p",[t._v("A full notebook for this use case can be found "),a("a",{attrs:{href:"https://github.com/openEOPlatform/sample-notebooks/blob/main/Dynamic%20land%20cover%20mapping.ipynb",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/162210357-48389c4a-d58c-46da-972d-14f6ade2312e.png",alt:"heelbelgie"}})]),t._v(" "),a("h2",{attrs:{id:"methodology"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#methodology"}},[t._v("#")]),t._v(" Methodology")]),t._v(" "),a("h3",{attrs:{id:"reference-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reference-data"}},[t._v("#")]),t._v(" Reference data")]),t._v(" "),a("p",[t._v("The reference dataset used in this section is the Land Use/Cover Area frame Survey (LUCAS) Copernicus dataset of 2018. LUCAS is an evenly spaced in-situ land use and land cover ground survey exercise that extends over the entire of the European Union. The Copernicus module extends up to 51m in four cardinal directions to delineate polygons for each of these points. The final product contains about 60,000 polygons, from which subsequent points can be sampled (d'Andrimont et al., 2021). You as a user can specify how many points to sample from these polygons to train your model. In addition, the user can upload extra target data to improve performance.")]),t._v(" "),a("h3",{attrs:{id:"input-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#input-data"}},[t._v("#")]),t._v(" Input data")]),t._v(" "),a("p",[t._v("The service created runs on features constructed from GRD sigma0 and L2A data. This data will be accessed through OpenEO platform from Terrascope and Sentinel Hub. You, as a user, can determine a time range, though the year should be kept to 2018, as that is the year in which the LUCAS Copernicus dataset was assembled. Data from other years can be extracted for prediction, provided that the user uploads their own reference set.")]),t._v(" "),a("h3",{attrs:{id:"preprocessing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#preprocessing"}},[t._v("#")]),t._v(" Preprocessing")]),t._v(" "),a("p",[t._v("The L2A data has been masked using the sen2cor sceneclassification, with a buffering approach developed at VITO and made available as a process called mask_scl_dilation. From the Sentinel-1 GRD collection, backscatter is calculated.")]),t._v(" "),a("h3",{attrs:{id:"feature-engineering"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#feature-engineering"}},[t._v("#")]),t._v(" Feature engineering")]),t._v(" "),a("p",[t._v("We select and calculate the following products from our input collections:")]),t._v(" "),a("ul",[a("li",[t._v("7 indices (NDVI, NDMI, NDGI, ANIR, NDRE1, NDRE2, NDRE5) and 2 bands (B06, B12) from the L2A collection")]),t._v(" "),a("li",[t._v("VV, VH and VV/VH (ratio) from the GRD sigma0 collection")])]),t._v(" "),a("p",[t._v("All layers are rescaled to 0 to 30000 for computational efficiency. The indices/bands are then aggregated temporally (for Sentinel-2 data: 10-day window using the median. For Sentinel-1 data: 12 day window using the mean. The median was used for the S2 collection instead of the mean to prevent possible artifacts caused by cloud shadows). The output is then interpolated linearly and the S1 cube is resampled spatially to a 10m resolution. Finally, 10 features are calculated on each of the band dimensions. These 10 features are the standard deviation, 25th, 50th and 75th percentile, and 6 equidistant t-steps. Through this procedure, we end up with a total of 120 features (12 bands x 10 features).")]),t._v(" "),a("h3",{attrs:{id:"model"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#model"}},[t._v("#")]),t._v(" Model")]),t._v(" "),a("p",[t._v("Where previously models had to be trained outside of openEO, we can now train Random Forest models in openEO itself. Hyperparameter tuning can be performed using a custom hyperparameter set. After training, the model is validated and used for prediction.")]),t._v(" "),a("h2",{attrs:{id:"implementation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#implementation"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),a("p",[t._v("First, we load in a dataset with target labels. In order for the model to work, the target labels need to be integers. Also, we extract some target points from the target polygons.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" geopandas "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" gpd\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo_classification"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("landuse_classification "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" sklearn"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("model_selection "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" train_test_split\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" json\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" pathlib "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" Path\n\nmask "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" box"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("4.4")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.6")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("51.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" gpd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("read_file"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://artifactory.vgt.vito.be/auxdata-public/openeo/LUCAS_2018_Copernicus.gpkg"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("mask"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("mask"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("apply")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("centroid"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LC1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LC1"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("apply")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("lambda")]),t._v(" x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("ord")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("-")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("65")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ny_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" y_test "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" train_test_split"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" test_size"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.25")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" random_state"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("333")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Next, we will create our featureset and use this featureset to train a model. The indices from which you calculate features can be adjusted by a parameter, but if you'd want you could even create the entire feature engineering pipeline yourself. If you are interested in knowing how to do so, you can dive a little bit deeper into the openEO code found "),a("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/features.py",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" feature_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" load_lc_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"terrascope"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"both"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nX "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("aggregate_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" reducer"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mean"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nml_model "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" X"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("fit_class_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("target"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_train"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" num_trees"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("nrtrees"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nmodel "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ml_model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_ml_model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntraining_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" model"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("create_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntraining_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("start_and_wait"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("Subsequently, we can calculate a number of validation metrics from our test set. To do so, we do inference for the points of our y-test set and write these predictions out to a netCDF. The function "),a("code",[t._v("calculate_validation_metrics")]),t._v(" (not part of openEO itself, but simply a client-side helper function) then loads in the y-test geojson and the netCDF with predicted values, extracts the points and stores the predicted values alongside their actual target labels in a dataframe.")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("cwd"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"results"')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"testarea"')]),t._v("\nvalidation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"validation"')]),t._v("\nvalidation_path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("mkdir"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("parents"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("exist_ok"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ny_test"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_file"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("filename"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'y_test.geojson'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("driver"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GeoJSON"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ncube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_spatial"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("y_test"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"geometry"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("to_json"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\npredicted "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("model"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("training_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("linear_scale_range"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntest_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" predicted"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ntest_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ngdf"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" final_res "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" calculate_validation_metrics"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n path_to_test_geojson"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'y_test.geojson'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n path_to_test_raster"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("validation_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"openEO.nc"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[t._v("After inspecting the metrics and possibly further finetuning the model or dataset, we can do inference on an area of choice and write the result. Happy mapping!")]),t._v(" "),a("CodeSwitcher",{scopedSlots:t._u([{key:"py",fn:function(){return[a("div",{staticClass:"language-python extra-class"},[a("pre",{pre:!0,attrs:{class:"language-python"}},[a("code",[t._v("features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" feature_list "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" load_lc_features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"terrascope"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"both"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" datetime"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("date"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("2018")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("31")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncube "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" features"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("filter_bbox"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'west'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'east'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5.2")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'south'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.7")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'north'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("50.8")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\npredicted "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" cube"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("predict_random_forest"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n model"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("training_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n dimension"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bands"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("linear_scale_range"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("255")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ninf_job "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" predicted"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("execute_batch"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("out_format"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GTiff"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\ninf_job"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get_results"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("download_files"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("str")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("base_path "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"prediction"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])]},proxy:!0},{key:"js",fn:function(){return[a("p",[a("em",[t._v("No JavaScript code available yet.")])])]},proxy:!0}])}),t._v(" "),a("p",[a("img",{attrs:{src:"https://user-images.githubusercontent.com/10434651/162389189-f20d8b4d-6509-4965-bf13-60590438d75c.png",alt:"tile31UFS"}})])],1)}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/83.dda72317.js b/assets/js/83.0bb934d2.js similarity index 99% rename from assets/js/83.dda72317.js rename to assets/js/83.0bb934d2.js index c21476cae..b9514be66 100644 --- a/assets/js/83.dda72317.js +++ b/assets/js/83.0bb934d2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{594:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"large-scale-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#large-scale-processing"}},[e._v("#")]),e._v(" Large scale processing")]),e._v(" "),t("p",[e._v("Processing of larger areas up to global scale is one of the more challenging tasks in earth observation,\nbut certainly one that this platform wants to address. This page describes some best practices based on the example\nof "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[e._v("processing a croptype map for all 27 countries in the European Union"),t("OutboundLink")],1),e._v(". We do encourage you to get in touch with backend providers about your\nspecific case, as not every workflow is the same, and some advance planning may be needed to ensure that you get sufficient\nprocessing resources.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/openEOPlatform/openeo-classification/60aa7a869f9000b1795afe2c9dde0d7977bcdbc6/docs/full_europe.png",alt:"Crop type map for EU27"}}),e._v(" "),t("figcaption",[e._v("EU27 croptype map, processed on openEO platform")])]),e._v(" "),t("p",[e._v("The approach desribed here is based on local files to track the production. This is a low-cost approach that does not require\nspecial IT knowledge, but comes with some risks such as loosing your local files. A more robust approach for production-grade projects\nwould typically rely on some sort of database or STAC catalog service to monitor processing. Such a setup is however quite similar in many aspects.")]),e._v(" "),t("p",[e._v("The basic strategy for processing large areas is to split it up into smaller areas, usually according to a regular tile grid.\nSplitting reduces the size of the area that needs to be processed by one batch job, and avoids running into all kinds of limitations.\nFor instance, when processing in a specific projection, you anyway have to stay within the bounds of that projection. Also the output\nfile size of a job often becomes impractical when working over huge areas. Or you will hit bottlenecks in the backend implementation that\ndo not occur for normally sized jobs. Also, when a smaller job fails or requires reprocessing, the cost will be smaller.")]),e._v(" "),t("h2",{attrs:{id:"relevant-openeo-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#relevant-openeo-features"}},[e._v("#")]),e._v(" Relevant openEO features")]),e._v(" "),t("p",[e._v("We want to highlight a few key elements that made us choose openEO for large scale processing:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/backends/performance.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Performance & scalability"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("STAC metadata is generated for you, making your output dissemination ready without becoming a metadata expert yourself.")]),e._v(" "),t("li",[e._v("Where relevant FAIR principles are taken into account automatically, such as providing provenance information.")]),e._v(" "),t("li",[e._v("Cloud optimized file formats are generated by default.")]),e._v(" "),t("li",[e._v("Processing can be distributed over multiple backends.")])]),e._v(" "),t("h2",{attrs:{id:"preparation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation"}},[e._v("#")]),e._v(" Preparation")]),e._v(" "),t("p",[e._v("The idea is that we first create and persist the list of tiles to produce, with all attributes required to produce that\nspecific tile. This gives us a very good visual overview of the processing that will be performed.")]),e._v(" "),t("p",[e._v("Having job parameters in a file is also useful for debugging afterwards. Determining parameters at runtime means you don't\nhave absolute certainty over the value of a specific argument, as there may be bugs in your code.")]),e._v(" "),t("h2",{attrs:{id:"prepare-tiling-grid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-tiling-grid"}},[e._v("#")]),e._v(" Prepare tiling grid")]),e._v(" "),t("p",[e._v("The choice of tiling grid depends on your preferred projection system, which depends on your area of interest.\nFor Europe, the EPSG:3035 projection can be used, while for global processing you may want to work with different projections according\nto UTM zones.")]),e._v(" "),t("p",[e._v("The size of tiles in your grid is also important, and often ranges from 20km to 100km. For relatively light workflows, a 100km grid can work well,\nwhile for more demanding cases, a 20km grid is better. In our example, we choose to work with 20km tiles because the workflow was quite demanding. A smaller\ntile size can also result in less unneeded processing when your target area has an irregular shape, like most countries and continents.")]),e._v(" "),t("p",[e._v("A couple of basic grids can be found here:\n"),t("a",{attrs:{href:"https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The images below illustrate the overlap in the UTM grids versus a regular LAEA grid.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",{staticStyle:{"text-align":"center"}},[e._v("UTM 100km")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("LAEA 100km")])])]),e._v(" "),t("tbody",[t("tr",[t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963581-1c51a512-c240-4d23-b557-30a3577c9027.png",width:"400",height:"300"}})]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963750-562b921c-7b5b-4ec1-86ca-cf1fd75e625d.png",width:"400",height:"300"}})])])])]),e._v(" "),t("p",[e._v("A grid can be masked based on the countries we want to load, the following script shows an example:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("import")]),e._v(" geopandas "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("as")]),e._v(" gpd\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("datasets"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("get_path"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"naturalearth_lowres"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("continent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Europe"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ncountries "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("name"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("isin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("EU27"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ndf "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://artifactory.vgt.vito.be/auxdata-public/grids/LAEA-20km.gpkg"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("mask"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("countries"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("h2",{attrs:{id:"prepare-job-attributes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-job-attributes"}},[e._v("#")]),e._v(" Prepare job attributes")]),e._v(" "),t("p",[e._v("Next to the tiling grid, we recommend to also determine other properties required by your processing jobs up front. This allows you to properly\nreview those properties before starting to process. Examples include simple things like a job title or tile specific processing parameters, but also an\nattribute to determine processing order.")]),e._v(" "),t("p",[e._v("In this step, you may also want to make sure to already determine the correct tile extent in the coordinate system of your tile grid.\nProviding exact coordinates in the right projection is necessary to ensure pixel-perfect alignment of your tiles.")]),e._v(" "),t("h2",{attrs:{id:"tuning-your-processing-job"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tuning-your-processing-job"}},[e._v("#")]),e._v(" Tuning your processing job")]),e._v(" "),t("p",[e._v("Before kicking off large processing, you want to be very sure that the correct output is generated, and that you have sufficient credits and resources\navailable to finish your job in time. This can be done by simply running various jobs, and using the statistics reported in the metadata to determine average parameters. (The map production section below shows a way to collect these parameters in a CSV.)")]),e._v(" "),t("p",[e._v("For instance, for the case of processing the EU27 croptype map, consisting of ~11000 20km tiles, we made the following calculations op front:")]),e._v(" "),t("ul",[t("li",[e._v("Average runtime was 30 minutes, which means that it would take ~15 days of continous processing with 15 parallel jobs.")]),e._v(" "),t("li",[e._v("Average cost was below 100 credits, so we would be able to process with a budget of 1100000 credits.")])]),e._v(" "),t("p",[e._v("To achieve these numbers, we did have to optimize batch job settings and also the overall workflow to reduce resource usage!")]),e._v(" "),t("p",[e._v("A common bottleneck to parallellization is the memory consumption, and it can be useful to know the maximum memory allocation on a single machine in\nyour backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.")]),e._v(" "),t("p",[e._v("In our example, we used the Geotrellis backends, which has "),t("RouterLink",{attrs:{to:"/federation/#customizing-batch-job-resources-on-terrascope"}},[e._v("these execution options")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"starting-map-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#starting-map-production"}},[e._v("#")]),e._v(" Starting map production")]),e._v(" "),t("p",[e._v("The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new\njob needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.")]),e._v(" "),t("p",[e._v("This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.")]),e._v(" "),t("p",[e._v("A full example of how we use this can be found "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/scripts/cropmap_eu27.py",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231968590-f0f0b415-453c-4ab7-9502-82eab795a84e.png",alt:"Tracking jobs by CSV"}})]),e._v(" "),t("h2",{attrs:{id:"errors-during-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#errors-during-production"}},[e._v("#")]),e._v(" Errors during production")]),e._v(" "),t("p",[e._v("It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory.\nWe also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{595:function(e,t,a){"use strict";a.r(t);var r=a(4),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"large-scale-processing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#large-scale-processing"}},[e._v("#")]),e._v(" Large scale processing")]),e._v(" "),t("p",[e._v("Processing of larger areas up to global scale is one of the more challenging tasks in earth observation,\nbut certainly one that this platform wants to address. This page describes some best practices based on the example\nof "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification",target:"_blank",rel:"noopener noreferrer"}},[e._v("processing a croptype map for all 27 countries in the European Union"),t("OutboundLink")],1),e._v(". We do encourage you to get in touch with backend providers about your\nspecific case, as not every workflow is the same, and some advance planning may be needed to ensure that you get sufficient\nprocessing resources.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/openEOPlatform/openeo-classification/60aa7a869f9000b1795afe2c9dde0d7977bcdbc6/docs/full_europe.png",alt:"Crop type map for EU27"}}),e._v(" "),t("figcaption",[e._v("EU27 croptype map, processed on openEO platform")])]),e._v(" "),t("p",[e._v("The approach desribed here is based on local files to track the production. This is a low-cost approach that does not require\nspecial IT knowledge, but comes with some risks such as loosing your local files. A more robust approach for production-grade projects\nwould typically rely on some sort of database or STAC catalog service to monitor processing. Such a setup is however quite similar in many aspects.")]),e._v(" "),t("p",[e._v("The basic strategy for processing large areas is to split it up into smaller areas, usually according to a regular tile grid.\nSplitting reduces the size of the area that needs to be processed by one batch job, and avoids running into all kinds of limitations.\nFor instance, when processing in a specific projection, you anyway have to stay within the bounds of that projection. Also the output\nfile size of a job often becomes impractical when working over huge areas. Or you will hit bottlenecks in the backend implementation that\ndo not occur for normally sized jobs. Also, when a smaller job fails or requires reprocessing, the cost will be smaller.")]),e._v(" "),t("h2",{attrs:{id:"relevant-openeo-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#relevant-openeo-features"}},[e._v("#")]),e._v(" Relevant openEO features")]),e._v(" "),t("p",[e._v("We want to highlight a few key elements that made us choose openEO for large scale processing:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://openeo.org/documentation/1.0/developers/backends/performance.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Performance & scalability"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("STAC metadata is generated for you, making your output dissemination ready without becoming a metadata expert yourself.")]),e._v(" "),t("li",[e._v("Where relevant FAIR principles are taken into account automatically, such as providing provenance information.")]),e._v(" "),t("li",[e._v("Cloud optimized file formats are generated by default.")]),e._v(" "),t("li",[e._v("Processing can be distributed over multiple backends.")])]),e._v(" "),t("h2",{attrs:{id:"preparation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation"}},[e._v("#")]),e._v(" Preparation")]),e._v(" "),t("p",[e._v("The idea is that we first create and persist the list of tiles to produce, with all attributes required to produce that\nspecific tile. This gives us a very good visual overview of the processing that will be performed.")]),e._v(" "),t("p",[e._v("Having job parameters in a file is also useful for debugging afterwards. Determining parameters at runtime means you don't\nhave absolute certainty over the value of a specific argument, as there may be bugs in your code.")]),e._v(" "),t("h2",{attrs:{id:"prepare-tiling-grid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-tiling-grid"}},[e._v("#")]),e._v(" Prepare tiling grid")]),e._v(" "),t("p",[e._v("The choice of tiling grid depends on your preferred projection system, which depends on your area of interest.\nFor Europe, the EPSG:3035 projection can be used, while for global processing you may want to work with different projections according\nto UTM zones.")]),e._v(" "),t("p",[e._v("The size of tiles in your grid is also important, and often ranges from 20km to 100km. For relatively light workflows, a 100km grid can work well,\nwhile for more demanding cases, a 20km grid is better. In our example, we choose to work with 20km tiles because the workflow was quite demanding. A smaller\ntile size can also result in less unneeded processing when your target area has an irregular shape, like most countries and continents.")]),e._v(" "),t("p",[e._v("A couple of basic grids can be found here:\n"),t("a",{attrs:{href:"https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://artifactory.vgt.vito.be/webapp/#/artifacts/browse/tree/General/auxdata-public/grids"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The images below illustrate the overlap in the UTM grids versus a regular LAEA grid.")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",{staticStyle:{"text-align":"center"}},[e._v("UTM 100km")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("LAEA 100km")])])]),e._v(" "),t("tbody",[t("tr",[t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963581-1c51a512-c240-4d23-b557-30a3577c9027.png",width:"400",height:"300"}})]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231963750-562b921c-7b5b-4ec1-86ca-cf1fd75e625d.png",width:"400",height:"300"}})])])])]),e._v(" "),t("p",[e._v("A grid can be masked based on the countries we want to load, the following script shows an example:")]),e._v(" "),t("div",{staticClass:"language-python extra-class"},[t("pre",{pre:!0,attrs:{class:"language-python"}},[t("code",[t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("import")]),e._v(" geopandas "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("as")]),e._v(" gpd\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("datasets"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("get_path"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"naturalearth_lowres"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\neurope "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("continent"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("==")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Europe"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ncountries "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("europe"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("name"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("isin"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("EU27"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\ndf "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v(" gpd"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("read_file"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"https://artifactory.vgt.vito.be/auxdata-public/grids/LAEA-20km.gpkg"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v("mask"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("countries"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),t("h2",{attrs:{id:"prepare-job-attributes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prepare-job-attributes"}},[e._v("#")]),e._v(" Prepare job attributes")]),e._v(" "),t("p",[e._v("Next to the tiling grid, we recommend to also determine other properties required by your processing jobs up front. This allows you to properly\nreview those properties before starting to process. Examples include simple things like a job title or tile specific processing parameters, but also an\nattribute to determine processing order.")]),e._v(" "),t("p",[e._v("In this step, you may also want to make sure to already determine the correct tile extent in the coordinate system of your tile grid.\nProviding exact coordinates in the right projection is necessary to ensure pixel-perfect alignment of your tiles.")]),e._v(" "),t("h2",{attrs:{id:"tuning-your-processing-job"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tuning-your-processing-job"}},[e._v("#")]),e._v(" Tuning your processing job")]),e._v(" "),t("p",[e._v("Before kicking off large processing, you want to be very sure that the correct output is generated, and that you have sufficient credits and resources\navailable to finish your job in time. This can be done by simply running various jobs, and using the statistics reported in the metadata to determine average parameters. (The map production section below shows a way to collect these parameters in a CSV.)")]),e._v(" "),t("p",[e._v("For instance, for the case of processing the EU27 croptype map, consisting of ~11000 20km tiles, we made the following calculations op front:")]),e._v(" "),t("ul",[t("li",[e._v("Average runtime was 30 minutes, which means that it would take ~15 days of continous processing with 15 parallel jobs.")]),e._v(" "),t("li",[e._v("Average cost was below 100 credits, so we would be able to process with a budget of 1100000 credits.")])]),e._v(" "),t("p",[e._v("To achieve these numbers, we did have to optimize batch job settings and also the overall workflow to reduce resource usage!")]),e._v(" "),t("p",[e._v("A common bottleneck to parallellization is the memory consumption, and it can be useful to know the maximum memory allocation on a single machine in\nyour backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.")]),e._v(" "),t("p",[e._v("In our example, we used the Geotrellis backends, which has "),t("RouterLink",{attrs:{to:"/federation/#customizing-batch-job-resources-on-terrascope"}},[e._v("these execution options")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"starting-map-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#starting-map-production"}},[e._v("#")]),e._v(" Starting map production")]),e._v(" "),t("p",[e._v("The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new\njob needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.")]),e._v(" "),t("p",[e._v("This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.")]),e._v(" "),t("p",[e._v("A full example of how we use this can be found "),t("a",{attrs:{href:"https://github.com/openEOPlatform/openeo-classification/blob/main/src/openeo_classification/scripts/cropmap_eu27.py",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/5937096/231968590-f0f0b415-453c-4ab7-9502-82eab795a84e.png",alt:"Tracking jobs by CSV"}})]),e._v(" "),t("h2",{attrs:{id:"errors-during-production"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#errors-during-production"}},[e._v("#")]),e._v(" Errors during production")]),e._v(" "),t("p",[e._v("It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory.\nWe also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/84.7a52cce4.js b/assets/js/84.a9c8aca6.js similarity index 99% rename from assets/js/84.7a52cce4.js rename to assets/js/84.a9c8aca6.js index 8bc57a721..d614c7cfe 100644 --- a/assets/js/84.7a52cce4.js +++ b/assets/js/84.a9c8aca6.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{598:function(t,s,a){"use strict";a.r(s);var e=a(4),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"workspaces"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspaces"}},[t._v("#")]),t._v(" Workspaces")]),t._v(" "),s("h2",{attrs:{id:"workspaces-overview"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspaces-overview"}},[t._v("#")]),t._v(" Workspaces Overview")]),t._v(" "),s("p",[t._v("Workspaces are an abstraction of object-storage for the openEO Platform. They allow you to have more control over your data, from where it is saved, to where it is loaded from.")]),t._v(" "),s("p",[t._v("There are multiple options available for the creation of a workspace, you can either provision one at a given backend, or register your own, so you can, for instance,\nsave openEO results directly to a s3 bucket of your own choosing.")]),t._v(" "),s("p",[t._v("All the code-snippets found below (and some additional ones) can be found on "),s("a",{attrs:{href:"https://github.com/eodcgmbh/eodc-examples/blob/main/demos/workspaces/",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub"),s("OutboundLink")],1),t._v(" and a "),s("a",{attrs:{href:"https://youtu.be/Jj-2i3n0Eng",target:"_blank",rel:"noopener noreferrer"}},[t._v("Video Tutorial"),s("OutboundLink")],1),t._v(" is also available.")]),t._v(" "),s("h2",{attrs:{id:"workspace-providers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspace-providers"}},[t._v("#")]),t._v(" Workspace Providers")]),t._v(" "),s("p",[t._v("Workspace Providers are the name of the different underlying object-storage types that are supported by any given backend.")]),t._v(" "),s("p",[t._v("To access a list of supported workspace providers, just call the /workspace_providers endpoint. The information in this\nlist also contains the formatting of parameters used when registering a workspace of the given type.")]),t._v(" "),s("p",[t._v("You can use the following code-snippet to get a formatted output of available providers.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" json\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.example.eu/openeo/1.2.0/workspace_providers"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dumps"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("decode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" indent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sort_keys"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"provisioning-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#provisioning-a-workspace"}},[t._v("#")]),t._v(" Provisioning a Workspace")]),t._v(" "),s("p",[t._v("It's a very simple task to provision a workspace, provided that you are already an openEO user.")]),t._v(" "),s("p",[t._v("All you need to do in order to create a workspace from scratch is post to the /workspaces endpoint\nin the openEO API with a body consisting of a create intent and the preferred title of your workspace.")]),t._v(" "),s("p",[t._v("like so:")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'intent'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'create'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'title'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXAMPLE_WORKSPACE_NAME'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Your code should then look like this, with the relevant values replaced.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nrequest_body "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'intent'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'create'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'title'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXAMPLE_WORKSPACE_NAME'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("post"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.openeo.eu/openeo/1.2.0/workspaces'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'authorization'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Bearer EXAMPLE_BEARER_TOKEN'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n json"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("request_body\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("The responses content will contain your s3 credentials which you can then use to interact with your newly created workspace.")]),t._v(" "),s("p",[t._v("Depending on the workspace provider your backend offers the credentials will be differently formatted.\nCheck the workspace providers endpoint for more information.")]),t._v(" "),s("h2",{attrs:{id:"registering-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#registering-a-workspace"}},[t._v("#")]),t._v(" Registering a Workspace")]),t._v(" "),s("p",[t._v("Instead of creating an internal workspace, you can register your own workspace and use it in much the same way.")]),t._v(" "),s("p",[t._v('All you need to do is post to the "/workspaces" endpoint with a registering intent and submit your credentials.')]),t._v(" "),s("p",[t._v("You can find the correct formatting for the request body by consulting the workspace providers endpoint.")]),t._v(" "),s("p",[t._v("After filling out these request bodies, you can send a request to the given endpoint and your workspace will be registered in the backend.")]),t._v(" "),s("p",[t._v("See the code-snipped below for how this might look.")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("Note:")]),t._v(" "),s("p",[t._v("Make sure your title matches the name of your underlying object-storage container (e.g: bucket name, blob container name, etc.)")])]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nrequest_body "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"intent"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"register"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"WORKSPACE_NAME"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"storage_type"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"credentials"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"url"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_ENDPOINT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_key"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_ACCESS_KEY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"secret_key"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_SECRET_KEY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("post"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.example.eu/openeo/1.2.0/workspaces"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n json"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("request_body"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"authorization"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bearer BEARER_TOKEN"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresponse"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content\n")])])]),s("p",[t._v("If the response is positive, we have successfully registered our workspace under our user and can now use it as we would any other workspace, by passing the workspace name in our process graphs.")]),t._v(" "),s("h2",{attrs:{id:"export-openeo-result-to-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#export-openeo-result-to-workspace"}},[t._v("#")]),t._v(" Export openEO result to Workspace")]),t._v(" "),s("p",[t._v("In order to save results from openEO jobs to workspaces, make sure that either your external workspace is registered with the openEO backend or you have provisioned a local workspace.")]),t._v(" "),s("p",[t._v("To then export your data, add the export_workspace process after your save_result process in the process graph.")]),t._v(" "),s("p",[t._v("Make sure to pass your workspaces name as a workspace argument")]),t._v(" "),s("h4",{attrs:{id:"using-the-openeo-python-library"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-the-openeo-python-library"}},[t._v("#")]),t._v(" Using the openeo python library")]),t._v(" "),s("p",[t._v("To export data to a workspace using the openeo library, you can simply use the following code-snippets.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://example.openeo.eu/openeo/1.2.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("provider_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"egi"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("datacube "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" THIS\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"boa_sentinel_2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.156771491786476")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.59018048465475")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.08419286799747")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.34670064966687")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-31T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export_workspace"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arguments"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workspace"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" WORKSPACE_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"merge"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("None")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("THIS\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"listing-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#listing-files"}},[t._v("#")]),t._v(" Listing Files")]),t._v(" "),s("p",[t._v("There is a variety of ways to list your workspace files.")]),t._v(" "),s("ul",[s("li",[t._v("Through the openEO API")]),t._v(" "),s("li",[t._v("Using the WorkspaceAdapter")]),t._v(" "),s("li",[t._v("With a 3rd-Party object-storage file explorer")])]),t._v(" "),s("h3",{attrs:{id:"_1-openeo-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-openeo-api"}},[t._v("#")]),t._v(" 1) openEO API")]),t._v(" "),s("p",[t._v("There is only a single step involved, assuming you already have a workspace with some data in it, you can simply make a request to the /workspaces/{WORKSPACE_NAME}/files endpoint and get a list of files returned.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"https://openeo.example.eu/openeo/1.2.0/workspaces/WORKSPACE_NAME/files"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"authorization"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"Bearer BEARER_TOKEN"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("decode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_2-third-party-applications"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-third-party-applications"}},[t._v("#")]),t._v(" 2) Third Party Applications")]),t._v(" "),s("p",[t._v("This method is less relevant to this tutorial, but you can always use a third-party object-storage browser to view your files or interact with your workspace in general.")]),t._v(" "),s("p",[t._v("Some tools:")]),t._v(" "),s("ul",[s("li",[t._v("S3 Browser (for S3 systems like Ceph)")]),t._v(" "),s("li",[t._v("Microsoft Azure Storage Explorer (for Azure Blob Storage)")]),t._v(" "),s("li",[t._v("...")])]),t._v(" "),s("h2",{attrs:{id:"loading-data-from-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#loading-data-from-a-workspace"}},[t._v("#")]),t._v(" Loading data from a workspace")]),t._v(" "),s("p",[t._v("Loading data from a workspace is done through the load_stac process.")]),t._v(" "),s("p",[t._v("The stac hrefs need to include some reference to the workspace they are located in, for instance:")]),t._v(" "),s("p",[t._v('"s3://BUCKET_NAME/path/to/resource"')]),t._v(" "),s("p",[t._v("or")]),t._v(" "),s("p",[t._v('"/vsis3/BUCKET_NAME/path/to/resource"')]),t._v(" "),s("p",[t._v("You can export some data to your workspace and check the provided STAC items hrefs to make sure your hrefs are correct.")]),t._v(" "),s("p",[t._v("Using the load_stac process with the correct href will then load the given item/collection and filter using the given parameters like bands, temporal_extent or spatial_extent.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("connection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://example.openeo.eu/openeo/1.2.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("provider_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"egi"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/vsis3/BUCKET_NAME/path/to/resource"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.156771491786476")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.59018048465475")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.08419286799747")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.34670064966687")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-31T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"user-collections"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#user-collections"}},[t._v("#")]),t._v(" User Collections")]),t._v(" "),s("p",[t._v("User collections can be created by using the export_collection process after the save_result process, they will then be available to load by using the load_collection process.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{597:function(t,s,a){"use strict";a.r(s);var e=a(4),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"workspaces"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspaces"}},[t._v("#")]),t._v(" Workspaces")]),t._v(" "),s("h2",{attrs:{id:"workspaces-overview"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspaces-overview"}},[t._v("#")]),t._v(" Workspaces Overview")]),t._v(" "),s("p",[t._v("Workspaces are an abstraction of object-storage for the openEO Platform. They allow you to have more control over your data, from where it is saved, to where it is loaded from.")]),t._v(" "),s("p",[t._v("There are multiple options available for the creation of a workspace, you can either provision one at a given backend, or register your own, so you can, for instance,\nsave openEO results directly to a s3 bucket of your own choosing.")]),t._v(" "),s("p",[t._v("All the code-snippets found below (and some additional ones) can be found on "),s("a",{attrs:{href:"https://github.com/eodcgmbh/eodc-examples/blob/main/demos/workspaces/",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub"),s("OutboundLink")],1),t._v(" and a "),s("a",{attrs:{href:"https://youtu.be/Jj-2i3n0Eng",target:"_blank",rel:"noopener noreferrer"}},[t._v("Video Tutorial"),s("OutboundLink")],1),t._v(" is also available.")]),t._v(" "),s("h2",{attrs:{id:"workspace-providers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#workspace-providers"}},[t._v("#")]),t._v(" Workspace Providers")]),t._v(" "),s("p",[t._v("Workspace Providers are the name of the different underlying object-storage types that are supported by any given backend.")]),t._v(" "),s("p",[t._v("To access a list of supported workspace providers, just call the /workspace_providers endpoint. The information in this\nlist also contains the formatting of parameters used when registering a workspace of the given type.")]),t._v(" "),s("p",[t._v("You can use the following code-snippet to get a formatted output of available providers.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" json\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.example.eu/openeo/1.2.0/workspace_providers"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("dumps"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("json"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("loads"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("decode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" indent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" sort_keys"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("True")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"provisioning-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#provisioning-a-workspace"}},[t._v("#")]),t._v(" Provisioning a Workspace")]),t._v(" "),s("p",[t._v("It's a very simple task to provision a workspace, provided that you are already an openEO user.")]),t._v(" "),s("p",[t._v("All you need to do in order to create a workspace from scratch is post to the /workspaces endpoint\nin the openEO API with a body consisting of a create intent and the preferred title of your workspace.")]),t._v(" "),s("p",[t._v("like so:")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'intent'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'create'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'title'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXAMPLE_WORKSPACE_NAME'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Your code should then look like this, with the relevant values replaced.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nrequest_body "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'intent'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'create'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'title'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXAMPLE_WORKSPACE_NAME'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("post"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.openeo.eu/openeo/1.2.0/workspaces'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'authorization'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Bearer EXAMPLE_BEARER_TOKEN'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n json"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("request_body\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("The responses content will contain your s3 credentials which you can then use to interact with your newly created workspace.")]),t._v(" "),s("p",[t._v("Depending on the workspace provider your backend offers the credentials will be differently formatted.\nCheck the workspace providers endpoint for more information.")]),t._v(" "),s("h2",{attrs:{id:"registering-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#registering-a-workspace"}},[t._v("#")]),t._v(" Registering a Workspace")]),t._v(" "),s("p",[t._v("Instead of creating an internal workspace, you can register your own workspace and use it in much the same way.")]),t._v(" "),s("p",[t._v('All you need to do is post to the "/workspaces" endpoint with a registering intent and submit your credentials.')]),t._v(" "),s("p",[t._v("You can find the correct formatting for the request body by consulting the workspace providers endpoint.")]),t._v(" "),s("p",[t._v("After filling out these request bodies, you can send a request to the given endpoint and your workspace will be registered in the backend.")]),t._v(" "),s("p",[t._v("See the code-snipped below for how this might look.")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("Note:")]),t._v(" "),s("p",[t._v("Make sure your title matches the name of your underlying object-storage container (e.g: bucket name, blob container name, etc.)")])]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nrequest_body "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"intent"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"register"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"WORKSPACE_NAME"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"storage_type"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"s3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"credentials"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"url"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_ENDPOINT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"access_key"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_ACCESS_KEY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"secret_key"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"S3_SECRET_KEY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("post"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://openeo.example.eu/openeo/1.2.0/workspaces"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n json"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("request_body"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"authorization"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Bearer BEARER_TOKEN"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresponse"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content\n")])])]),s("p",[t._v("If the response is positive, we have successfully registered our workspace under our user and can now use it as we would any other workspace, by passing the workspace name in our process graphs.")]),t._v(" "),s("h2",{attrs:{id:"export-openeo-result-to-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#export-openeo-result-to-workspace"}},[t._v("#")]),t._v(" Export openEO result to Workspace")]),t._v(" "),s("p",[t._v("In order to save results from openEO jobs to workspaces, make sure that either your external workspace is registered with the openEO backend or you have provisioned a local workspace.")]),t._v(" "),s("p",[t._v("To then export your data, add the export_workspace process after your save_result process in the process graph.")]),t._v(" "),s("p",[t._v("Make sure to pass your workspaces name as a workspace argument")]),t._v(" "),s("h4",{attrs:{id:"using-the-openeo-python-library"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#using-the-openeo-python-library"}},[t._v("#")]),t._v(" Using the openeo python library")]),t._v(" "),s("p",[t._v("To export data to a workspace using the openeo library, you can simply use the following code-snippets.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" openeo\n\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://example.openeo.eu/openeo/1.2.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("provider_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"egi"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("datacube "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" THIS\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n collection_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"boa_sentinel_2"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.156771491786476")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.59018048465475")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.08419286799747")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.34670064966687")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-31T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n bands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"B02"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("process"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export_workspace"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" arguments"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"workspace"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" WORKSPACE_NAME"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"merge"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("None")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" data"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("THIS\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"listing-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#listing-files"}},[t._v("#")]),t._v(" Listing Files")]),t._v(" "),s("p",[t._v("There is a variety of ways to list your workspace files.")]),t._v(" "),s("ul",[s("li",[t._v("Through the openEO API")]),t._v(" "),s("li",[t._v("Using the WorkspaceAdapter")]),t._v(" "),s("li",[t._v("With a 3rd-Party object-storage file explorer")])]),t._v(" "),s("h3",{attrs:{id:"_1-openeo-api"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-openeo-api"}},[t._v("#")]),t._v(" 1) openEO API")]),t._v(" "),s("p",[t._v("There is only a single step involved, assuming you already have a workspace with some data in it, you can simply make a request to the /workspaces/{WORKSPACE_NAME}/files endpoint and get a list of files returned.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" requests\n\nresponse "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" requests"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("get"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"https://openeo.example.eu/openeo/1.2.0/workspaces/WORKSPACE_NAME/files"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headers"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"authorization"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string-interpolation"}},[s("span",{pre:!0,attrs:{class:"token string"}},[t._v('f"Bearer BEARER_TOKEN"')])]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("print")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("content"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("decode"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"_2-third-party-applications"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2-third-party-applications"}},[t._v("#")]),t._v(" 2) Third Party Applications")]),t._v(" "),s("p",[t._v("This method is less relevant to this tutorial, but you can always use a third-party object-storage browser to view your files or interact with your workspace in general.")]),t._v(" "),s("p",[t._v("Some tools:")]),t._v(" "),s("ul",[s("li",[t._v("S3 Browser (for S3 systems like Ceph)")]),t._v(" "),s("li",[t._v("Microsoft Azure Storage Explorer (for Azure Blob Storage)")]),t._v(" "),s("li",[t._v("...")])]),t._v(" "),s("h2",{attrs:{id:"loading-data-from-a-workspace"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#loading-data-from-a-workspace"}},[t._v("#")]),t._v(" Loading data from a workspace")]),t._v(" "),s("p",[t._v("Loading data from a workspace is done through the load_stac process.")]),t._v(" "),s("p",[t._v("The stac hrefs need to include some reference to the workspace they are located in, for instance:")]),t._v(" "),s("p",[t._v('"s3://BUCKET_NAME/path/to/resource"')]),t._v(" "),s("p",[t._v("or")]),t._v(" "),s("p",[t._v('"/vsis3/BUCKET_NAME/path/to/resource"')]),t._v(" "),s("p",[t._v("You can export some data to your workspace and check the provided STAC items hrefs to make sure your hrefs are correct.")]),t._v(" "),s("p",[t._v("Using the load_stac process with the correct href will then load the given item/collection and filter using the given parameters like bands, temporal_extent or spatial_extent.")]),t._v(" "),s("div",{staticClass:"language-python extra-class"},[s("pre",{pre:!0,attrs:{class:"language-python"}},[s("code",[t._v("connection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" openeo"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("connect"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://example.openeo.eu/openeo/1.2.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nconnection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("authenticate_oidc"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("provider_id"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"egi"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\ncollection "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" connection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("load_stac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n url"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/vsis3/BUCKET_NAME/path/to/resource"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n spatial_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"west"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.156771491786476")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"east"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16.59018048465475")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"south"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.08419286799747")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"north"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("48.34670064966687")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n temporal_extent"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-01T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-01-31T00:00:00Z"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nresult "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" collection"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("save_result"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token builtin"}},[t._v("format")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"netCDF"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n")])])]),s("h2",{attrs:{id:"user-collections"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#user-collections"}},[t._v("#")]),t._v(" User Collections")]),t._v(" "),s("p",[t._v("User collections can be created by using the export_collection process after the save_result process, they will then be available to load by using the load_collection process.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/app.9ec31bb9.js b/assets/js/app.612d119a.js similarity index 90% rename from assets/js/app.9ec31bb9.js rename to assets/js/app.612d119a.js index 54c528ca7..f6e643fc0 100644 --- a/assets/js/app.9ec31bb9.js +++ b/assets/js/app.612d119a.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(e){function t(t){for(var r,a,s=t[0],c=t[1],l=t[2],f=0,p=[];f=0&&(t=e.slice(r),e=e.slice(0,r));var o=e.indexOf("?");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{path:e,query:n,hash:t}}(i.path||""),p=t&&t.path||"/",d=l.path?C(l.path,p,n||i.append):p,h=function(e,t,n){void 0===t&&(t={});var r,o=n||f;try{r=o(e||"")}catch(e){r={}}for(var i in t){var a=t[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(l.query,i.query,r&&r.options.parseQuery),v=i.hash||l.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var H,W=function(){},G={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,c=i.href,l={},u=n.options.linkActiveClass,f=n.options.linkExactActiveClass,p=null==u?"router-link-active":u,v=null==f?"router-link-exact-active":f,m=null==this.activeClass?p:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,q(s.redirectedFrom),null,n):s;l[g]=b(r,y,this.exactPath),l[m]=this.exact||this.exactPath?l[g]:function(e,t){return 0===e.path.replace(d,"/").indexOf(t.path.replace(d,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,y);var _=l[g]?this.ariaCurrentValue:null,x=function(e){K(e)&&(t.replace?n.replace(a,W):n.push(a,W))},w={click:K};Array.isArray(this.event)?this.event.forEach((function(e){w[e]=x})):w[this.event]=x;var k={class:l},C=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:l[m],isExactActive:l[g]});if(C){if(1===C.length)return C[0];if(C.length>1||!C.length)return 0===C.length?e():e("span",{},C)}if("a"===this.tag)k.on=w,k.attrs={href:c,"aria-current":_};else{var $=function e(t){var n;if(t)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=V(u.path,s.params),c(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function $e(e,t){return Ce(e)&&e._isRouter&&(null==t||e.type===t)}function Oe(e,t,n){var r=function(o){o>=e.length?n():e[o]?t(e[o],(function(){r(o+1)})):r(o+1)};r(0)}function Pe(e){return function(t,n,r){var o=!1,i=0,a=null;Se(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){o=!0,i++;var c,l=Ae((function(t){var o;((o=t).__esModule||Ee&&"Module"===o[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:H.extend(t),n.components[s]=t,--i<=0&&r()})),u=Ae((function(e){var t="Failed to resolve async component "+s+": "+e;a||(a=Ce(e)?e:new Error(t),r(a))}));try{c=e(l,u)}catch(e){u(e)}if(c)if("function"==typeof c.then)c.then(l,u);else{var f=c.component;f&&"function"==typeof f.then&&f.then(l,u)}}})),o||r()}}function Se(e,t){return je(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function je(e){return Array.prototype.concat.apply([],e)}var Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ae(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var Te=function(e,t){this.router=e,this.base=function(e){if(!e)if(J){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Le(e,t,n,r){var o=Se(e,(function(e,r,o,i){var a=function(e,t){"function"!=typeof e&&(e=H.extend(e));return e.options[t]}(e,t);if(a)return Array.isArray(a)?a.map((function(e){return n(e,r,o,i)})):n(a,r,o,i)}));return je(r?o.reverse():o)}function Re(e,t){if(t)return function(){return e.apply(t,arguments)}}Te.prototype.listen=function(e){this.cb=e},Te.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},Te.prototype.onError=function(e){this.errorCbs.push(e)},Te.prototype.transitionTo=function(e,t,n){var r,o=this;try{r=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),t&&t(r),o.ensureURL(),o.router.afterHooks.forEach((function(e){e&&e(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(e){e(r)})))}),(function(e){n&&n(e),e&&!o.ready&&($e(e,be.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(t){t(e)}))))}))},Te.prototype.confirmTransition=function(e,t,n){var r=this,o=this.current;this.pending=e;var i,a,s=function(e){!$e(e)&&Ce(e)&&(r.errorCbs.length?r.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},c=e.matched.length-1,l=o.matched.length-1;if(b(e,o)&&c===l&&e.matched[c]===o.matched[l])return this.ensureURL(),e.hash&&se(this.router,o,e,!1),s(((a=we(i=o,e,be.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n0)){var t=this.router,n=t.options.scrollBehavior,r=me&&n;r&&this.listeners.push(ae());var o=function(){var n=e.current,o=Ue(e.base);e.current===m&&o===e._startLocation||e.transitionTo(o,(function(e){r&&se(t,e,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ge($(r.base+e.fullPath)),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ye($(r.base+e.fullPath)),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(Ue(this.base)!==this.current.fullPath){var t=$(this.base+this.current.fullPath);e?ge(t):ye(t)}},t.prototype.getCurrentLocation=function(){return Ue(this.base)},t}(Te);function Ue(e){var t=window.location.pathname,n=t.toLowerCase(),r=e.toLowerCase();return!e||n!==r&&0!==n.indexOf($(r+"/"))||(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var Ie=function(e){function t(t,n,r){e.call(this,t,n),r&&function(e){var t=Ue(e);if(!/^\/#/.test(t))return window.location.replace($(e+"/#"+t)),!0}(this.base)||De()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=me&&t;n&&this.listeners.push(ae());var r=function(){var t=e.current;De()&&e.transitionTo(Fe(),(function(r){n&&se(e.router,r,t,!0),me||ze(r.fullPath)}))},o=me?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){Be(e.fullPath),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ze(e.fullPath),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;Fe()!==t&&(e?Be(t):ze(t))},t.prototype.getCurrentLocation=function(){return Fe()},t}(Te);function De(){var e=Fe();return"/"===e.charAt(0)||(ze("/"+e),!1)}function Fe(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function Ne(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function Be(e){me?ge(Ne(e)):window.location.hash=e}function ze(e){me?ye(Ne(e)):window.location.replace(Ne(e))}var Ve=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach((function(t){t&&t(r,e)}))}),(function(e){$e(e,be.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Te),qe=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Z(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!me&&!1!==e.fallback,this.fallback&&(t="hash"),J||(t="abstract"),this.mode=t,t){case"history":this.history=new Me(this,e.base);break;case"hash":this.history=new Ie(this,e.base,this.fallback);break;case"abstract":this.history=new Ve(this,e.base);break;default:0}},He={currentRoute:{configurable:!0}};qe.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},He.currentRoute.get=function(){return this.history&&this.history.current},qe.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof Me||n instanceof Ie){var r=function(e){n.setupListeners(),function(e){var r=n.current,o=t.options.scrollBehavior;me&&o&&"fullPath"in e&&se(t,e,r,!1)}(e)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},qe.prototype.beforeEach=function(e){return Ge(this.beforeHooks,e)},qe.prototype.beforeResolve=function(e){return Ge(this.resolveHooks,e)},qe.prototype.afterEach=function(e){return Ge(this.afterHooks,e)},qe.prototype.onReady=function(e,t){this.history.onReady(e,t)},qe.prototype.onError=function(e){this.history.onError(e)},qe.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},qe.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},qe.prototype.go=function(e){this.history.go(e)},qe.prototype.back=function(){this.go(-1)},qe.prototype.forward=function(){this.go(1)},qe.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},qe.prototype.resolve=function(e,t,n){var r=q(e,t=t||this.history.current,n,this),o=this.match(r,t),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?$(e+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},qe.prototype.getRoutes=function(){return this.matcher.getRoutes()},qe.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},qe.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(qe.prototype,He);var We=qe;function Ge(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}qe.install=function e(t){if(!e.installed||H!==t){e.installed=!0,H=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",w),t.component("RouterLink",G);var o=t.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},qe.version="3.6.5",qe.isNavigationFailure=$e,qe.NavigationFailureType=be,qe.START_LOCATION=m,J&&window.Vue&&window.Vue.use(qe);var Ke={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(42)]).then(n.bind(null,251)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(28)]).then(n.bind(null,184)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(50)]).then(n.bind(null,158)),"components/Home":()=>Promise.all([n.e(0),n.e(32)]).then(n.bind(null,332)),"components/NavLink":()=>n.e(56).then(n.bind(null,156)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(27)]).then(n.bind(null,212)),"components/Navbar":()=>Promise.all([n.e(0),n.e(5),n.e(43)]).then(n.bind(null,541)),"components/Page":()=>Promise.all([n.e(0),n.e(26)]).then(n.bind(null,333)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(33)]).then(n.bind(null,219)),"components/PageNav":()=>Promise.all([n.e(0),n.e(29)]).then(n.bind(null,220)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(24)]).then(n.bind(null,334)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(51)]).then(n.bind(null,339)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,213)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(39)]).then(n.bind(null,185)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,179)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,564)),"global-components/CodeBlock":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,554)),"global-components/CodeGroup":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,555)),"layouts/404":()=>n.e(18).then(n.bind(null,556)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,552)),NotFound:()=>n.e(18).then(n.bind(null,556)),Layout:()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,552))},Je={"v-4e72e1d8":()=>n.e(62).then(n.bind(null,565)),"v-045b6323":()=>n.e(65).then(n.bind(null,566)),"v-21917184":()=>n.e(64).then(n.bind(null,567)),"v-acc004fa":()=>n.e(57).then(n.bind(null,568)),"v-3e291b63":()=>n.e(66).then(n.bind(null,569)),"v-14e901dc":()=>n.e(63).then(n.bind(null,570)),"v-688ffb43":()=>n.e(67).then(n.bind(null,571)),"v-700f1b88":()=>n.e(68).then(n.bind(null,572)),"v-78536523":()=>n.e(58).then(n.bind(null,573)),"v-7ffae7c8":()=>n.e(59).then(n.bind(null,574)),"v-76e62a34":()=>n.e(70).then(n.bind(null,575)),"v-21de1e8c":()=>n.e(69).then(n.bind(null,576)),"v-adb4d3cc":()=>n.e(71).then(n.bind(null,577)),"v-974804cc":()=>n.e(72).then(n.bind(null,578)),"v-779fe818":()=>n.e(73).then(n.bind(null,579)),"v-23074efc":()=>n.e(74).then(n.bind(null,580)),"v-6b6d7bae":()=>n.e(75).then(n.bind(null,581)),"v-a5deb388":()=>n.e(76).then(n.bind(null,582)),"v-02b9217c":()=>n.e(77).then(n.bind(null,583)),"v-a1f70a7a":()=>n.e(52).then(n.bind(null,584)),"v-2ac201a4":()=>n.e(37).then(n.bind(null,585)),"v-d4caec3c":()=>n.e(78).then(n.bind(null,586)),"v-0937d47a":()=>n.e(79).then(n.bind(null,587)),"v-c5fcf990":()=>n.e(80).then(n.bind(null,588)),"v-62bfd25c":()=>n.e(38).then(n.bind(null,589)),"v-65bcb302":()=>n.e(81).then(n.bind(null,590)),"v-ddb09444":()=>n.e(53).then(n.bind(null,591)),"v-4a7f74ac":()=>n.e(55).then(n.bind(null,592)),"v-5041b7a0":()=>n.e(82).then(n.bind(null,593)),"v-589f7f88":()=>n.e(83).then(n.bind(null,594)),"v-2b5b0ed8":()=>n.e(54).then(n.bind(null,595)),"v-697f60bc":()=>n.e(60).then(n.bind(null,596)),"v-e3af3008":()=>n.e(40).then(n.bind(null,597)),"v-9fcd1034":()=>n.e(84).then(n.bind(null,598))};function Xe(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}const Ye=/-(\w)/g,Ze=Xe(e=>e.replace(Ye,(e,t)=>t?t.toUpperCase():"")),Qe=/\B([A-Z])/g,et=Xe(e=>e.replace(Qe,"-$1").toLowerCase()),tt=Xe(e=>e.charAt(0).toUpperCase()+e.slice(1));function nt(e,t){if(!t)return;if(e(t))return e(t);return t.includes("-")?e(tt(Ze(t))):e(tt(t))||e(et(t))}const rt=Object.assign({},Ke,Je),ot=e=>rt[e],it=e=>Je[e],at=e=>Ke[e],st=e=>r.a.component(e);function ct(e){return nt(it,e)}function lt(e){return nt(at,e)}function ut(e){return nt(ot,e)}function ft(e){return nt(st,e)}function pt(...e){return Promise.all(e.filter(e=>e).map(async e=>{if(!ft(e)&&ut(e)){const t=await ut(e)();r.a.component(e,t.default)}}))}function dt(e,t){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[e]=t)}var ht=n(47),vt=n.n(ht),mt=n(48),gt=n.n(mt),yt={created(){if(this.siteMeta=this.$site.headTags.filter(([e])=>"meta"===e).map(([e,t])=>t),this.$ssrContext){const t=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(e=t)?e.map(e=>{let t="{t+=` ${n}="${gt()(e[n])}"`}),t+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_t(this.$canonicalUrl)}var e},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const e=this.getMergedMetaTags();this.currentMetaTags=xt(e,this.currentMetaTags)},getMergedMetaTags(){const e=this.$page.frontmatter.meta||[];return vt()([{name:"description",content:this.$description}],e,this.siteMeta,wt)},updateCanonicalLink(){bt(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_t(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){xt(null,this.currentMetaTags),bt()}};function bt(){const e=document.querySelector("link[rel='canonical']");e&&e.remove()}function _t(e=""){return e?``:""}function xt(e,t){if(t&&[...t].filter(e=>e.parentNode===document.head).forEach(e=>document.head.removeChild(e)),e)return e.map(e=>{const t=document.createElement("meta");return Object.keys(e).forEach(n=>{t.setAttribute(n,e[n])}),document.head.appendChild(t),t})}function wt(e){for(const t of["name","property","itemprop"])if(e.hasOwnProperty(t))return e[t]+t;return JSON.stringify(e)}var kt=n(13),Ct=n.n(kt),$t={mounted(){Ct.a.configure({showSpinner:!1}),this.$router.beforeEach((e,t,n)=>{e.path===t.path||r.a.component(e.name)||Ct.a.start(),n()}),this.$router.afterEach(()=>{Ct.a.done(),this.isSidebarOpen=!1})}},Ot=n(49),Pt={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Ot)()((function(){this.setActiveHash()}),300),setActiveHash(){const e=[].slice.call(document.querySelectorAll(".sidebar-link")),t=[].slice.call(document.querySelectorAll(".header-anchor")).filter(t=>e.some(e=>e.hash===t.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let e=0;e=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},St={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let e={};return e[this.options.align]="7.5px",e},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},copyToClipboard(e){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let e=document.createElement("textarea");document.body.appendChild(e),e.value=this.code,e.select(),document.execCommand("Copy"),e.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let e=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${e.r}, ${e.g}, ${e.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},jt=(n(146),n(4)),Et=Object(jt.a)(St,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"code-copy"},[t("svg",{class:e.iconClass,style:e.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:e.copyToClipboard}},[t("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),e._v(" "),t("path",{attrs:{fill:e.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),e._v(" "),t("span",{class:e.success?"success":"",style:e.alignStyle},[e._v("\n "+e._s(e.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,At=(n(147),[yt,$t,Pt,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(e=>{if(e.classList.contains("code-copy-added"))return;let t=new(r.a.extend(Et));t.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},t.code=e.innerText,t.parent=e,t.$mount(),e.classList.add("code-copy-added"),e.appendChild(t.$el)})},100)}}}]),Tt={name:"GlobalLayout",computed:{layout(){const e=this.getLayout();return dt("layout",e),r.a.component(e)}},methods:{getLayout(){if(this.$page.path){const e=this.$page.frontmatter.layout;return e&&(this.$vuepress.getLayoutAsyncComponent(e)||this.$vuepress.getVueComponent(e))?e:"Layout"}return"NotFound"}}},Lt=Object(jt.a)(Tt,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(e,t,n){switch(t){case"components":e[t]||(e[t]={}),Object.assign(e[t],n);break;case"mixins":e[t]||(e[t]=[]),e[t].push(...n);break;default:throw new Error("Unknown option name.")}}(Lt,"mixins",At);const Rt=[{name:"v-4e72e1d8",path:"/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-4e72e1d8").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-045b6323",path:"/federation/accounting.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-045b6323").then(n)}},{name:"v-21917184",path:"/data-collections/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-21917184").then(n)}},{path:"/data-collections/index.html",redirect:"/data-collections/"},{name:"v-acc004fa",path:"/federation/backends/api.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-acc004fa").then(n)}},{name:"v-3e291b63",path:"/federation/backends/collections.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-3e291b63").then(n)}},{name:"v-14e901dc",path:"/api/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-14e901dc").then(n)}},{path:"/api/index.html",redirect:"/api/"},{name:"v-688ffb43",path:"/federation/backends/fileformats.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-688ffb43").then(n)}},{name:"v-700f1b88",path:"/federation/backends/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-700f1b88").then(n)}},{path:"/federation/backends/index.html",redirect:"/federation/backends/"},{name:"v-78536523",path:"/federation/backends/processes.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-78536523").then(n)}},{name:"v-7ffae7c8",path:"/federation/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-7ffae7c8").then(n)}},{path:"/federation/index.html",redirect:"/federation/"},{name:"v-76e62a34",path:"/getting-started/client-side-processing/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-76e62a34").then(n)}},{path:"/getting-started/client-side-processing/index.html",redirect:"/getting-started/client-side-processing/"},{name:"v-21de1e8c",path:"/file-formats/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-21de1e8c").then(n)}},{path:"/file-formats/index.html",redirect:"/file-formats/"},{name:"v-adb4d3cc",path:"/getting-started/editor/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-adb4d3cc").then(n)}},{path:"/getting-started/editor/index.html",redirect:"/getting-started/editor/"},{name:"v-974804cc",path:"/getting-started/javascript/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-974804cc").then(n)}},{path:"/getting-started/javascript/index.html",redirect:"/getting-started/javascript/"},{name:"v-779fe818",path:"/getting-started/jupyterlab/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-779fe818").then(n)}},{path:"/getting-started/jupyterlab/index.html",redirect:"/getting-started/jupyterlab/"},{name:"v-23074efc",path:"/getting-started/python/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-23074efc").then(n)}},{path:"/getting-started/python/index.html",redirect:"/getting-started/python/"},{name:"v-6b6d7bae",path:"/getting-started/python/shiny.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-6b6d7bae").then(n)}},{name:"v-a5deb388",path:"/getting-started/r/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-a5deb388").then(n)}},{path:"/getting-started/r/index.html",redirect:"/getting-started/r/"},{name:"v-02b9217c",path:"/processes/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-02b9217c").then(n)}},{path:"/processes/index.html",redirect:"/processes/"},{name:"v-a1f70a7a",path:"/join/free_trial.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-a1f70a7a").then(n)}},{name:"v-2ac201a4",path:"/usecases/Fractional-canopy-Cover/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-2ac201a4").then(n)}},{path:"/usecases/Fractional-canopy-Cover/index.html",redirect:"/usecases/Fractional-canopy-Cover/"},{name:"v-d4caec3c",path:"/usecases/ard/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-d4caec3c").then(n)}},{path:"/usecases/ard/index.html",redirect:"/usecases/ard/"},{name:"v-0937d47a",path:"/usecases/ard/msi/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-0937d47a").then(n)}},{path:"/usecases/ard/msi/index.html",redirect:"/usecases/ard/msi/"},{name:"v-c5fcf990",path:"/usecases/ard/sar/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-c5fcf990").then(n)}},{path:"/usecases/ard/sar/index.html",redirect:"/usecases/ard/sar/"},{name:"v-62bfd25c",path:"/usecases/ard/sen2like/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-62bfd25c").then(n)}},{path:"/usecases/ard/sen2like/index.html",redirect:"/usecases/ard/sen2like/"},{name:"v-65bcb302",path:"/usecases/crop-classification/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-65bcb302").then(n)}},{path:"/usecases/crop-classification/index.html",redirect:"/usecases/crop-classification/"},{name:"v-ddb09444",path:"/usecases/crop-conditions/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-ddb09444").then(n)}},{path:"/usecases/crop-conditions/index.html",redirect:"/usecases/crop-conditions/"},{name:"v-4a7f74ac",path:"/usecases/gfm/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-4a7f74ac").then(n)}},{path:"/usecases/gfm/index.html",redirect:"/usecases/gfm/"},{name:"v-5041b7a0",path:"/usecases/landcover/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-5041b7a0").then(n)}},{path:"/usecases/landcover/index.html",redirect:"/usecases/landcover/"},{name:"v-589f7f88",path:"/usecases/large-scale-processing/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-589f7f88").then(n)}},{path:"/usecases/large-scale-processing/index.html",redirect:"/usecases/large-scale-processing/"},{name:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-2b5b0ed8").then(n)}},{path:"/usecases/forest-change-detection/index.html",redirect:"/usecases/forest-change-detection/"},{name:"v-697f60bc",path:"/usecases/no2-monitoring/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-697f60bc").then(n)}},{path:"/usecases/no2-monitoring/index.html",redirect:"/usecases/no2-monitoring/"},{name:"v-e3af3008",path:"/usecases/vessel-detection/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-e3af3008").then(n)}},{path:"/usecases/vessel-detection/index.html",redirect:"/usecases/vessel-detection/"},{name:"v-9fcd1034",path:"/workspaces/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-9fcd1034").then(n)}},{path:"/workspaces/index.html",redirect:"/workspaces/"},{path:"*",component:Lt}],Mt={title:"openEO Platform Documentation",description:"One of the most important properties for a future-oriented platform on earth observation is the orientation towards simple operation, with a special focus on efficiency of evaluation and availability. Complexity is kept hidden in the background to direct your focus on the data. This is done on one hand by the use of an aggregate API to access the infrastructure, but also by improved user-faced graphical processing. For access to the API, the user has the option to incorporate his own preferences, by choosing between several clients.",base:"/",headTags:[],pages:[{title:"Home",frontmatter:{home:!0},regularPath:"/",relativePath:"README.md",key:"v-4e72e1d8",path:"/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Platform credit usage",frontmatter:{},regularPath:"/federation/accounting.html",relativePath:"federation/accounting.md",key:"v-045b6323",path:"/federation/accounting.html",headers:[{level:2,title:"Platform credit rates",slug:"platform-credit-rates"},{level:2,title:"Estimating resource usage",slug:"estimating-resource-usage"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/data-collections/",relativePath:"data-collections/index.md",key:"v-21917184",path:"/data-collections/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation API",frontmatter:{},regularPath:"/federation/backends/api.html",relativePath:"federation/backends/api.md",key:"v-acc004fa",path:"/federation/backends/api.html",headers:[{level:2,title:"Profiles",slug:"profiles"},{level:3,title:"LP: Required for openEO Platform",slug:"lp-required-for-openeo-platform"},{level:2,title:"Authentication and authorization",slug:"authentication-and-authorization"},{level:3,title:"Authentication",slug:"authentication"},{level:3,title:"Authorization",slug:"authorization"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Collections",frontmatter:{},regularPath:"/federation/backends/collections.html",relativePath:"federation/backends/collections.md",key:"v-3e291b63",path:"/federation/backends/collections.html",headers:[{level:2,title:"Collection availability",slug:"collection-availability"},{level:3,title:"Requirements for non-experimental collections",slug:"requirements-for-non-experimental-collections"},{level:2,title:"Harmonization",slug:"harmonization"},{level:3,title:"Common naming convention",slug:"common-naming-convention"},{level:3,title:"Sentinel2-L2A",slug:"sentinel2-l2a"},{level:3,title:"Common Properties",slug:"common-properties"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/api/",relativePath:"api/index.md",key:"v-14e901dc",path:"/api/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"File Formats",frontmatter:{},regularPath:"/federation/backends/fileformats.html",relativePath:"federation/backends/fileformats.md",key:"v-688ffb43",path:"/federation/backends/fileformats.html",headers:[{level:2,title:"Best practices file formats",slug:"best-practices-file-formats"},{level:3,title:"Raster Formats",slug:"raster-formats"},{level:2,title:"Federation agreement file formats",slug:"federation-agreement-file-formats"},{level:3,title:"GeoTiff",slug:"geotiff"},{level:3,title:"netCDF",slug:"netcdf"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation Contract",frontmatter:{},regularPath:"/federation/backends/",relativePath:"federation/backends/index.md",key:"v-700f1b88",path:"/federation/backends/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Processes",frontmatter:{},regularPath:"/federation/backends/processes.html",relativePath:"federation/backends/processes.md",key:"v-78536523",path:"/federation/backends/processes.html",headers:[{level:3,title:"Requirements per Profile",slug:"requirements-per-profile"},{level:2,title:"L2P: Required - openEO Platform",slug:"l2p-required-openeo-platform"},{level:2,title:"L3P: Advanced - openEO Platform",slug:"l3p-advanced-openeo-platform"},{level:2,title:"L4P: Complete - openEO Platform",slug:"l4p-complete-openeo-platform"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation Aspects and Known Issues",frontmatter:{},regularPath:"/federation/",relativePath:"federation/index.md",key:"v-7ffae7c8",path:"/federation/",headers:[{level:2,title:"Data Collections",slug:"data-collections"},{level:3,title:"Terrascope",slug:"terrascope"},{level:3,title:"Sentinel Hub",slug:"sentinel-hub"},{level:3,title:"EODC",slug:"eodc"},{level:3,title:"Enforce back-end selection for common collections",slug:"enforce-back-end-selection-for-common-collections"},{level:2,title:"Processes",slug:"processes"},{level:2,title:"File formats",slug:"file-formats"},{level:2,title:"On-demand-preview",slug:"on-demand-preview"},{level:2,title:"Batch jobs",slug:"batch-jobs"},{level:3,title:"Managed job splitting",slug:"managed-job-splitting"},{level:3,title:"Validity of signed URLs in batch job results",slug:"validity-of-signed-urls-in-batch-job-results"},{level:3,title:"Customizing batch job resources on Terrascope",slug:"customizing-batch-job-resources-on-terrascope"},{level:3,title:"Batch job results on Sentinel Hub",slug:"batch-job-results-on-sentinel-hub"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Python Client Client Side Processing",frontmatter:{},regularPath:"/getting-started/client-side-processing/",relativePath:"getting-started/client-side-processing/index.md",key:"v-76e62a34",path:"/getting-started/client-side-processing/",headers:[{level:2,title:"Background",slug:"background"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"STAC Collections and Items",slug:"stac-collections-and-items"},{level:3,title:"Local Collections",slug:"local-collections"},{level:3,title:"Local Processing",slug:"local-processing"},{level:2,title:"Client-Side Processing Example Notebooks",slug:"client-side-processing-example-notebooks"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/file-formats/",relativePath:"file-formats/index.md",key:"v-21de1e8c",path:"/file-formats/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Platform Editor",frontmatter:{},regularPath:"/getting-started/editor/",relativePath:"getting-started/editor/index.md",key:"v-adb4d3cc",path:"/getting-started/editor/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO JavaScript Client",frontmatter:{},regularPath:"/getting-started/javascript/",relativePath:"getting-started/javascript/index.md",key:"v-974804cc",path:"/getting-started/javascript/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connecting to openEO Platform",slug:"connecting-to-openeo-platform"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with openEO Platform in JupyterLab (Python)",frontmatter:{},regularPath:"/getting-started/jupyterlab/",relativePath:"getting-started/jupyterlab/index.md",key:"v-779fe818",path:"/getting-started/jupyterlab/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Python Client",frontmatter:{},regularPath:"/getting-started/python/",relativePath:"getting-started/python/index.md",key:"v-23074efc",path:"/getting-started/python/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Working with Datacubes",slug:"working-with-datacubes"},{level:3,title:"Creating a Datacube",slug:"creating-a-datacube"},{level:3,title:"Applying processes",slug:"applying-processes"},{level:3,title:"Defining output format",slug:"defining-output-format"},{level:2,title:"Execution",slug:"execution"},{level:3,title:"Batch job execution",slug:"batch-job-execution"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Run openEO processes in Shiny apps",frontmatter:{},regularPath:"/getting-started/python/shiny.html",relativePath:"getting-started/python/shiny.md",key:"v-6b6d7bae",path:"/getting-started/python/shiny.html",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO R Client",frontmatter:{},regularPath:"/getting-started/r/",relativePath:"getting-started/r/index.md",key:"v-a5deb388",path:"/getting-started/r/",headers:[{level:2,title:"Useful links",slug:"useful-links"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/processes/",relativePath:"processes/index.md",key:"v-02b9217c",path:"/processes/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Registration",frontmatter:{},regularPath:"/join/free_trial.html",relativePath:"join/free_trial.md",key:"v-a1f70a7a",path:"/join/free_trial.html",headers:[{level:2,title:"Connect with EGI Check-in",slug:"connect-with-egi-check-in"},{level:2,title:"EOPlaza",slug:"eoplaza"},{level:2,title:"Working with openEO Platform",slug:"working-with-openeo-platform"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Fractional Canopy Cover",frontmatter:{},regularPath:"/usecases/Fractional-canopy-Cover/",relativePath:"usecases/Fractional-canopy-Cover/index.md",key:"v-2ac201a4",path:"/usecases/Fractional-canopy-Cover/",headers:[{level:2,title:"Fractional Canopy Cover",slug:"fractional-canopy-cover"},{level:2,title:"Data Preparation",slug:"data-preparation"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Predicted Fractional Canopy Cover",slug:"predicted-fractional-canopy-cover"},{level:2,title:"Validation",slug:"validation"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data (ARD)",frontmatter:{},regularPath:"/usecases/ard/",relativePath:"usecases/ard/index.md",key:"v-d4caec3c",path:"/usecases/ard/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data for Multi-Spectral Imagery (Sentinel-2)",frontmatter:{},regularPath:"/usecases/ard/msi/",relativePath:"usecases/ard/msi/index.md",key:"v-0937d47a",path:"/usecases/ard/msi/",headers:[{level:2,title:"Atmospheric correction",slug:"atmospheric-correction"},{level:3,title:"Reference implementations",slug:"reference-implementations"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data for SAR (Sentinel-1)",frontmatter:{},regularPath:"/usecases/ard/sar/",relativePath:"usecases/ard/sar/index.md",key:"v-c5fcf990",path:"/usecases/ard/sar/",headers:[{level:2,title:"Backscatter computation",slug:"backscatter-computation"},{level:2,title:"Reference implementations",slug:"reference-implementations"},{level:3,title:"CARD4L NRB for SENTINEL1_GRD collection (provided by Sentinel Hub)",slug:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"},{level:3,title:"Orfeo for other GRD collections (provided by VITO / TerraScope)",slug:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Sen2Like",frontmatter:{},regularPath:"/usecases/ard/sen2like/",relativePath:"usecases/ard/sen2like/index.md",key:"v-62bfd25c",path:"/usecases/ard/sen2like/",headers:[{level:2,title:"1. sen2like for RGB",slug:"_1-sen2like-for-rgb"},{level:3,title:"openEO sen2like processing",slug:"openeo-sen2like-processing"},{level:3,title:"Explore the openEO L2F results",slug:"explore-the-openeo-l2f-results"},{level:2,title:"2. sen2like for NDVI",slug:"_2-sen2like-for-ndvi"},{level:3,title:"Explore the openEO L2F NDVI results",slug:"explore-the-openeo-l2f-ndvi-results"},{level:2,title:"3. Sen2Like processing in the openeo web editor",slug:"_3-sen2like-processing-in-the-openeo-web-editor"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Crop Classification",frontmatter:{},regularPath:"/usecases/crop-classification/",relativePath:"usecases/crop-classification/index.md",key:"v-65bcb302",path:"/usecases/crop-classification/",headers:[{level:2,title:"Preprocessing & feature engineering",slug:"preprocessing-feature-engineering"},{level:3,title:"Data preparation",slug:"data-preparation"},{level:3,title:"Computing temporal features",slug:"computing-temporal-features"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Classification",slug:"classification"},{level:3,title:"Rule-based classification",slug:"rule-based-classification"},{level:3,title:"Supervised classification using Random Forest",slug:"supervised-classification-using-random-forest"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Crop conditions",frontmatter:{},regularPath:"/usecases/crop-conditions/",relativePath:"usecases/crop-conditions/index.md",key:"v-ddb09444",path:"/usecases/crop-conditions/",headers:[{level:2,title:"1. data preparation",slug:"_1-data-preparation"},{level:2,title:"2. Sen2like processing",slug:"_2-sen2like-processing"},{level:2,title:"3. Running the Job",slug:"_3-running-the-job"},{level:2,title:"4. Explore the openEO results",slug:"_4-explore-the-openeo-results"},{level:2,title:"5. Indices calculations",slug:"_5-indices-calculations"},{level:3,title:"5.1 Leaf Area Index (LAI)",slug:"_5-1-leaf-area-index-lai"},{level:3,title:"5.2\tLeaf Chlorophyll Content (CAB)",slug:"_5-2leaf-chlorophyll-content-cab"},{level:3,title:"5.3\tFraction of green Vegetation Cover (FCOVER)",slug:"_5-3fraction-of-green-vegetation-cover-fcover"},{level:3,title:"5.4\tFraction of Absorbed Photosynthetically Active Radiation (FAPAR)",slug:"_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"},{level:3,title:"5.5\tNormalized difference vegetation index",slug:"_5-5normalized-difference-vegetation-index"},{level:3,title:"5.6 Explore the results",slug:"_5-6-explore-the-results"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Global Flood Monitoring",frontmatter:{},regularPath:"/usecases/gfm/",relativePath:"usecases/gfm/index.md",key:"v-4a7f74ac",path:"/usecases/gfm/",headers:[{level:2,title:"Output layers used in openEO",slug:"output-layers-used-in-openeo"},{level:2,title:"Links",slug:"links"},{level:2,title:"Compute the maximum flood extent",slug:"compute-the-maximum-flood-extent"},{level:2,title:"Explore how the flood extent relates to the Global Human Settlement Built-up layer",slug:"explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"},{level:2,title:"Statistical analysis",slug:"statistical-analysis"},{level:2,title:"Observed water (flood_extent + refwater)",slug:"observed-water-flood-extent-refwater"},{level:2,title:"Explore the observed water",slug:"explore-the-observed-water"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Dynamic land cover service",frontmatter:{},regularPath:"/usecases/landcover/",relativePath:"usecases/landcover/index.md",key:"v-5041b7a0",path:"/usecases/landcover/",headers:[{level:2,title:"Methodology",slug:"methodology"},{level:3,title:"Reference data",slug:"reference-data"},{level:3,title:"Input data",slug:"input-data"},{level:3,title:"Preprocessing",slug:"preprocessing"},{level:3,title:"Feature engineering",slug:"feature-engineering"},{level:3,title:"Model",slug:"model"},{level:2,title:"Implementation",slug:"implementation"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Large scale processing",frontmatter:{},regularPath:"/usecases/large-scale-processing/",relativePath:"usecases/large-scale-processing/index.md",key:"v-589f7f88",path:"/usecases/large-scale-processing/",headers:[{level:2,title:"Relevant openEO features",slug:"relevant-openeo-features"},{level:2,title:"Preparation",slug:"preparation"},{level:2,title:"Prepare tiling grid",slug:"prepare-tiling-grid"},{level:2,title:"Prepare job attributes",slug:"prepare-job-attributes"},{level:2,title:"Tuning your processing job",slug:"tuning-your-processing-job"},{level:2,title:"Starting map production",slug:"starting-map-production"},{level:2,title:"Errors during production",slug:"errors-during-production"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Forest Change Detection",frontmatter:{},regularPath:"/usecases/forest-change-detection/",relativePath:"usecases/forest-change-detection/index.md",key:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",headers:[{level:2,title:"Data preparation",slug:"data-preparation"},{level:2,title:"Seasonal curve fitting",slug:"seasonal-curve-fitting"},{level:2,title:"Predicting values",slug:"predicting-values"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"NO₂ monitoring",frontmatter:{},regularPath:"/usecases/no2-monitoring/",relativePath:"usecases/no2-monitoring/index.md",key:"v-697f60bc",path:"/usecases/no2-monitoring/",headers:[{level:2,title:"Shiny apps (R and Python)",slug:"shiny-apps-r-and-python"},{level:3,title:"Time-Series Analyser",slug:"time-series-analyser"},{level:3,title:"Map Maker for one Snapshot",slug:"map-maker-for-one-snapshot"},{level:3,title:"Spacetime Animation",slug:"spacetime-animation"},{level:2,title:"Basic NO₂ analysis in Python, R and JavaScript",slug:"basic-no2-analysis-in-python-r-and-javascript"},{level:3,title:"1. Load a data cube",slug:"_1-load-a-data-cube"},{level:3,title:"2. Fill gaps",slug:"_2-fill-gaps"},{level:3,title:"3. Smoothen values (optional)",slug:"_3-smoothen-values-optional"},{level:3,title:"4. What do you want to know?",slug:"_4-what-do-you-want-to-know"},{level:3,title:"5. Execute the process",slug:"_5-execute-the-process"},{level:3,title:"Result",slug:"result"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Vessel Detection",frontmatter:{},regularPath:"/usecases/vessel-detection/",relativePath:"usecases/vessel-detection/index.md",key:"v-e3af3008",path:"/usecases/vessel-detection/",headers:[{level:2,title:"Adaptive Thresholding in Xarray",slug:"adaptive-thresholding-in-xarray"},{level:3,title:"1. Authenticate",slug:"_1-authenticate"},{level:3,title:"2. Pre-processing prep",slug:"_2-pre-processing-prep"},{level:3,title:"3. Defining a process graph to detect vessels in our AOI.",slug:"_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"},{level:3,title:"4. Run Auxilliary job",slug:"_4-run-auxilliary-job"},{level:2,title:"Result Visualisation",slug:"result-visualisation"},{level:2,title:"Use Case -- Recap",slug:"use-case-recap"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Workspaces",frontmatter:{},regularPath:"/workspaces/",relativePath:"workspaces/index.md",key:"v-9fcd1034",path:"/workspaces/",headers:[{level:2,title:"Workspaces Overview",slug:"workspaces-overview"},{level:2,title:"Workspace Providers",slug:"workspace-providers"},{level:2,title:"Provisioning a Workspace",slug:"provisioning-a-workspace"},{level:2,title:"Registering a Workspace",slug:"registering-a-workspace"},{level:2,title:"Export openEO result to Workspace",slug:"export-openeo-result-to-workspace"},{level:2,title:"Listing Files",slug:"listing-files"},{level:3,title:"1) openEO API",slug:"_1-openeo-api"},{level:3,title:"2) Third Party Applications",slug:"_2-third-party-applications"},{level:2,title:"Loading data from a workspace",slug:"loading-data-from-a-workspace"},{level:2,title:"User Collections",slug:"user-collections"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3}],themeConfig:{logo:"https://openeo.cloud/wp-content/themes/openeo_platform/images/logo-pages.svg",editLinks:!0,docsRepo:"openEOPlatform/documentation",docsBranch:"main",algolia:{appId:"AH1DCGL38F",apiKey:"3d026b8a9c3950be6d136a6d0f934029",indexName:"openeo-cloud"},nav:[{text:"Datasets",link:"/data-collections/"},{text:"Get Started",items:[{text:"Free Trial Registration",link:"/join/free_trial.html"},{text:"Data Cubes",link:"https://openeo.org/documentation/1.0/datacubes.html"},{text:"Client Libraries",items:[{text:"JavaScript",link:"/getting-started/javascript/"},{text:"Python",link:"/getting-started/python/"},{text:"R",link:"/getting-started/r/"}]},{text:"Development Environments",items:[{text:"JupyterLab (Python)",link:"/getting-started/jupyterlab/"},{text:"Editor",link:"/getting-started/editor/"}]},{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Client-Side Processing (Python)",link:"/getting-started/client-side-processing/"}]},{text:"Clients",items:[{text:"JavaScript",link:"https://open-eo.github.io/openeo-js-client/latest/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/"},{text:"R",link:"https://open-eo.github.io/openeo-r-client/"}]},{text:"Use Cases",items:[{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Analysis-Ready Data (ARD)",items:[{text:"Overview",link:"/usecases/ard/"},{text:"SAR (Sentinel-1)",link:"/usecases/ard/sar/"},{text:"Multi-Spectral Imagery",link:"/usecases/ard/msi/"},{text:"Sen2Like",link:"/usecases/ard/sen2like/"}]},{text:"Crop Classification",link:"/usecases/crop-classification/"},{text:"Forest Change Detection",link:"/usecases/forest-change-detection/"},{text:"Land Cover Classification",link:"/usecases/landcover/"},{text:"NO₂ monitoring",link:"/usecases/no2-monitoring/"},{text:"Large scale processing",link:"/usecases/large-scale-processing/"},{text:"Global flood monitoring",link:"/usecases/gfm/"},{text:"Vessel Detection",link:"/usecases/vessel-detection/"},{text:"Fractional canopy Cover",link:"/usecases/Fractional-canopy-Cover/"},{text:"Crop Conditions",link:"/usecases/crop-conditions/"}]},{text:"Processes",items:[{text:"JavaScript & R",link:"/processes/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.datacube"}]},{text:"File Formats",link:"/file-formats/"},{text:"Advanced",items:[{text:"Accounting",link:"/federation/accounting.html"},{text:"Federation Aspects",link:"/federation/index.html"},{text:"Federation Contract",link:"/federation/backends/index.html"},{text:"Workspaces",link:"/workspaces/index.md"},{text:"HTTP API",link:"/api/"}]},{text:"Contact",link:"https://openeo.cloud/contact/"}],sidebar:"auto"}};"undefined"!=typeof window&&(window.global=window);n(148);r.a.component("ApiSpec",()=>n.e(61).then(n.bind(null,557))),r.a.component("DataCollections",()=>Promise.all([n.e(0),n.e(4),n.e(34)]).then(n.bind(null,550))),r.a.component("FileFormatsSpec",()=>Promise.all([n.e(0),n.e(4),n.e(35)]).then(n.bind(null,551))),r.a.component("ProcessesSpec",()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(23),n.e(41)]).then(n.bind(null,558))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,564))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,554))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,555)));n(149);var Ut=[({router:e,Vue:t})=>{t.config.ignoredElements=["redoc"],e.beforeEach((e,t,n)=>{const r={"/authentication":"/join/free_trial.html","/join/early_adopter.html":"/join/free_trial.html"}[e.path];r?n({path:r}):n()})},{},({Vue:e})=>{e.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},{},({Vue:e})=>{e.component("CodeCopy",Et)}],It=[];class Dt extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(e){return this.store.state[e]}$set(e,t){r.a.set(this.store.state,e,t)}$emit(...e){this.store.$emit(...e)}$on(...e){this.store.$on(...e)}}{}Object.assign(Dt.prototype,{getPageAsyncComponent:ct,getLayoutAsyncComponent:lt,getAsyncComponent:ut,getVueComponent:ft});var Ft={install(e){const t=new Dt;e.$vuepress=t,e.prototype.$vuepress=t}};function Nt(e,t){const n=t.toLowerCase();return e.options.routes.some(e=>e.path.toLowerCase()===n)}var Bt={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(e){const t=this.pageKey||this.$parent.$page.key;return dt("pageKey",t),r.a.component(t)||r.a.component(t,ct(t)),r.a.component(t)?e(t):e("")}},zt={functional:!0,props:{slotKey:String,required:!0},render:(e,{props:t,slots:n})=>e("div",{class:["content__"+t.slotKey]},n()[t.slotKey])},Vt={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},qt=(n(150),n(151),Object(jt.a)(Vt,(function(){var e=this._self._c;return e("span",[e("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[e("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),e("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),e("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),Ht={functional:!0,render(e,{parent:t,children:n}){if(t._isMounted)return n;t.$once("hook:mounted",()=>{t.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(We),r.a.use(Ft),r.a.mixin(function(e,t,n=r.a){!function(e){e.locales&&Object.keys(e.locales).forEach(t=>{e.locales[t].path=t});Object.freeze(e)}(t),n.$vuepress.$set("siteData",t);const o=new(e(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((e,t)=>(t.startsWith("$")&&(e[t]=i[t].get),e),a),{computed:a}}(e=>class{setPage(e){this.__page=e}get $site(){return e}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:e={}}=this.$site;let t,n;for(const r in e)"/"===r?n=e[r]:0===this.$page.path.indexOf(r)&&(t=e[r]);return t||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:e}=this.$page.frontmatter;return"string"==typeof e&&e}get $title(){const e=this.$page,{metaTitle:t}=this.$page.frontmatter;if("string"==typeof t)return t;const n=this.$siteTitle,r=e.frontmatter.home?null:e.frontmatter.title||e.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const e=function(e){if(e){const t=e.filter(e=>"description"===e.name)[0];if(t)return t.content}}(this.$page.frontmatter.meta);return e||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(e,t){for(let n=0;nn||(e.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(e.hash)}:{x:0,y:0})});!function(e){e.beforeEach((t,n,r)=>{if(Nt(e,t.path))r();else if(/(\/|\.html)$/.test(t.path))if(/\/$/.test(t.path)){const n=t.path.replace(/\/$/,"")+".html";Nt(e,n)?r(n):r()}else r();else{const n=t.path+"/",o=t.path+".html";Nt(e,o)?r(o):Nt(e,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Ut.filter(e=>"function"==typeof e).map(t=>t({Vue:r.a,options:o,router:n,siteData:Mt,isServer:e})))}catch(e){console.error(e)}return{app:new r.a(Object.assign(o,{router:n,render:e=>e("div",{attrs:{id:"app"}},[e("RouterView",{ref:"layout"}),e("div",{class:"global-ui"},It.map(t=>e(t)))])})),router:n}}(!1).then(({app:e,router:t})=>{t.onReady(()=>{e.$mount("#app")})})}]); \ No newline at end of file + */function o(e,t){for(var n in t)e[n]=t[n];return e}var i=/[!'()*]/g,a=function(e){return"%"+e.charCodeAt(0).toString(16)},s=/%2C/g,c=function(e){return encodeURIComponent(e).replace(i,a).replace(s,",")};function l(e){try{return decodeURIComponent(e)}catch(e){0}return e}var u=function(e){return null==e||"object"==typeof e?e:String(e)};function f(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),r=l(n.shift()),o=n.length>0?l(n.join("=")):null;void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]})),t):t}function p(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return c(t);if(Array.isArray(n)){var r=[];return n.forEach((function(e){void 0!==e&&(null===e?r.push(c(t)):r.push(c(t)+"="+c(e)))})),r.join("&")}return c(t)+"="+c(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var d=/\/?$/;function h(e,t,n,r){var o=r&&r.options.stringifyQuery,i=t.query||{};try{i=v(i)}catch(e){}var a={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:i,params:t.params||{},fullPath:y(t,o),matched:e?g(e):[]};return n&&(a.redirectedFrom=y(n,o)),Object.freeze(a)}function v(e){if(Array.isArray(e))return e.map(v);if(e&&"object"==typeof e){var t={};for(var n in e)t[n]=v(e[n]);return t}return e}var m=h(null,{path:"/"});function g(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function y(e,t){var n=e.path,r=e.query;void 0===r&&(r={});var o=e.hash;return void 0===o&&(o=""),(n||"/")+(t||p)(r)+o}function b(e,t,n){return t===m?e===t:!!t&&(e.path&&t.path?e.path.replace(d,"")===t.path.replace(d,"")&&(n||e.hash===t.hash&&_(e.query,t.query)):!(!e.name||!t.name)&&(e.name===t.name&&(n||e.hash===t.hash&&_(e.query,t.query)&&_(e.params,t.params))))}function _(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((function(n,o){var i=e[n];if(r[o]!==n)return!1;var a=t[n];return null==i||null==a?i===a:"object"==typeof i&&"object"==typeof a?_(i,a):String(i)===String(a)}))}function x(e){for(var t=0;t=0&&(t=e.slice(r),e=e.slice(0,r));var o=e.indexOf("?");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{path:e,query:n,hash:t}}(i.path||""),p=t&&t.path||"/",d=l.path?C(l.path,p,n||i.append):p,h=function(e,t,n){void 0===t&&(t={});var r,o=n||f;try{r=o(e||"")}catch(e){r={}}for(var i in t){var a=t[i];r[i]=Array.isArray(a)?a.map(u):u(a)}return r}(l.query,i.query,r&&r.options.parseQuery),v=i.hash||l.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:d,query:h,hash:v}}var H,W=function(){},G={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,s=i.route,c=i.href,l={},u=n.options.linkActiveClass,f=n.options.linkExactActiveClass,p=null==u?"router-link-active":u,v=null==f?"router-link-exact-active":f,m=null==this.activeClass?p:this.activeClass,g=null==this.exactActiveClass?v:this.exactActiveClass,y=s.redirectedFrom?h(null,q(s.redirectedFrom),null,n):s;l[g]=b(r,y,this.exactPath),l[m]=this.exact||this.exactPath?l[g]:function(e,t){return 0===e.path.replace(d,"/").indexOf(t.path.replace(d,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,y);var _=l[g]?this.ariaCurrentValue:null,x=function(e){K(e)&&(t.replace?n.replace(a,W):n.push(a,W))},w={click:K};Array.isArray(this.event)?this.event.forEach((function(e){w[e]=x})):w[this.event]=x;var k={class:l},C=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:l[m],isExactActive:l[g]});if(C){if(1===C.length)return C[0];if(C.length>1||!C.length)return 0===C.length?e():e("span",{},C)}if("a"===this.tag)k.on=w,k.attrs={href:c,"aria-current":_};else{var $=function e(t){var n;if(t)for(var r=0;r-1&&(s.params[p]=n.params[p]);return s.path=V(u.path,s.params),c(u,s,a)}if(s.path){s.params={};for(var d=0;d-1}function $e(e,t){return Ce(e)&&e._isRouter&&(null==t||e.type===t)}function Oe(e,t,n){var r=function(o){o>=e.length?n():e[o]?t(e[o],(function(){r(o+1)})):r(o+1)};r(0)}function Pe(e){return function(t,n,r){var o=!1,i=0,a=null;Se(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){o=!0,i++;var c,l=Ae((function(t){var o;((o=t).__esModule||Ee&&"Module"===o[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:H.extend(t),n.components[s]=t,--i<=0&&r()})),u=Ae((function(e){var t="Failed to resolve async component "+s+": "+e;a||(a=Ce(e)?e:new Error(t),r(a))}));try{c=e(l,u)}catch(e){u(e)}if(c)if("function"==typeof c.then)c.then(l,u);else{var f=c.component;f&&"function"==typeof f.then&&f.then(l,u)}}})),o||r()}}function Se(e,t){return je(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function je(e){return Array.prototype.concat.apply([],e)}var Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Ae(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var Te=function(e,t){this.router=e,this.base=function(e){if(!e)if(J){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Le(e,t,n,r){var o=Se(e,(function(e,r,o,i){var a=function(e,t){"function"!=typeof e&&(e=H.extend(e));return e.options[t]}(e,t);if(a)return Array.isArray(a)?a.map((function(e){return n(e,r,o,i)})):n(a,r,o,i)}));return je(r?o.reverse():o)}function Re(e,t){if(t)return function(){return e.apply(t,arguments)}}Te.prototype.listen=function(e){this.cb=e},Te.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},Te.prototype.onError=function(e){this.errorCbs.push(e)},Te.prototype.transitionTo=function(e,t,n){var r,o=this;try{r=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var i=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),t&&t(r),o.ensureURL(),o.router.afterHooks.forEach((function(e){e&&e(r,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(e){e(r)})))}),(function(e){n&&n(e),e&&!o.ready&&($e(e,be.redirected)&&i===m||(o.ready=!0,o.readyErrorCbs.forEach((function(t){t(e)}))))}))},Te.prototype.confirmTransition=function(e,t,n){var r=this,o=this.current;this.pending=e;var i,a,s=function(e){!$e(e)&&Ce(e)&&(r.errorCbs.length?r.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},c=e.matched.length-1,l=o.matched.length-1;if(b(e,o)&&c===l&&e.matched[c]===o.matched[l])return this.ensureURL(),e.hash&&se(this.router,o,e,!1),s(((a=we(i=o,e,be.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",a));var u=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n0)){var t=this.router,n=t.options.scrollBehavior,r=me&&n;r&&this.listeners.push(ae());var o=function(){var n=e.current,o=Ue(e.base);e.current===m&&o===e._startLocation||e.transitionTo(o,(function(e){r&&se(t,e,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ge($(r.base+e.fullPath)),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ye($(r.base+e.fullPath)),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(Ue(this.base)!==this.current.fullPath){var t=$(this.base+this.current.fullPath);e?ge(t):ye(t)}},t.prototype.getCurrentLocation=function(){return Ue(this.base)},t}(Te);function Ue(e){var t=window.location.pathname,n=t.toLowerCase(),r=e.toLowerCase();return!e||n!==r&&0!==n.indexOf($(r+"/"))||(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var Ie=function(e){function t(t,n,r){e.call(this,t,n),r&&function(e){var t=Ue(e);if(!/^\/#/.test(t))return window.location.replace($(e+"/#"+t)),!0}(this.base)||De()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=me&&t;n&&this.listeners.push(ae());var r=function(){var t=e.current;De()&&e.transitionTo(Fe(),(function(r){n&&se(e.router,r,t,!0),me||ze(r.fullPath)}))},o=me?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){Be(e.fullPath),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){ze(e.fullPath),se(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;Fe()!==t&&(e?Be(t):ze(t))},t.prototype.getCurrentLocation=function(){return Fe()},t}(Te);function De(){var e=Fe();return"/"===e.charAt(0)||(ze("/"+e),!1)}function Fe(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function Ne(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function Be(e){me?ge(Ne(e)):window.location.hash=e}function ze(e){me?ye(Ne(e)):window.location.replace(Ne(e))}var Ve=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach((function(t){t&&t(r,e)}))}),(function(e){$e(e,be.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Te),qe=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Z(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!me&&!1!==e.fallback,this.fallback&&(t="hash"),J||(t="abstract"),this.mode=t,t){case"history":this.history=new Me(this,e.base);break;case"hash":this.history=new Ie(this,e.base,this.fallback);break;case"abstract":this.history=new Ve(this,e.base);break;default:0}},He={currentRoute:{configurable:!0}};qe.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},He.currentRoute.get=function(){return this.history&&this.history.current},qe.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof Me||n instanceof Ie){var r=function(e){n.setupListeners(),function(e){var r=n.current,o=t.options.scrollBehavior;me&&o&&"fullPath"in e&&se(t,e,r,!1)}(e)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},qe.prototype.beforeEach=function(e){return Ge(this.beforeHooks,e)},qe.prototype.beforeResolve=function(e){return Ge(this.resolveHooks,e)},qe.prototype.afterEach=function(e){return Ge(this.afterHooks,e)},qe.prototype.onReady=function(e,t){this.history.onReady(e,t)},qe.prototype.onError=function(e){this.history.onError(e)},qe.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},qe.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},qe.prototype.go=function(e){this.history.go(e)},qe.prototype.back=function(){this.go(-1)},qe.prototype.forward=function(){this.go(1)},qe.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},qe.prototype.resolve=function(e,t,n){var r=q(e,t=t||this.history.current,n,this),o=this.match(r,t),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?$(e+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},qe.prototype.getRoutes=function(){return this.matcher.getRoutes()},qe.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},qe.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(qe.prototype,He);var We=qe;function Ge(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}qe.install=function e(t){if(!e.installed||H!==t){e.installed=!0,H=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",w),t.component("RouterLink",G);var o=t.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},qe.version="3.6.5",qe.isNavigationFailure=$e,qe.NavigationFailureType=be,qe.START_LOCATION=m,J&&window.Vue&&window.Vue.use(qe);var Ke={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(42)]).then(n.bind(null,251)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(28)]).then(n.bind(null,184)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(50)]).then(n.bind(null,158)),"components/Home":()=>Promise.all([n.e(0),n.e(32)]).then(n.bind(null,332)),"components/NavLink":()=>n.e(56).then(n.bind(null,156)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(27)]).then(n.bind(null,212)),"components/Navbar":()=>Promise.all([n.e(0),n.e(5),n.e(43)]).then(n.bind(null,541)),"components/Page":()=>Promise.all([n.e(0),n.e(26)]).then(n.bind(null,333)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(33)]).then(n.bind(null,219)),"components/PageNav":()=>Promise.all([n.e(0),n.e(29)]).then(n.bind(null,220)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(24)]).then(n.bind(null,334)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(51)]).then(n.bind(null,339)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,213)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(39)]).then(n.bind(null,185)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,179)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,564)),"global-components/CodeBlock":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,554)),"global-components/CodeGroup":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,555)),"layouts/404":()=>n.e(18).then(n.bind(null,556)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,552)),NotFound:()=>n.e(18).then(n.bind(null,556)),Layout:()=>Promise.all([n.e(0),n.e(5),n.e(9),n.e(11)]).then(n.bind(null,552))},Je={"v-4e72e1d8":()=>n.e(62).then(n.bind(null,565)),"v-21917184":()=>n.e(64).then(n.bind(null,566)),"v-045b6323":()=>n.e(65).then(n.bind(null,567)),"v-14e901dc":()=>n.e(63).then(n.bind(null,568)),"v-acc004fa":()=>n.e(57).then(n.bind(null,569)),"v-3e291b63":()=>n.e(66).then(n.bind(null,570)),"v-688ffb43":()=>n.e(67).then(n.bind(null,571)),"v-700f1b88":()=>n.e(68).then(n.bind(null,572)),"v-78536523":()=>n.e(58).then(n.bind(null,573)),"v-7ffae7c8":()=>n.e(59).then(n.bind(null,574)),"v-21de1e8c":()=>n.e(69).then(n.bind(null,575)),"v-adb4d3cc":()=>n.e(71).then(n.bind(null,576)),"v-779fe818":()=>n.e(73).then(n.bind(null,577)),"v-974804cc":()=>n.e(72).then(n.bind(null,578)),"v-76e62a34":()=>n.e(70).then(n.bind(null,579)),"v-23074efc":()=>n.e(74).then(n.bind(null,580)),"v-6b6d7bae":()=>n.e(75).then(n.bind(null,581)),"v-a5deb388":()=>n.e(76).then(n.bind(null,582)),"v-02b9217c":()=>n.e(77).then(n.bind(null,583)),"v-a1f70a7a":()=>n.e(52).then(n.bind(null,584)),"v-2ac201a4":()=>n.e(37).then(n.bind(null,585)),"v-d4caec3c":()=>n.e(78).then(n.bind(null,586)),"v-0937d47a":()=>n.e(79).then(n.bind(null,587)),"v-c5fcf990":()=>n.e(80).then(n.bind(null,588)),"v-62bfd25c":()=>n.e(38).then(n.bind(null,589)),"v-ddb09444":()=>n.e(53).then(n.bind(null,590)),"v-2b5b0ed8":()=>n.e(54).then(n.bind(null,591)),"v-65bcb302":()=>n.e(81).then(n.bind(null,592)),"v-4a7f74ac":()=>n.e(55).then(n.bind(null,593)),"v-5041b7a0":()=>n.e(82).then(n.bind(null,594)),"v-589f7f88":()=>n.e(83).then(n.bind(null,595)),"v-697f60bc":()=>n.e(60).then(n.bind(null,596)),"v-9fcd1034":()=>n.e(84).then(n.bind(null,597)),"v-e3af3008":()=>n.e(40).then(n.bind(null,598))};function Xe(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}const Ye=/-(\w)/g,Ze=Xe(e=>e.replace(Ye,(e,t)=>t?t.toUpperCase():"")),Qe=/\B([A-Z])/g,et=Xe(e=>e.replace(Qe,"-$1").toLowerCase()),tt=Xe(e=>e.charAt(0).toUpperCase()+e.slice(1));function nt(e,t){if(!t)return;if(e(t))return e(t);return t.includes("-")?e(tt(Ze(t))):e(tt(t))||e(et(t))}const rt=Object.assign({},Ke,Je),ot=e=>rt[e],it=e=>Je[e],at=e=>Ke[e],st=e=>r.a.component(e);function ct(e){return nt(it,e)}function lt(e){return nt(at,e)}function ut(e){return nt(ot,e)}function ft(e){return nt(st,e)}function pt(...e){return Promise.all(e.filter(e=>e).map(async e=>{if(!ft(e)&&ut(e)){const t=await ut(e)();r.a.component(e,t.default)}}))}function dt(e,t){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[e]=t)}var ht=n(47),vt=n.n(ht),mt=n(48),gt=n.n(mt),yt={created(){if(this.siteMeta=this.$site.headTags.filter(([e])=>"meta"===e).map(([e,t])=>t),this.$ssrContext){const t=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(e=t)?e.map(e=>{let t="{t+=` ${n}="${gt()(e[n])}"`}),t+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_t(this.$canonicalUrl)}var e},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const e=this.getMergedMetaTags();this.currentMetaTags=xt(e,this.currentMetaTags)},getMergedMetaTags(){const e=this.$page.frontmatter.meta||[];return vt()([{name:"description",content:this.$description}],e,this.siteMeta,wt)},updateCanonicalLink(){bt(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_t(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){xt(null,this.currentMetaTags),bt()}};function bt(){const e=document.querySelector("link[rel='canonical']");e&&e.remove()}function _t(e=""){return e?``:""}function xt(e,t){if(t&&[...t].filter(e=>e.parentNode===document.head).forEach(e=>document.head.removeChild(e)),e)return e.map(e=>{const t=document.createElement("meta");return Object.keys(e).forEach(n=>{t.setAttribute(n,e[n])}),document.head.appendChild(t),t})}function wt(e){for(const t of["name","property","itemprop"])if(e.hasOwnProperty(t))return e[t]+t;return JSON.stringify(e)}var kt=n(13),Ct=n.n(kt),$t={mounted(){Ct.a.configure({showSpinner:!1}),this.$router.beforeEach((e,t,n)=>{e.path===t.path||r.a.component(e.name)||Ct.a.start(),n()}),this.$router.afterEach(()=>{Ct.a.done(),this.isSidebarOpen=!1})}},Ot=n(49),Pt={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(Ot)()((function(){this.setActiveHash()}),300),setActiveHash(){const e=[].slice.call(document.querySelectorAll(".sidebar-link")),t=[].slice.call(document.querySelectorAll(".header-anchor")).filter(t=>e.some(e=>e.hash===t.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let e=0;e=i.parentElement.offsetTop+10&&(!a||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},St={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:()=>({success:!1,originalBackground:null,originalTransition:null}),computed:{alignStyle(){let e={};return e[this.options.align]="7.5px",e},iconClass(){return this.options.staticIcon?"":"hover"}},mounted(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},copyToClipboard(e){if(navigator.clipboard)navigator.clipboard.writeText(this.code).then(()=>{this.setSuccessTransitions()},()=>{});else{let e=document.createElement("textarea");document.body.appendChild(e),e.value=this.code,e.select(),document.execCommand("Copy"),e.remove(),this.setSuccessTransitions()}},setSuccessTransitions(){if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";let e=this.hexToRgb(this.options.backgroundColor);this.parent.style.background=`rgba(${e.r}, ${e.g}, ${e.b}, 0.1)`}this.success=!0,this.successTimeout=setTimeout(()=>{this.options.backgroundTransition&&(this.parent.style.background=this.originalBackground,this.parent.style.transition=this.originalTransition),this.success=!1},500)}}},jt=(n(146),n(4)),Et=Object(jt.a)(St,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"code-copy"},[t("svg",{class:e.iconClass,style:e.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:e.copyToClipboard}},[t("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),e._v(" "),t("path",{attrs:{fill:e.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),e._v(" "),t("span",{class:e.success?"success":"",style:e.alignStyle},[e._v("\n "+e._s(e.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,At=(n(147),[yt,$t,Pt,{updated(){this.update()},methods:{update(){setTimeout(()=>{document.querySelectorAll('div[class*="language-"] pre').forEach(e=>{if(e.classList.contains("code-copy-added"))return;let t=new(r.a.extend(Et));t.options={align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1},t.code=e.innerText,t.parent=e,t.$mount(),e.classList.add("code-copy-added"),e.appendChild(t.$el)})},100)}}}]),Tt={name:"GlobalLayout",computed:{layout(){const e=this.getLayout();return dt("layout",e),r.a.component(e)}},methods:{getLayout(){if(this.$page.path){const e=this.$page.frontmatter.layout;return e&&(this.$vuepress.getLayoutAsyncComponent(e)||this.$vuepress.getVueComponent(e))?e:"Layout"}return"NotFound"}}},Lt=Object(jt.a)(Tt,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(e,t,n){switch(t){case"components":e[t]||(e[t]={}),Object.assign(e[t],n);break;case"mixins":e[t]||(e[t]=[]),e[t].push(...n);break;default:throw new Error("Unknown option name.")}}(Lt,"mixins",At);const Rt=[{name:"v-4e72e1d8",path:"/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-4e72e1d8").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-21917184",path:"/data-collections/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-21917184").then(n)}},{path:"/data-collections/index.html",redirect:"/data-collections/"},{name:"v-045b6323",path:"/federation/accounting.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-045b6323").then(n)}},{name:"v-14e901dc",path:"/api/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-14e901dc").then(n)}},{path:"/api/index.html",redirect:"/api/"},{name:"v-acc004fa",path:"/federation/backends/api.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-acc004fa").then(n)}},{name:"v-3e291b63",path:"/federation/backends/collections.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-3e291b63").then(n)}},{name:"v-688ffb43",path:"/federation/backends/fileformats.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-688ffb43").then(n)}},{name:"v-700f1b88",path:"/federation/backends/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-700f1b88").then(n)}},{path:"/federation/backends/index.html",redirect:"/federation/backends/"},{name:"v-78536523",path:"/federation/backends/processes.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-78536523").then(n)}},{name:"v-7ffae7c8",path:"/federation/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-7ffae7c8").then(n)}},{path:"/federation/index.html",redirect:"/federation/"},{name:"v-21de1e8c",path:"/file-formats/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-21de1e8c").then(n)}},{path:"/file-formats/index.html",redirect:"/file-formats/"},{name:"v-adb4d3cc",path:"/getting-started/editor/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-adb4d3cc").then(n)}},{path:"/getting-started/editor/index.html",redirect:"/getting-started/editor/"},{name:"v-779fe818",path:"/getting-started/jupyterlab/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-779fe818").then(n)}},{path:"/getting-started/jupyterlab/index.html",redirect:"/getting-started/jupyterlab/"},{name:"v-974804cc",path:"/getting-started/javascript/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-974804cc").then(n)}},{path:"/getting-started/javascript/index.html",redirect:"/getting-started/javascript/"},{name:"v-76e62a34",path:"/getting-started/client-side-processing/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-76e62a34").then(n)}},{path:"/getting-started/client-side-processing/index.html",redirect:"/getting-started/client-side-processing/"},{name:"v-23074efc",path:"/getting-started/python/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-23074efc").then(n)}},{path:"/getting-started/python/index.html",redirect:"/getting-started/python/"},{name:"v-6b6d7bae",path:"/getting-started/python/shiny.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-6b6d7bae").then(n)}},{name:"v-a5deb388",path:"/getting-started/r/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-a5deb388").then(n)}},{path:"/getting-started/r/index.html",redirect:"/getting-started/r/"},{name:"v-02b9217c",path:"/processes/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-02b9217c").then(n)}},{path:"/processes/index.html",redirect:"/processes/"},{name:"v-a1f70a7a",path:"/join/free_trial.html",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-a1f70a7a").then(n)}},{name:"v-2ac201a4",path:"/usecases/Fractional-canopy-Cover/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-2ac201a4").then(n)}},{path:"/usecases/Fractional-canopy-Cover/index.html",redirect:"/usecases/Fractional-canopy-Cover/"},{name:"v-d4caec3c",path:"/usecases/ard/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-d4caec3c").then(n)}},{path:"/usecases/ard/index.html",redirect:"/usecases/ard/"},{name:"v-0937d47a",path:"/usecases/ard/msi/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-0937d47a").then(n)}},{path:"/usecases/ard/msi/index.html",redirect:"/usecases/ard/msi/"},{name:"v-c5fcf990",path:"/usecases/ard/sar/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-c5fcf990").then(n)}},{path:"/usecases/ard/sar/index.html",redirect:"/usecases/ard/sar/"},{name:"v-62bfd25c",path:"/usecases/ard/sen2like/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-62bfd25c").then(n)}},{path:"/usecases/ard/sen2like/index.html",redirect:"/usecases/ard/sen2like/"},{name:"v-ddb09444",path:"/usecases/crop-conditions/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-ddb09444").then(n)}},{path:"/usecases/crop-conditions/index.html",redirect:"/usecases/crop-conditions/"},{name:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-2b5b0ed8").then(n)}},{path:"/usecases/forest-change-detection/index.html",redirect:"/usecases/forest-change-detection/"},{name:"v-65bcb302",path:"/usecases/crop-classification/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-65bcb302").then(n)}},{path:"/usecases/crop-classification/index.html",redirect:"/usecases/crop-classification/"},{name:"v-4a7f74ac",path:"/usecases/gfm/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-4a7f74ac").then(n)}},{path:"/usecases/gfm/index.html",redirect:"/usecases/gfm/"},{name:"v-5041b7a0",path:"/usecases/landcover/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-5041b7a0").then(n)}},{path:"/usecases/landcover/index.html",redirect:"/usecases/landcover/"},{name:"v-589f7f88",path:"/usecases/large-scale-processing/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-589f7f88").then(n)}},{path:"/usecases/large-scale-processing/index.html",redirect:"/usecases/large-scale-processing/"},{name:"v-697f60bc",path:"/usecases/no2-monitoring/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-697f60bc").then(n)}},{path:"/usecases/no2-monitoring/index.html",redirect:"/usecases/no2-monitoring/"},{name:"v-9fcd1034",path:"/workspaces/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-9fcd1034").then(n)}},{path:"/workspaces/index.html",redirect:"/workspaces/"},{name:"v-e3af3008",path:"/usecases/vessel-detection/",component:Lt,beforeEnter:(e,t,n)=>{pt("Layout","v-e3af3008").then(n)}},{path:"/usecases/vessel-detection/index.html",redirect:"/usecases/vessel-detection/"},{path:"*",component:Lt}],Mt={title:"openEO Platform Documentation",description:"One of the most important properties for a future-oriented platform on earth observation is the orientation towards simple operation, with a special focus on efficiency of evaluation and availability. Complexity is kept hidden in the background to direct your focus on the data. This is done on one hand by the use of an aggregate API to access the infrastructure, but also by improved user-faced graphical processing. For access to the API, the user has the option to incorporate his own preferences, by choosing between several clients.",base:"/",headTags:[],pages:[{title:"Home",frontmatter:{home:!0},regularPath:"/",relativePath:"README.md",key:"v-4e72e1d8",path:"/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/data-collections/",relativePath:"data-collections/index.md",key:"v-21917184",path:"/data-collections/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Platform credit usage",frontmatter:{},regularPath:"/federation/accounting.html",relativePath:"federation/accounting.md",key:"v-045b6323",path:"/federation/accounting.html",headers:[{level:2,title:"Platform credit rates",slug:"platform-credit-rates"},{level:2,title:"Estimating resource usage",slug:"estimating-resource-usage"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/api/",relativePath:"api/index.md",key:"v-14e901dc",path:"/api/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation API",frontmatter:{},regularPath:"/federation/backends/api.html",relativePath:"federation/backends/api.md",key:"v-acc004fa",path:"/federation/backends/api.html",headers:[{level:2,title:"Profiles",slug:"profiles"},{level:3,title:"LP: Required for openEO Platform",slug:"lp-required-for-openeo-platform"},{level:2,title:"Authentication and authorization",slug:"authentication-and-authorization"},{level:3,title:"Authentication",slug:"authentication"},{level:3,title:"Authorization",slug:"authorization"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Collections",frontmatter:{},regularPath:"/federation/backends/collections.html",relativePath:"federation/backends/collections.md",key:"v-3e291b63",path:"/federation/backends/collections.html",headers:[{level:2,title:"Collection availability",slug:"collection-availability"},{level:3,title:"Requirements for non-experimental collections",slug:"requirements-for-non-experimental-collections"},{level:2,title:"Harmonization",slug:"harmonization"},{level:3,title:"Common naming convention",slug:"common-naming-convention"},{level:3,title:"Sentinel2-L2A",slug:"sentinel2-l2a"},{level:3,title:"Common Properties",slug:"common-properties"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"File Formats",frontmatter:{},regularPath:"/federation/backends/fileformats.html",relativePath:"federation/backends/fileformats.md",key:"v-688ffb43",path:"/federation/backends/fileformats.html",headers:[{level:2,title:"Best practices file formats",slug:"best-practices-file-formats"},{level:3,title:"Raster Formats",slug:"raster-formats"},{level:2,title:"Federation agreement file formats",slug:"federation-agreement-file-formats"},{level:3,title:"GeoTiff",slug:"geotiff"},{level:3,title:"netCDF",slug:"netcdf"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation Contract",frontmatter:{},regularPath:"/federation/backends/",relativePath:"federation/backends/index.md",key:"v-700f1b88",path:"/federation/backends/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Processes",frontmatter:{},regularPath:"/federation/backends/processes.html",relativePath:"federation/backends/processes.md",key:"v-78536523",path:"/federation/backends/processes.html",headers:[{level:3,title:"Requirements per Profile",slug:"requirements-per-profile"},{level:2,title:"L2P: Required - openEO Platform",slug:"l2p-required-openeo-platform"},{level:2,title:"L3P: Advanced - openEO Platform",slug:"l3p-advanced-openeo-platform"},{level:2,title:"L4P: Complete - openEO Platform",slug:"l4p-complete-openeo-platform"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Federation Aspects and Known Issues",frontmatter:{},regularPath:"/federation/",relativePath:"federation/index.md",key:"v-7ffae7c8",path:"/federation/",headers:[{level:2,title:"Data Collections",slug:"data-collections"},{level:3,title:"Terrascope",slug:"terrascope"},{level:3,title:"Sentinel Hub",slug:"sentinel-hub"},{level:3,title:"EODC",slug:"eodc"},{level:3,title:"Enforce back-end selection for common collections",slug:"enforce-back-end-selection-for-common-collections"},{level:2,title:"Processes",slug:"processes"},{level:2,title:"File formats",slug:"file-formats"},{level:2,title:"On-demand-preview",slug:"on-demand-preview"},{level:2,title:"Batch jobs",slug:"batch-jobs"},{level:3,title:"Managed job splitting",slug:"managed-job-splitting"},{level:3,title:"Validity of signed URLs in batch job results",slug:"validity-of-signed-urls-in-batch-job-results"},{level:3,title:"Customizing batch job resources on Terrascope",slug:"customizing-batch-job-resources-on-terrascope"},{level:3,title:"Batch job results on Sentinel Hub",slug:"batch-job-results-on-sentinel-hub"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{sidebar:!1,stripCSS:!0},regularPath:"/file-formats/",relativePath:"file-formats/index.md",key:"v-21de1e8c",path:"/file-formats/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Platform Editor",frontmatter:{},regularPath:"/getting-started/editor/",relativePath:"getting-started/editor/index.md",key:"v-adb4d3cc",path:"/getting-started/editor/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with openEO Platform in JupyterLab (Python)",frontmatter:{},regularPath:"/getting-started/jupyterlab/",relativePath:"getting-started/jupyterlab/index.md",key:"v-779fe818",path:"/getting-started/jupyterlab/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO JavaScript Client",frontmatter:{},regularPath:"/getting-started/javascript/",relativePath:"getting-started/javascript/index.md",key:"v-974804cc",path:"/getting-started/javascript/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connecting to openEO Platform",slug:"connecting-to-openeo-platform"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Python Client Client Side Processing",frontmatter:{},regularPath:"/getting-started/client-side-processing/",relativePath:"getting-started/client-side-processing/index.md",key:"v-76e62a34",path:"/getting-started/client-side-processing/",headers:[{level:2,title:"Background",slug:"background"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Usage",slug:"usage"},{level:3,title:"STAC Collections and Items",slug:"stac-collections-and-items"},{level:3,title:"Local Collections",slug:"local-collections"},{level:3,title:"Local Processing",slug:"local-processing"},{level:2,title:"Client-Side Processing Example Notebooks",slug:"client-side-processing-example-notebooks"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO Python Client",frontmatter:{},regularPath:"/getting-started/python/",relativePath:"getting-started/python/index.md",key:"v-23074efc",path:"/getting-started/python/",headers:[{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Working with Datacubes",slug:"working-with-datacubes"},{level:3,title:"Creating a Datacube",slug:"creating-a-datacube"},{level:3,title:"Applying processes",slug:"applying-processes"},{level:3,title:"Defining output format",slug:"defining-output-format"},{level:2,title:"Execution",slug:"execution"},{level:3,title:"Batch job execution",slug:"batch-job-execution"},{level:2,title:"Additional Information",slug:"additional-information"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Run openEO processes in Shiny apps",frontmatter:{},regularPath:"/getting-started/python/shiny.html",relativePath:"getting-started/python/shiny.md",key:"v-6b6d7bae",path:"/getting-started/python/shiny.html",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Get started with the openEO R Client",frontmatter:{},regularPath:"/getting-started/r/",relativePath:"getting-started/r/index.md",key:"v-a5deb388",path:"/getting-started/r/",headers:[{level:2,title:"Useful links",slug:"useful-links"},{level:2,title:"Installation",slug:"installation"},{level:2,title:"Connect to openEO Platform and explore",slug:"connect-to-openeo-platform-and-explore"},{level:3,title:"Collections",slug:"collections"},{level:3,title:"Processes",slug:"processes"},{level:2,title:"Authentication",slug:"authentication"},{level:2,title:"Creating a (user-defined) process",slug:"creating-a-user-defined-process"},{level:2,title:"Batch Job Management",slug:"batch-job-management"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{frontmatter:{fullpage:!0,stripCSS:!0},regularPath:"/processes/",relativePath:"processes/index.md",key:"v-02b9217c",path:"/processes/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Registration",frontmatter:{},regularPath:"/join/free_trial.html",relativePath:"join/free_trial.md",key:"v-a1f70a7a",path:"/join/free_trial.html",headers:[{level:2,title:"Connect with EGI Check-in",slug:"connect-with-egi-check-in"},{level:2,title:"EOPlaza",slug:"eoplaza"},{level:2,title:"Working with openEO Platform",slug:"working-with-openeo-platform"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Fractional Canopy Cover",frontmatter:{},regularPath:"/usecases/Fractional-canopy-Cover/",relativePath:"usecases/Fractional-canopy-Cover/index.md",key:"v-2ac201a4",path:"/usecases/Fractional-canopy-Cover/",headers:[{level:2,title:"Fractional Canopy Cover",slug:"fractional-canopy-cover"},{level:2,title:"Data Preparation",slug:"data-preparation"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Predicted Fractional Canopy Cover",slug:"predicted-fractional-canopy-cover"},{level:2,title:"Validation",slug:"validation"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data (ARD)",frontmatter:{},regularPath:"/usecases/ard/",relativePath:"usecases/ard/index.md",key:"v-d4caec3c",path:"/usecases/ard/",lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data for Multi-Spectral Imagery (Sentinel-2)",frontmatter:{},regularPath:"/usecases/ard/msi/",relativePath:"usecases/ard/msi/index.md",key:"v-0937d47a",path:"/usecases/ard/msi/",headers:[{level:2,title:"Atmospheric correction",slug:"atmospheric-correction"},{level:3,title:"Reference implementations",slug:"reference-implementations"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Analysis-Ready Data for SAR (Sentinel-1)",frontmatter:{},regularPath:"/usecases/ard/sar/",relativePath:"usecases/ard/sar/index.md",key:"v-c5fcf990",path:"/usecases/ard/sar/",headers:[{level:2,title:"Backscatter computation",slug:"backscatter-computation"},{level:2,title:"Reference implementations",slug:"reference-implementations"},{level:3,title:"CARD4L NRB for SENTINEL1_GRD collection (provided by Sentinel Hub)",slug:"card4l-nrb-for-sentinel1-grd-collection-provided-by-sentinel-hub"},{level:3,title:"Orfeo for other GRD collections (provided by VITO / TerraScope)",slug:"orfeo-for-other-grd-collections-provided-by-vito-terrascope"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Sen2Like",frontmatter:{},regularPath:"/usecases/ard/sen2like/",relativePath:"usecases/ard/sen2like/index.md",key:"v-62bfd25c",path:"/usecases/ard/sen2like/",headers:[{level:2,title:"1. sen2like for RGB",slug:"_1-sen2like-for-rgb"},{level:3,title:"openEO sen2like processing",slug:"openeo-sen2like-processing"},{level:3,title:"Explore the openEO L2F results",slug:"explore-the-openeo-l2f-results"},{level:2,title:"2. sen2like for NDVI",slug:"_2-sen2like-for-ndvi"},{level:3,title:"Explore the openEO L2F NDVI results",slug:"explore-the-openeo-l2f-ndvi-results"},{level:2,title:"3. Sen2Like processing in the openeo web editor",slug:"_3-sen2like-processing-in-the-openeo-web-editor"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Crop conditions",frontmatter:{},regularPath:"/usecases/crop-conditions/",relativePath:"usecases/crop-conditions/index.md",key:"v-ddb09444",path:"/usecases/crop-conditions/",headers:[{level:2,title:"1. data preparation",slug:"_1-data-preparation"},{level:2,title:"2. Sen2like processing",slug:"_2-sen2like-processing"},{level:2,title:"3. Running the Job",slug:"_3-running-the-job"},{level:2,title:"4. Explore the openEO results",slug:"_4-explore-the-openeo-results"},{level:2,title:"5. Indices calculations",slug:"_5-indices-calculations"},{level:3,title:"5.1 Leaf Area Index (LAI)",slug:"_5-1-leaf-area-index-lai"},{level:3,title:"5.2\tLeaf Chlorophyll Content (CAB)",slug:"_5-2leaf-chlorophyll-content-cab"},{level:3,title:"5.3\tFraction of green Vegetation Cover (FCOVER)",slug:"_5-3fraction-of-green-vegetation-cover-fcover"},{level:3,title:"5.4\tFraction of Absorbed Photosynthetically Active Radiation (FAPAR)",slug:"_5-4fraction-of-absorbed-photosynthetically-active-radiation-fapar"},{level:3,title:"5.5\tNormalized difference vegetation index",slug:"_5-5normalized-difference-vegetation-index"},{level:3,title:"5.6 Explore the results",slug:"_5-6-explore-the-results"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Forest Change Detection",frontmatter:{},regularPath:"/usecases/forest-change-detection/",relativePath:"usecases/forest-change-detection/index.md",key:"v-2b5b0ed8",path:"/usecases/forest-change-detection/",headers:[{level:2,title:"Data preparation",slug:"data-preparation"},{level:2,title:"Seasonal curve fitting",slug:"seasonal-curve-fitting"},{level:2,title:"Predicting values",slug:"predicting-values"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Crop Classification",frontmatter:{},regularPath:"/usecases/crop-classification/",relativePath:"usecases/crop-classification/index.md",key:"v-65bcb302",path:"/usecases/crop-classification/",headers:[{level:2,title:"Preprocessing & feature engineering",slug:"preprocessing-feature-engineering"},{level:3,title:"Data preparation",slug:"data-preparation"},{level:3,title:"Computing temporal features",slug:"computing-temporal-features"},{level:2,title:"Model training",slug:"model-training"},{level:2,title:"Classification",slug:"classification"},{level:3,title:"Rule-based classification",slug:"rule-based-classification"},{level:3,title:"Supervised classification using Random Forest",slug:"supervised-classification-using-random-forest"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Global Flood Monitoring",frontmatter:{},regularPath:"/usecases/gfm/",relativePath:"usecases/gfm/index.md",key:"v-4a7f74ac",path:"/usecases/gfm/",headers:[{level:2,title:"Output layers used in openEO",slug:"output-layers-used-in-openeo"},{level:2,title:"Links",slug:"links"},{level:2,title:"Compute the maximum flood extent",slug:"compute-the-maximum-flood-extent"},{level:2,title:"Explore how the flood extent relates to the Global Human Settlement Built-up layer",slug:"explore-how-the-flood-extent-relates-to-the-global-human-settlement-built-up-layer"},{level:2,title:"Statistical analysis",slug:"statistical-analysis"},{level:2,title:"Observed water (flood_extent + refwater)",slug:"observed-water-flood-extent-refwater"},{level:2,title:"Explore the observed water",slug:"explore-the-observed-water"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Dynamic land cover service",frontmatter:{},regularPath:"/usecases/landcover/",relativePath:"usecases/landcover/index.md",key:"v-5041b7a0",path:"/usecases/landcover/",headers:[{level:2,title:"Methodology",slug:"methodology"},{level:3,title:"Reference data",slug:"reference-data"},{level:3,title:"Input data",slug:"input-data"},{level:3,title:"Preprocessing",slug:"preprocessing"},{level:3,title:"Feature engineering",slug:"feature-engineering"},{level:3,title:"Model",slug:"model"},{level:2,title:"Implementation",slug:"implementation"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Large scale processing",frontmatter:{},regularPath:"/usecases/large-scale-processing/",relativePath:"usecases/large-scale-processing/index.md",key:"v-589f7f88",path:"/usecases/large-scale-processing/",headers:[{level:2,title:"Relevant openEO features",slug:"relevant-openeo-features"},{level:2,title:"Preparation",slug:"preparation"},{level:2,title:"Prepare tiling grid",slug:"prepare-tiling-grid"},{level:2,title:"Prepare job attributes",slug:"prepare-job-attributes"},{level:2,title:"Tuning your processing job",slug:"tuning-your-processing-job"},{level:2,title:"Starting map production",slug:"starting-map-production"},{level:2,title:"Errors during production",slug:"errors-during-production"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"NO₂ monitoring",frontmatter:{},regularPath:"/usecases/no2-monitoring/",relativePath:"usecases/no2-monitoring/index.md",key:"v-697f60bc",path:"/usecases/no2-monitoring/",headers:[{level:2,title:"Shiny apps (R and Python)",slug:"shiny-apps-r-and-python"},{level:3,title:"Time-Series Analyser",slug:"time-series-analyser"},{level:3,title:"Map Maker for one Snapshot",slug:"map-maker-for-one-snapshot"},{level:3,title:"Spacetime Animation",slug:"spacetime-animation"},{level:2,title:"Basic NO₂ analysis in Python, R and JavaScript",slug:"basic-no2-analysis-in-python-r-and-javascript"},{level:3,title:"1. Load a data cube",slug:"_1-load-a-data-cube"},{level:3,title:"2. Fill gaps",slug:"_2-fill-gaps"},{level:3,title:"3. Smoothen values (optional)",slug:"_3-smoothen-values-optional"},{level:3,title:"4. What do you want to know?",slug:"_4-what-do-you-want-to-know"},{level:3,title:"5. Execute the process",slug:"_5-execute-the-process"},{level:3,title:"Result",slug:"result"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Workspaces",frontmatter:{},regularPath:"/workspaces/",relativePath:"workspaces/index.md",key:"v-9fcd1034",path:"/workspaces/",headers:[{level:2,title:"Workspaces Overview",slug:"workspaces-overview"},{level:2,title:"Workspace Providers",slug:"workspace-providers"},{level:2,title:"Provisioning a Workspace",slug:"provisioning-a-workspace"},{level:2,title:"Registering a Workspace",slug:"registering-a-workspace"},{level:2,title:"Export openEO result to Workspace",slug:"export-openeo-result-to-workspace"},{level:2,title:"Listing Files",slug:"listing-files"},{level:3,title:"1) openEO API",slug:"_1-openeo-api"},{level:3,title:"2) Third Party Applications",slug:"_2-third-party-applications"},{level:2,title:"Loading data from a workspace",slug:"loading-data-from-a-workspace"},{level:2,title:"User Collections",slug:"user-collections"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3},{title:"Vessel Detection",frontmatter:{},regularPath:"/usecases/vessel-detection/",relativePath:"usecases/vessel-detection/index.md",key:"v-e3af3008",path:"/usecases/vessel-detection/",headers:[{level:2,title:"Adaptive Thresholding in Xarray",slug:"adaptive-thresholding-in-xarray"},{level:3,title:"1. Authenticate",slug:"_1-authenticate"},{level:3,title:"2. Pre-processing prep",slug:"_2-pre-processing-prep"},{level:3,title:"3. Defining a process graph to detect vessels in our AOI.",slug:"_3-defining-a-process-graph-to-detect-vessels-in-our-aoi"},{level:3,title:"4. Run Auxilliary job",slug:"_4-run-auxilliary-job"},{level:2,title:"Result Visualisation",slug:"result-visualisation"},{level:2,title:"Use Case -- Recap",slug:"use-case-recap"}],lastUpdated:"12/30/2024, 11:00:53 AM",lastUpdatedTimestamp:1735556453e3}],themeConfig:{logo:"https://openeo.cloud/wp-content/themes/openeo_platform/images/logo-pages.svg",editLinks:!0,docsRepo:"openEOPlatform/documentation",docsBranch:"main",algolia:{appId:"AH1DCGL38F",apiKey:"3d026b8a9c3950be6d136a6d0f934029",indexName:"openeo-cloud"},nav:[{text:"Datasets",link:"/data-collections/"},{text:"Get Started",items:[{text:"Free Trial Registration",link:"/join/free_trial.html"},{text:"Data Cubes",link:"https://openeo.org/documentation/1.0/datacubes.html"},{text:"Client Libraries",items:[{text:"JavaScript",link:"/getting-started/javascript/"},{text:"Python",link:"/getting-started/python/"},{text:"R",link:"/getting-started/r/"}]},{text:"Development Environments",items:[{text:"JupyterLab (Python)",link:"/getting-started/jupyterlab/"},{text:"Editor",link:"/getting-started/editor/"}]},{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Client-Side Processing (Python)",link:"/getting-started/client-side-processing/"}]},{text:"Clients",items:[{text:"JavaScript",link:"https://open-eo.github.io/openeo-js-client/latest/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/"},{text:"R",link:"https://open-eo.github.io/openeo-r-client/"}]},{text:"Use Cases",items:[{text:"Cookbook",link:"https://openeo.org/documentation/1.0/cookbook/"},{text:"Analysis-Ready Data (ARD)",items:[{text:"Overview",link:"/usecases/ard/"},{text:"SAR (Sentinel-1)",link:"/usecases/ard/sar/"},{text:"Multi-Spectral Imagery",link:"/usecases/ard/msi/"},{text:"Sen2Like",link:"/usecases/ard/sen2like/"}]},{text:"Crop Classification",link:"/usecases/crop-classification/"},{text:"Forest Change Detection",link:"/usecases/forest-change-detection/"},{text:"Land Cover Classification",link:"/usecases/landcover/"},{text:"NO₂ monitoring",link:"/usecases/no2-monitoring/"},{text:"Large scale processing",link:"/usecases/large-scale-processing/"},{text:"Global flood monitoring",link:"/usecases/gfm/"},{text:"Vessel Detection",link:"/usecases/vessel-detection/"},{text:"Fractional canopy Cover",link:"/usecases/Fractional-canopy-Cover/"},{text:"Crop Conditions",link:"/usecases/crop-conditions/"}]},{text:"Processes",items:[{text:"JavaScript & R",link:"/processes/"},{text:"Python",link:"https://open-eo.github.io/openeo-python-client/api.html#module-openeo.rest.datacube"}]},{text:"File Formats",link:"/file-formats/"},{text:"Advanced",items:[{text:"Accounting",link:"/federation/accounting.html"},{text:"Federation Aspects",link:"/federation/index.html"},{text:"Federation Contract",link:"/federation/backends/index.html"},{text:"Workspaces",link:"/workspaces/index.md"},{text:"HTTP API",link:"/api/"}]},{text:"Contact",link:"https://openeo.cloud/contact/"}],sidebar:"auto"}};"undefined"!=typeof window&&(window.global=window);n(148);r.a.component("ApiSpec",()=>n.e(61).then(n.bind(null,557))),r.a.component("DataCollections",()=>Promise.all([n.e(0),n.e(4),n.e(34)]).then(n.bind(null,550))),r.a.component("FileFormatsSpec",()=>Promise.all([n.e(0),n.e(4),n.e(35)]).then(n.bind(null,551))),r.a.component("ProcessesSpec",()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(23),n.e(41)]).then(n.bind(null,558))),r.a.component("Badge",()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,564))),r.a.component("CodeBlock",()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,554))),r.a.component("CodeGroup",()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,555)));n(149);var Ut=[({router:e,Vue:t})=>{t.config.ignoredElements=["redoc"],e.beforeEach((e,t,n)=>{const r={"/authentication":"/join/free_trial.html","/join/early_adopter.html":"/join/free_trial.html"}[e.path];r?n({path:r}):n()})},{},({Vue:e})=>{e.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{},{},({Vue:e})=>{e.component("CodeCopy",Et)}],It=[];class Dt extends class{constructor(){this.store=new r.a({data:{state:{}}})}$get(e){return this.store.state[e]}$set(e,t){r.a.set(this.store.state,e,t)}$emit(...e){this.store.$emit(...e)}$on(...e){this.store.$on(...e)}}{}Object.assign(Dt.prototype,{getPageAsyncComponent:ct,getLayoutAsyncComponent:lt,getAsyncComponent:ut,getVueComponent:ft});var Ft={install(e){const t=new Dt;e.$vuepress=t,e.prototype.$vuepress=t}};function Nt(e,t){const n=t.toLowerCase();return e.options.routes.some(e=>e.path.toLowerCase()===n)}var Bt={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(e){const t=this.pageKey||this.$parent.$page.key;return dt("pageKey",t),r.a.component(t)||r.a.component(t,ct(t)),r.a.component(t)?e(t):e("")}},zt={functional:!0,props:{slotKey:String,required:!0},render:(e,{props:t,slots:n})=>e("div",{class:["content__"+t.slotKey]},n()[t.slotKey])},Vt={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},qt=(n(150),n(151),Object(jt.a)(Vt,(function(){var e=this._self._c;return e("span",[e("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[e("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),e("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),e("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),Ht={functional:!0,render(e,{parent:t,children:n}){if(t._isMounted)return n;t.$once("hook:mounted",()=>{t.$forceUpdate()})}};r.a.config.productionTip=!1,r.a.use(We),r.a.use(Ft),r.a.mixin(function(e,t,n=r.a){!function(e){e.locales&&Object.keys(e.locales).forEach(t=>{e.locales[t].path=t});Object.freeze(e)}(t),n.$vuepress.$set("siteData",t);const o=new(e(n.$vuepress.$get("siteData"))),i=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(o)),a={};return Object.keys(i).reduce((e,t)=>(t.startsWith("$")&&(e[t]=i[t].get),e),a),{computed:a}}(e=>class{setPage(e){this.__page=e}get $site(){return e}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:e={}}=this.$site;let t,n;for(const r in e)"/"===r?n=e[r]:0===this.$page.path.indexOf(r)&&(t=e[r]);return t||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:e}=this.$page.frontmatter;return"string"==typeof e&&e}get $title(){const e=this.$page,{metaTitle:t}=this.$page.frontmatter;if("string"==typeof t)return t;const n=this.$siteTitle,r=e.frontmatter.home?null:e.frontmatter.title||e.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const e=function(e){if(e){const t=e.filter(e=>"description"===e.name)[0];if(t)return t.content}}(this.$page.frontmatter.meta);return e||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(e,t){for(let n=0;nn||(e.hash?!r.a.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(e.hash)}:{x:0,y:0})});!function(e){e.beforeEach((t,n,r)=>{if(Nt(e,t.path))r();else if(/(\/|\.html)$/.test(t.path))if(/\/$/.test(t.path)){const n=t.path.replace(/\/$/,"")+".html";Nt(e,n)?r(n):r()}else r();else{const n=t.path+"/",o=t.path+".html";Nt(e,o)?r(o):Nt(e,n)?r(n):r()}})}(n);const o={};try{await Promise.all(Ut.filter(e=>"function"==typeof e).map(t=>t({Vue:r.a,options:o,router:n,siteData:Mt,isServer:e})))}catch(e){console.error(e)}return{app:new r.a(Object.assign(o,{router:n,render:e=>e("div",{attrs:{id:"app"}},[e("RouterView",{ref:"layout"}),e("div",{class:"global-ui"},It.map(t=>e(t)))])})),router:n}}(!1).then(({app:e,router:t})=>{t.onReady(()=>{e.$mount("#app")})})}]); \ No newline at end of file diff --git a/data-collections/index.html b/data-collections/index.html index 31f5d3e7e..8a0cf9f44 100644 --- a/data-collections/index.html +++ b/data-collections/index.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@

Loading data...

Last Updated: 12/30/2024, 11:00:53 AM
- + diff --git a/federation/accounting.html b/federation/accounting.html index 733042e1c..ff1be56fe 100644 --- a/federation/accounting.html +++ b/federation/accounting.html @@ -8,7 +8,7 @@ - + @@ -186,6 +186,6 @@ costs a few euros, but then you would also notice that your job is taking multiple hours to run.

In any case, once you've established an initial cost for a small area, you can extrapolate to a larger area. If simple linear extrapolation shows that a larger job is affordable, then run the job on larger areas, like 50ha or up to 100x100km. This will show you how your job scales, and what kind of costs you will be incurring! If at any point the cost appears unreasonable, please contact the platform!

Last Updated: 12/30/2024, 11:00:53 AM
- + diff --git a/federation/backends/api.html b/federation/backends/api.html index 8a60f198f..a19b7ba01 100644 --- a/federation/backends/api.html +++ b/federation/backends/api.html @@ -8,7 +8,7 @@ - + @@ -174,6 +174,6 @@ The requirement to implement two of L1A, L1B, and L1C has been restricted for openEO Platform to always require L1A: Synchronous Processing and L1B: Batch Jobs (see req. no. 703). This means that L1C: Secondary Web Services is optional.

The hierarchy of openEO and openEO Platform API profiles.
An overview of the openEO and openEO Platform API profiles.

# LP: Required for openEO Platform

The profile only lists requirements that are not covered by the openEO profile L2: Recommended yet.

# API fundamentals

# Functionality Description
14 All > Billing Supports the openEO Platform credit system

# File Formats

# Functionality Description
45 GET /file_formats File format names and parameters aligned with openEO Platform as defined for the pre-defined file formats

# Other

# Functionality Description
90 GET /health Returns 2XX or 5XX http status code (without authentication)

# Auth

# Functionality Description
113 GET /credentials/oidc Supports EGI as identity provider (including tokens)
118 GET /credentials/oidc Supports the required entitlements of the vo.openeo.cloud virtual organization, especially the claim eduperson_entitlement

For more details about Authentication and Authorization, please see the corresponding chapters below.

# Pre-defined Processes

# Functionality Description
205 GET /processes > processes All processes are valid according to the specification (id, description, parameters, returns are required)
208 GET /processes > processes Processes are marked as experimental or deprecated if applicable

# Collections

# Functionality Description
311 GET /collections > collections Collections are marked as experimental or deprecated if applicable
324 GET /collections/{id} > id IDs follow the openEO Platform naming convention
327 GET /collections/{id} > providers Each collection needs to expose the backend offering the data

# Data Processing

# Functionality Description
703 Batch jobs and synchronous processing are implemented (secondary web services are optional)
704 Time after which batch job results get automatically deleted: 90 days or later
705 Time after which batch job metadata gets automatically deleted: 1 year or later

# Batch Jobs > Results

# Functionality Description
873 GET /jobs/{id}/results > public access link Default expiry time of the signed URLs for results: 7 days

# Synchronous Processing

# Functionality Description
920 POST /result > timeout The timeout for synchronous calls is: 5 minutes

# Authentication and authorization

This important aspect of the federation is standardized by the AARC Blueprint Architecture (opens new window). EGI Check-in is the concrete implementation that is currently in use.

# Authentication

The openEO platform federation standardizes on the use of EGI Check-in (opens new window) as identity provider. Backends have to support the use of openID connect + PKCE, to enable this and register a client with EGI Check-in.

# Authorization

# Entitlements

Users of the federation are organized under the 'vo.openeo.cloud' virtual organization in EGI Check-in. Inside the virtual organization, different roles can be assigned to a user, to indicate that they have a certain subscription, or even on a more fine-grained level are entitled to specific actions or resources. The mechanism to check this, is again supported by EGI Check-in, under the 'eduperson_entitlement' claim: https://docs.egi.eu/providers/check-in/sp/#claims (opens new window)

# Credits

The second criterium for authorization is based on credits that are available to a user. Credits allow the platform to limit the volume of data access and processing operations that a user can perform during a given time frame. The amount of available credits depends on the subscription. When the credit balance of a user goes below zero, processing operations can be blocked.

# Aggregator rules

Based on the subscription and available credits, the aggregator can implement these rules:

  1. Credit checks to block starting of batch jobs, synchronous requests to /result and viewing services.
  2. Rate limiting (TBD)

# Backend rules

Some authorization rules will need to be enforced by the backends themselves:

  1. Basic access and access to user specific resources based on subscription role.
  2. Number of concurrent batch jobs
  3. Available processing resources, batch job priorities
  4. Batch job result data volume
  5. Access to restricted collections
Last Updated: 12/30/2024, 11:00:53 AM
- + diff --git a/federation/backends/collections.html b/federation/backends/collections.html index 7807acab2..5c2a1d5b2 100644 --- a/federation/backends/collections.html +++ b/federation/backends/collections.html @@ -8,7 +8,7 @@ - + @@ -178,6 +178,6 @@ considered non-experimental.

  1. Collections need to indicate the key 'providers' that are responsible for ensuring access to the data and continuity in the case of active missions. The user may depend on the guarantees offered by these providers with respect to the properties (timeliness, completeness,...) of a specific collection. The providers with role 'host' and 'producer' are mandatory.

  2. The collection description and extents needs to specify known limitations with respect to the original collection. For instance, if only a subset of the full archive is available, this should be indicated. Extents can be rough approximations to avoid requiring very detailed geometry in the metadata.

  3. Collections without an end time are assumed to be active missions. By default, 99% of items in these collections should be available within 48 hours after being published by the producer. This gives users a basic guarantee with respect to timeliness of products.

  4. Collection metadata should be valid STAC metadata and must include all extensions in stac_extensions. Tools such as STAC-validator (opens new window) can indicate obvious issues.

  5. FAIR principle R1: (Meta)data are richly described with a plurality of accurate and relevant attributes (opens new window)

  6. Collections have to follow harmonization guidelines specified below, if applicable.

  7. Collections naming (id, dimensions, bands) should remain constant.

  8. Backwards incompatible changes or removal need to be announced with a lead time of 6 months, together with a migration path.

  9. Minimum availability of non-experimental collections is 98% on a monthly basis. The backend availability is used here if availability is not measured per collection.

  10. Availability of a collection means that a simple process graph (e.g. using load_collection) returns a correct result. Collections may have special conditions to work, for instance in the case of commercial data.

# Harmonization

When back-ends offer/mirror the same datasets, it is required to align names and metadata. For the following collections and metadata an agreement has been achieved. These are all Copernicus Missions, and the standard names refer to the archives prepared and distributed by ESA. If it is not possible/desirable to use this name as collection id, a 'common_name' can be added next to the 'id' property to identify the collection as a standard archive.

# Common naming convention

In order to achieve a uniform structure for all collections on the platform and thus make it easier for users to navigate between collections, it is recommended to follow the common naming convention*:

  • Names should be written in capital letters ("all caps")
  • Names should consist of a combination of different optional attributes (see table)
  • The different attributes should be separated by an underscore

Very roughly speaking, collections can be divided into two groups (in reality it is more of a spectrum with all gradations in between):

  • collections containing raw data (or processing levels of that data) measured directly by a satellite (or an other measurement platform) and often distributed by the platform operator (e.g., ESA)
  • derived collections, which are based on (pre-processed) raw data that has been processed to create a collection with a specific purpose (e.g., a land cover map) and are often distributed by the institution (or a service of an institution) that created the collection
Attribute Type Description Examples
Provider string Often used for derived collections produced or order by the listed provider. ESA, CNSE, EMODNET, TERRASCOPE. CAMS, CGLS
Satellite/Platform string Name of the satellite/platform that acquired the data in the collection. SENTINEL2, LANDSAT8, PALSAR2
Processing level string Name of the level to which the data was processed (often processed raw data). L2A, L3, L2_1
Version string Often used for derived collections that are produced in several versions. V1, V2
Resolution string (number + unit or string) Usually added, if the resolution is of particular importance for the collection (e.g., novel product with this resolution) for the collection. 10M, 120M, EUROPE, GLOBAL
Product Description string Human readable description of the data within the collection. Can also be an abbreviation or acronym. LAND_COVER_MAP, WORLDCOVER, NDVI, LAI
Year number Often used for derived products that where updated in the specified year or created based on data of the specified year. 2022

Collections containing raw data or processing levels of that data often use a combination of satellite/platform and processing level (e.g., SENTINEL2_L1C ). Derived collections often use a combination of provider and product description (e.g., CNES_LAND_COVER_MAP).

*Some existing collections may not strictly follow this naming convention as they were added to the platform prior to this agreement.

# Sentinel2-L2A

The common name for this collection is 'SENTINEL2_L2A'. It refers to the L2A products generated by the Sen2Cor software, which can be configured to be compatible with the ESA generated products. Note that the products in the ESA archive were also processed with different versions of Sen2Cor, so it is not possible to specify a very specific version or configuration of the processing chain.

# Bands

Band names for spectral bands follow the Bxx naming convention used by ESA. For example: B01, B02, B03, B08, B8A, B12

  • SCL = the Sen2Cor scene classification band
  • approximateViewAzimuth = collective term for the mean and accurate viewing azimuth angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle (viewAzimuthAngles) or the mean angle (viewAzimuthMean) is explicitly specified, the data is processed on the backend that holds the specified band.
  • viewZenithMean = collective term for the mean and accurate viewing zenith angle. Depending on which backend is processing the data, the mean angle (for Sentinel Hub) or the accurate angle (for Terrascope) is used. If the accurate angle (viewZenithMean) or the mean angle (viewZenithAngles) is explicitly specified, the data is processed on the backend that holds those bands.
  • sunAzimuthAngles/sunZenithAngles = collective term for the exact sun azimuth and sun zenith angle.

# Common Properties

We list here a set of common properties, that can be relevant for multiple collections. Collections are strongly encouraged to use these properties instead of using a different name for the same property.

# Common

# Optical instruments

# SAR instruments

Last Updated: 12/30/2024, 11:00:53 AM
- + diff --git a/federation/backends/fileformats.html b/federation/backends/fileformats.html index 7713df685..682f6ca49 100644 --- a/federation/backends/fileformats.html +++ b/federation/backends/fileformats.html @@ -8,7 +8,7 @@ - + @@ -173,6 +173,6 @@
  • georeferenced (x/y dimensions)
  • can store multiple bands (band dimension)
  • can store multiple timestamps (time dimension)
  • self-describing, portable and scalable
  • GeoTiff: ideal for storing several bands in one file in cloud optimized format
    • georeferenced
    • can store multiple bands
    • a single GeoTiff corresponds to one timestamp (in combination with STAC, multi-temporal collections can be supported)
    • cloud optimized
  • # Federation agreement file formats

    If back-ends offer/mirror the same file formats for both import and export, it is required to align them.

    For file export through save_result for example, the output parameters and the structure of the data that is written to storage needs to be defined. For the following file formats an agreement has been achieved:

    • GeoTiff
    • netCDF

    The idea of these guidelines is to align with what the formats and corresponding toolchains support as much as possible.

    # GeoTiff

    Defaults:

    # netCDF

    Defaults:

    • The full datacube is written to a single netCDF.
    • The openEO dimension metadata is preserved in the netCDF file.
    • CF conventions (https://cfconventions.org/) are used where applicable.
    • Data is chunked and compressed

    More information on all supported file formats, can be found here.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/federation/backends/index.html b/federation/backends/index.html index 237980aa4..28a7f7980 100644 --- a/federation/backends/index.html +++ b/federation/backends/index.html @@ -8,7 +8,7 @@ - + @@ -176,6 +176,6 @@ the provider is expected to stop working on new features and improve reliability, or to mark the component as experimental. Reverting a 'stable' feature to 'experimental' should be considered a backwards incompatible change, requiring communication towards the user and proper consideration of the impact.

    Note

    To join the federation, it is required to (mostly) fulfill these requirements and document differences for users in the "Federation Aspects and Known Issues". Nevertheless, these requirements are negotiable if there are good arguments for a change as the current state of the "contract" is just the compromise that the existing providers have agreed upon and if a new back-end joins the federation new compromises may need to be made.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/federation/backends/processes.html b/federation/backends/processes.html index f3d7b5153..00ee37f90 100644 --- a/federation/backends/processes.html +++ b/federation/backends/processes.html @@ -8,7 +8,7 @@ - + @@ -181,6 +181,6 @@
    • has been tested on > 100x100km at 10m resolution (or equivalent)
  • load_url (experimental)
    • has been tested on > 100x100km at 10m resolution (or equivalent)
  • sar_backscatter (experimental)
    • has been tested on > 100x100km at 10m resolution (or equivalent)
  • Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/federation/index.html b/federation/index.html index 97a5e2dc0..e4d6202b8 100644 --- a/federation/index.html +++ b/federation/index.html @@ -8,7 +8,7 @@ - + @@ -260,6 +260,6 @@

    This is a short overview of the various options:

    • executor-memory: memory assigned to your workers, for the JVM that executes most predefined processes
    • executor-memoryOverhead: memory assigned on top of the JVM, for instance to run UDF's
    • executor-cores: number of CPUs per worker (executor). The number of parallel tasks is executor-cores/task-cpus
    • task-cpus: CPUs assigned to a single task. UDF's using libraries like Tensorflow can benefit from further parallellization on the level of individual tasks.
    • executor-request-cores: this settings is only relevant for Kubernetes based backends, allows to overcommit CPU
    • max-executors: the maximum number of workers assigned to your job. Maximum number of parallel tasks is max-executors*executor-cores/task-cpus. Increasing this can inflate your costs, while not necessarily improving performance!
    • driver-memory: memory assigned to the spark 'driver' JVM that controls execution of your batch job
    • driver-memoryOverhead: memory assigned to the spark 'driver' on top of JVM memory, for Python processes.
    • logging-threshold: the threshold for logging, set to 'info' by default, can be set to 'debug' to generate much more logging
    • udf-dependency-archives: an array of urls pointing to zip files with extra dependencies, see below

    # Custom UDF dependencies

    User defined functions often depend on (specific versions of) libraries or require small auxiliary data files. The UDF specifications do not yet define a standardized manner to provide this other than having the ability of selecting from a predefined set of 'runtimes' that than again have a predefined configuration.

    The Terrascope/Geotrellis backends solve this via the udf-dependency-archives job option, that allows to specify a list of zip files that should be included in the working directory of the UDF.

    This enables the following example workflow for Python UDF's:

    1. Create a Python 'virtualenv' with your dependencies
    2. Based on the 'site-packages' directory of the virtualenv, create a zip file with all dependencies
    3. Upload the zip to a url that can be reached by the backend.
    4. In job options, add "udf-dependency-archives": ['https://yourhost.com/myEnv.zip#tmp/mydir'] The #tmp/mydir suffix indicates where you want to unzip your files, relative to the working directory.
    5. In your UDF, before trying to import libraries, add your directory to the Python path: sys.path.insert(0, 'tmp/mydir')
    6. Now your libraries should be loaded before anything else!

    Known limitations:

    • Your dependencies need to be compatible with the Python version of the backend, currently 3.8.
    • Your dependencies need to be compatible with the OS of the backend, currently AlmaLinux 8.
    • The backend has a limited set of Python dependences that are preloaded, and cannot be changed, such as numpy.

    # Learning more

    The topic of resource optimization is a complex one, and here we just give a short summary. The goal of openEO is to hide most of these details from the user, but we realize that advanced users sometimes want to have a bit more insight, so in the spirit of being open, we give some hints.

    To learn more about these options, we point to the piece of code that handles this:

    https://github.com/Open-EO/openeo-geopyspark-driver/blob/faf5d5364a82e870e42efd2a8aee9742f305da9f/openeogeotrellis/backend.py#L1213

    Most memory related options are translated to Apache Spark configuration settings, which are documented here:

    https://spark.apache.org/docs/3.3.1/configuration.html#application-properties

    # Batch job results on Sentinel Hub

    If you are processing data and the underlying back-end is Sentinel Hub, the output extent of your batch job results is currently larger than your input extent because Sentinel Hub processes whole tiles (this may change in the future and the data will be cropped to your input extent).

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/file-formats/index.html b/file-formats/index.html index 7948a8529..8dacbfb55 100644 --- a/file-formats/index.html +++ b/file-formats/index.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@

    Loading data...

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/client-side-processing/index.html b/getting-started/client-side-processing/index.html index 5264d3a3e..87fe3a45e 100644 --- a/getting-started/client-side-processing/index.html +++ b/getting-started/client-side-processing/index.html @@ -8,7 +8,7 @@ - + @@ -269,6 +269,6 @@ ndvi_median = ndvi.reduce_dimension(dimension="time", reducer="median") result_ndvi = ndvi_median.execute()

    # Client-Side Processing Example Notebooks

    # Additional Information

    Additional information and resources about the openEO Python Client Library:

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/editor/index.html b/getting-started/editor/index.html index a370cffcd..a5bd67100 100644 --- a/getting-started/editor/index.html +++ b/getting-started/editor/index.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@

    # Get started with the openEO Platform Editor

    Note

    You need to get an openEO Platform account (opens new window) to access the processing infrastructure.

    The openEO Platform Editor (also called Web Editor) is a browser-based graphical user interface for openEO Platform. It allows to use the openEO Platform services without any coding experience. You can explore the service offerings such as data collections and processes, but also create and run custom processes on our infrastructure and then visualize the results. Result visualization is still a bit limited, but all other features of the Platform are supported.

    The Editor is available at https://editor.openeo.cloud (opens new window) and loads up in "Discovery mode" by default, which means you can explore the service offerings without being logged in. On the left side you can find the service offerings like data collections and processes and on the right side the process editor is shown.

    To enable more functionality, e.g. to compute something in a batch job, you have to login. Hover over the button with the text "Guest" in the top right corner and it will show you a "Login" button. Once you clicked on it, the login screen shows up. Here you can simply click the "Log in with EGI Check-in" button and the login procedure will start. See the chapters on the Free Tier or the available plans (opens new window) for more details on the procedure to register and log in.

    After you've completed this the login procedure, the Editor shows up again and you'll notice that a new area in the lower middle part of the Editor aprears. This is the user workspace, where you can see all your stored data, e.g. batch jobs or uploaded files.

    If you need any more help you can always click the "Help" button in the top right area of the Editor and you'll start a guided tour through the Editor. If there are any additional questions, please contact us.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/javascript/index.html b/getting-started/javascript/index.html index f7ba5c22c..6ab555e01 100644 --- a/getting-started/javascript/index.html +++ b/getting-started/javascript/index.html @@ -8,7 +8,7 @@ - + @@ -270,6 +270,6 @@

    There's also the method downloadResults to download the results directly. Unfortunately, you can only download files from a Node.js environment where file access to your local drive is possible. In a Browser environment, it is also an option to download the STAC Item or Collection for the results using the getResultsAsStac method and point a STAC client (opens new window) to it for downloading.

    # Additional Information

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/jupyterlab/index.html b/getting-started/jupyterlab/index.html index 567c936b9..a2bff0bca 100644 --- a/getting-started/jupyterlab/index.html +++ b/getting-started/jupyterlab/index.html @@ -8,7 +8,7 @@ - + @@ -170,6 +170,6 @@ Contact (opens new window)

    # Get started with openEO Platform in JupyterLab (Python)

    Important

    You need to get an openEO Platform account (opens new window) to access the processing infrastructure.

    A hosted JupyterLab environment for openEO Platform is available at lab.openeo.cloud (opens new window).

    It has the openEO Python client pre-installed, but it does not support running the R or JavaScript clients.

    You need to authenticate before you can use it:

    1. Select from the "Sign in" dropdown menu the "openEO Platform" option
    2. It will start the EGI Authentication workflow for openEO Platform. If you haven't you need to get an openEO Platform account (opens new window) before you proceed.
    3. After you have logged in via EGI, the "Server Options" appear and you are requested to "Select your desired stack". Please choose "openEO Platform Lab" and click "Start".
    4. You are logged in, now. The JupyterLab should be usable like a normal JupyterLab instance that has the openEO Python client and some other tools pre-installed.
    5. You can now open a new Python 3 Notebook and, for example, start to follow the general Python Getting Started Guide.

      Note

      You can skip the "Installation" section in the Getting Started Guide, but unfortunately you need to authenticate with the Python client again! We'll try to remove this annoyance in the future.

    Note

    You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.

    If you require any additional packages to be installed into your JupyterLab environment please refrain from installing them via pip and install them via conda. Anaconda documentation (opens new window)

    Please also refer to the the official documentation for the openEO Python Client (opens new window) and JupyterLab (opens new window) for more details.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/python/index.html b/getting-started/python/index.html index 0a46e3f73..6f3f84e09 100644 --- a/getting-started/python/index.html +++ b/getting-started/python/index.html @@ -8,7 +8,7 @@ - + @@ -277,6 +277,6 @@

    When everything completes successfully, the processing result will be downloaded as a GeoTIFF file in a folder "output".

    TIP

    You may shut down your device or log out during the job runs on the backend. You can retrieve the status and results later and from any client.

    The official openEO Python Client documentation has more information on batch job management and downloading results (opens new window)

    # Additional Information

    Additional information and resources about the openEO Python Client Library:

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/python/shiny.html b/getting-started/python/shiny.html index c82a74f02..c6dc3440d 100644 --- a/getting-started/python/shiny.html +++ b/getting-started/python/shiny.html @@ -8,7 +8,7 @@ - + @@ -252,6 +252,6 @@ return fig

    As in a dashboard, one will probably work with rendering plots mainly, that should be resourceful enough to let anyone start playing with openEO and Shiny in python together. If there are any doubts, do not hesitate to reach the developers and consider even creating an issue in this repository. Please be aware of openEO backend related issues that do not concern this dashboard developers.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/getting-started/r/index.html b/getting-started/r/index.html index 01ff12e72..1fa6dbf0c 100644 --- a/getting-started/r/index.html +++ b/getting-started/r/index.html @@ -8,7 +8,7 @@ - + @@ -254,6 +254,6 @@ # download all the files into a folder on the file system download_results(job = job, folder = "/some/folder/on/filesystem")

    Note

    The printing behavior and the actual data structure might differ!

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/index.html b/index.html index c316e93a1..9e5c065d6 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + @@ -188,6 +188,6 @@

    You can also go back to the project website at openeo.cloud to find the less technical details.

    - + diff --git a/join/free_trial.html b/join/free_trial.html index 5dcce3d3c..0f6c53b85 100644 --- a/join/free_trial.html +++ b/join/free_trial.html @@ -8,7 +8,7 @@ - + @@ -205,6 +205,6 @@ https://openeo.cloud and then authenticate through EGI Check-in with the account used above.

    Tip

    For your own convenience, we advise you to always log in with the same identity provider you originally registered with. Otherwise, you run the risk of creating a separate new EGI account, which in turn will have to go through the openEO Platform virtual organization acceptance process again. It is possible to link multiple accounts from multiple identity providers to the same EGI account. However, this must be done before you use these accounts to log in, as explained in the EGI documentation (opens new window).

    See the getting started guides to find out more about how to use the clients for this:

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/processes/index.html b/processes/index.html index cd2fe7880..c27632b6d 100644 --- a/processes/index.html +++ b/processes/index.html @@ -8,7 +8,7 @@ - + @@ -175,6 +175,6 @@
    - + diff --git a/usecases/Fractional-canopy-Cover/index.html b/usecases/Fractional-canopy-Cover/index.html index 7355c162b..7c3513db2 100644 --- a/usecases/Fractional-canopy-Cover/index.html +++ b/usecases/Fractional-canopy-Cover/index.html @@ -8,7 +8,7 @@ - + @@ -173,6 +173,6 @@

    # Predicted Fractional Canopy Cover

    In the fit_regr_random_forest process, the actual regression calculation is taking place. Based on the random forest implementation a model is created to predict the target variable. The fitting is done in a standard machine learning approach with 70% of the polygons whereas 30% of the polygons are used for the evaluation of the model.

    Scoring method
    Figure 3: Predicted Fractional Canopy Cover for part of the study area

    # Validation

    Polygons were separated in the initial stage of the project for the validation. 512 polygons with 36 pixels each corresponding to the HRL tree density layer were used for the validation task. The comparison showed a correlation of 0.76 summarised in the plot below in Figure 4.

    Scoring method
    Figure 4: Correlation plot with HRL tree density polygons
    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/ard/index.html b/usecases/ard/index.html index e9318d65c..dd154e0df 100644 --- a/usecases/ard/index.html +++ b/usecases/ard/index.html @@ -8,7 +8,7 @@ - + @@ -174,6 +174,6 @@ There are also variants with a default parametrization that results in data that is compliant with CEOS CARD4L specifications (opens new window).

    We should note that these operations can be computationally expensive, so certainly affect overall processing time and cost of your final algorithm. Hence, make sure to make an informed decision when you decide to use these methods.

    Examples:

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/ard/msi/index.html b/usecases/ard/msi/index.html index e573d0ba6..f34badc1a 100644 --- a/usecases/ard/msi/index.html +++ b/usecases/ard/msi/index.html @@ -8,7 +8,7 @@ - + @@ -185,6 +185,6 @@ SMAC is implemented based on: https://github.com/olivierhagolle/SMAC (opens new window) Both methods have been tested with Sentinel-2 as input. The viewing and sun angles need to be selected by the user to make them available for the algorithm.

    This is an example of applying iCor:

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/ard/sar/index.html b/usecases/ard/sar/index.html index 2da1614cb..44672f6d7 100644 --- a/usecases/ard/sar/index.html +++ b/usecases/ard/sar/index.html @@ -8,7 +8,7 @@ - + @@ -179,6 +179,6 @@ Details can be found in the corresponding Getting Started guides.

    # CARD4L NRB for SENTINEL1_GRD collection (provided by Sentinel Hub)

    When working with the Sentinel Hub based SENTINEL1_GRD collection, both SAR backscatter processes can be used. The underlying implementation is provided by Sentinel Hub (opens new window), and offers full CARD4L compliant processing options.

    # Orfeo for other GRD collections (provided by VITO / TerraScope)

    When working with other GRD data, an implementation (opens new window) based on Orfeo Toolbox (opens new window) is used.

    The Orfeo implementation currently only supports sigma0 computation, and is not CARD4L compliant.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/ard/sen2like/index.html b/usecases/ard/sen2like/index.html index fd5a6c0bc..e5ebc055b 100644 --- a/usecases/ard/sen2like/index.html +++ b/usecases/ard/sen2like/index.html @@ -8,7 +8,7 @@ - + @@ -334,6 +334,6 @@ "parameters": [] }
    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/crop-classification/index.html b/usecases/crop-classification/index.html index 8bfa89247..942a37e79 100644 --- a/usecases/crop-classification/index.html +++ b/usecases/crop-classification/index.html @@ -8,7 +8,7 @@ - + @@ -172,6 +172,6 @@ but you can have a look at the random forest notebook if that is something you need help with.

    # Classification

    # Rule-based classification

    A simple approach is to define rules based on your features to classify crops. For example, when looking at temporal profiles of corn, we can see that the NDVI of may is smaller than the NDVI of june. By creating and iteratively refining rules for each of these crop types, we can get a first classification result.

    However, to do this, we need to be able to do band math on the temporal dimension. Remember target_dimension="bands" that we used before to calculate the statistics over the temporal dimension? We can use this again to stack the temporal dimension onto the band dimension.

    Next, we can do boolean comparison of features and see whether any given pixel matches the rules you determined.

    Each of these rules results in a boolean that can be combined using geometric progression, to obtain a final cube containing all crop type predictions.

    # Supervised classification using Random Forest

    A more sophisticated approach is to use a machine learning model such as Random Forest. As mentioned before, training is done after feature extraction outside of openEO, and you can then pickle your model and store it on a repository. Next, you define a UDF that unpickles your model, predicts, and returns a new DataCube instance that contains the predicted values instead of the features.

    Note that if your labels are strings, you will have to map them to integers. You can then download the classification results and plot it. Congratulations!

    To see a fully working example, you can check out this Python notebook on rule-based classification (opens new window) or this Python notebook on classification using Random Forest (opens new window).

    We ran the code in that notebook for ~120 MGRS tiles to end up with a crop cover map for 5 countries in Europe, which looks like this:

    cropcover_5_countries

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/crop-conditions/index.html b/usecases/crop-conditions/index.html index 7c1ef3f53..ef26b2913 100644 --- a/usecases/crop-conditions/index.html +++ b/usecases/crop-conditions/index.html @@ -8,7 +8,7 @@ - + @@ -287,6 +287,6 @@ plt.imshow(lai[0], cmap="YlGn") plt.colorbar()

    image

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/forest-change-detection/index.html b/usecases/forest-change-detection/index.html index bcd271e0f..f5e2eddd0 100644 --- a/usecases/forest-change-detection/index.html +++ b/usecases/forest-change-detection/index.html @@ -8,7 +8,7 @@ - + @@ -174,6 +174,6 @@ The following figure shows such pixels with detected change from both Sentinel-1 and Sentinel-2

    S1 and S2 curve fitting and prediction steps
    Figure 2: Curve fitting and prediction for Sentinel-1 and Sentinel-2. In blue the S2 B08 and S1SIGÖ VH data and in orange the respective predicted values following the harmonic seasonal function.

    In this section, we will show how to combine openEO functionality into a basic change detection pipeline.

    # Data preparation

    To correctly find the right fitting for the harmonic function, we need cloud-free data if using optical data, or shadow masked data if using radar data, over a timeseries of at least two years (but more is better!). Pixels covered by clouds or shadows deviate from the expected trend of the vegetation and therefore we must start with pre-processed data.

    The current implementation of the fit_curve() / predict_curve() process and available processing and memory resources limit the spatio-temporal extent of data which can be processed in a single job. If a large extent should be processed, the extent has to be split into multiple parts and can be processed in multiple jobs.

    # Seasonal curve fitting

    Supposing that the training input data is a cloud-free Sentinel-2 timeseries we can write the following code using the openEO clients to find the optimal function coefficients:

    # Predicting values

    With the seasonal function coefficients, we can predict the expected value for a particular time step. In the following case, we are computing the values following the seasonal trend for the training time steps:

    The difference between the training data and the predicted values following the seasonal model is a key information, which is used to perform the change detection with new data. Please have a look at the reference notebook (opens new window) for the complete pipeline.

    The results obtained over an area of South Tyrol in Northern Italy which was hit by the Vaia storm are shown below. Similar damages are detected from Sentinel-1 and Sentinel-2

    Change detection from Sentinel-1 and Sentinel-2
    Figure 3: Change detection maps for the Vaia storm from Sentinel-1 and Sentinel-2.

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/gfm/index.html b/usecases/gfm/index.html index 4df1d0d33..9d6d798be 100644 --- a/usecases/gfm/index.html +++ b/usecases/gfm/index.html @@ -8,7 +8,7 @@ - + @@ -221,6 +221,6 @@ # Save the result in Equi7Grid and as GeoTiff observed_water_tif = observed_water.save_result(format="GTiff", options={"tile_grid": "equi7"})

    # Explore the observed water

    The original GFM data is stored in the Equi7 Grid and the Asian Equi7 coordinate reference system. With the tile_grid parameter, the user can either keep the data like this, or pick a different CRS.

    Observed water
    Figure 2: The observed water mask in Pakistan in September 2022.
    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/landcover/index.html b/usecases/landcover/index.html index 9bec52214..8f58a77da 100644 --- a/usecases/landcover/index.html +++ b/usecases/landcover/index.html @@ -8,7 +8,7 @@ - + @@ -169,6 +169,6 @@

    # Dynamic land cover service

    In this notebook we will be studying land cover mapping. Land cover mapping has been done since the onset of remote sensing, and LC products have been identified as a fundamental variable needed for studying the functional and morphological changes occurring in the Earth's ecosystems and the environment, and plays therefore an important role in studying climate change and carbon circulation (Congalton et al., 2014; Feddema et al., 2005; Sellers et al., 1997). In addition to that, it provides valuable information for policy development and a wide range of applications within natural sciences and life sciences, making it one of the most widely studied applications within remote sensing (Yu et al., 2014, Tucker et al., 1985; Running, 2008; Yang et al., 2013).

    With this variety in application fields comes a variety of user needs. Depending on the use case, there may be large differences in the target labels desired, the target year(s) requested, the output resolution needed, the featureset used, the stratification strategy employed, and more. The goal of this use case is to show that OpenEO as a platform can deal with this variability, and we will do so through creating a userfriendly interface in which the user can set a variety of parameters that will tailor the pipeline from -reference set & L2A+GRD > to model > to inference- to the users needs.

    In this notebook, helper functionality from this repository (opens new window) is used. It contains amongst others the entire feature building engineering workflow, so if you are interested in knowing how to do that or if you want to make more customizations towards your own use case, have a look at it. Note that the repository is not finalized, as it is a general repository also used for other purposes.

    A full notebook for this use case can be found here (opens new window).

    heelbelgie

    # Methodology

    # Reference data

    The reference dataset used in this section is the Land Use/Cover Area frame Survey (LUCAS) Copernicus dataset of 2018. LUCAS is an evenly spaced in-situ land use and land cover ground survey exercise that extends over the entire of the European Union. The Copernicus module extends up to 51m in four cardinal directions to delineate polygons for each of these points. The final product contains about 60,000 polygons, from which subsequent points can be sampled (d'Andrimont et al., 2021). You as a user can specify how many points to sample from these polygons to train your model. In addition, the user can upload extra target data to improve performance.

    # Input data

    The service created runs on features constructed from GRD sigma0 and L2A data. This data will be accessed through OpenEO platform from Terrascope and Sentinel Hub. You, as a user, can determine a time range, though the year should be kept to 2018, as that is the year in which the LUCAS Copernicus dataset was assembled. Data from other years can be extracted for prediction, provided that the user uploads their own reference set.

    # Preprocessing

    The L2A data has been masked using the sen2cor sceneclassification, with a buffering approach developed at VITO and made available as a process called mask_scl_dilation. From the Sentinel-1 GRD collection, backscatter is calculated.

    # Feature engineering

    We select and calculate the following products from our input collections:

    • 7 indices (NDVI, NDMI, NDGI, ANIR, NDRE1, NDRE2, NDRE5) and 2 bands (B06, B12) from the L2A collection
    • VV, VH and VV/VH (ratio) from the GRD sigma0 collection

    All layers are rescaled to 0 to 30000 for computational efficiency. The indices/bands are then aggregated temporally (for Sentinel-2 data: 10-day window using the median. For Sentinel-1 data: 12 day window using the mean. The median was used for the S2 collection instead of the mean to prevent possible artifacts caused by cloud shadows). The output is then interpolated linearly and the S1 cube is resampled spatially to a 10m resolution. Finally, 10 features are calculated on each of the band dimensions. These 10 features are the standard deviation, 25th, 50th and 75th percentile, and 6 equidistant t-steps. Through this procedure, we end up with a total of 120 features (12 bands x 10 features).

    # Model

    Where previously models had to be trained outside of openEO, we can now train Random Forest models in openEO itself. Hyperparameter tuning can be performed using a custom hyperparameter set. After training, the model is validated and used for prediction.

    # Implementation

    First, we load in a dataset with target labels. In order for the model to work, the target labels need to be integers. Also, we extract some target points from the target polygons.

    Next, we will create our featureset and use this featureset to train a model. The indices from which you calculate features can be adjusted by a parameter, but if you'd want you could even create the entire feature engineering pipeline yourself. If you are interested in knowing how to do so, you can dive a little bit deeper into the openEO code found here (opens new window).

    Subsequently, we can calculate a number of validation metrics from our test set. To do so, we do inference for the points of our y-test set and write these predictions out to a netCDF. The function calculate_validation_metrics (not part of openEO itself, but simply a client-side helper function) then loads in the y-test geojson and the netCDF with predicted values, extracts the points and stores the predicted values alongside their actual target labels in a dataframe.

    After inspecting the metrics and possibly further finetuning the model or dataset, we can do inference on an area of choice and write the result. Happy mapping!

    tile31UFS

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/large-scale-processing/index.html b/usecases/large-scale-processing/index.html index cfb8b23b2..3485980a9 100644 --- a/usecases/large-scale-processing/index.html +++ b/usecases/large-scale-processing/index.html @@ -8,7 +8,7 @@ - + @@ -198,6 +198,6 @@ your backend of choice. For instance, in a cloud environment with 16GB per machine and 4 cpu's, using slightly less than 4GB per worker is efficient as you can fit 4 parallel workers on a single VM, while requiring 6GB would fit only 2 workers and leave about 4GB unused.

    In our example, we used the Geotrellis backends, which has these execution options.

    # Starting map production

    The openEO Python client provides a useful tool to run multiple processing jobs in multiple backends:

    https://open-eo.github.io/openeo-python-client/cookbook/job_manager.html (opens new window)

    This class takes a GeoJSON corresponding to your tile grid and job properties per tiles, and triggers a function provided by you whenever a new job needs to be created. You can configure multiple backends, and set the number of parallel jobs per backend.

    This class also takes care of error handling, and can be considered more resilient compared to writing a simple loop yourself.

    A full example of how we use this can be found here (opens new window).

    This script uses a CSV file to track your jobs, and whenever it is interrupted it can simply resume from that CSV file, making it tolerant to failure.

    Tracking jobs by CSV

    # Errors during production

    It is expected to see jobs failing during production, which can be considered normal as long as the failure rate is not too high. We advice to quickly inspect error logs, and if no obvious reason for failure is found, a simple retry might be sufficient. In other cases it may be needed to increase memory. We also see a limited number of cases where for instance issues in the underlying product archive cause failures or artifacts. These are harder to resolve, and may require interaction with the backend to resove!

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/no2-monitoring/index.html b/usecases/no2-monitoring/index.html index f718bcd27..d0a93a289 100644 --- a/usecases/no2-monitoring/index.html +++ b/usecases/no2-monitoring/index.html @@ -8,7 +8,7 @@ - + @@ -199,6 +199,6 @@ For the GeoTiff and netCDF files you may want to store them into files though. The JSON output you could directly work with.

    # Result

    If you'd visualize the results of running the timeseries analysis for mean, min and max could results in such a chart:

    min/max/mean NO2 chart

    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/usecases/vessel-detection/index.html b/usecases/vessel-detection/index.html index 698bc77c7..db5c54a34 100644 --- a/usecases/vessel-detection/index.html +++ b/usecases/vessel-detection/index.html @@ -8,7 +8,7 @@ - + @@ -230,6 +230,6 @@

    # Result Visualisation

    A small dashboard has been provided with the Plotly Dash library to quickly visualise the results of our processing. We're using this dashboard so we can interface with the PyGeoApi server that hosts the Maritime Traffic data. You will need to use the canonical url of the job result, this can be found in the notebook via a helper fuinction, or in the job information via the web editor.

    PyGeoApi Data: https://features.dev.services.eodc.eu/collections/adriatic_vessels

    from eodc.visualisation.vessel_detection.app import app
     app.run()
     

    # Plotly Dashboard for results viewing

    Plotly Dashboard

    # With the additional auxilliary job

    Plotly Dashboard

    # Use Case -- Recap

    We've been through a number of iterations to arrive at this implementation.

    1. Recieved an initial implementation from Planetek, which we packaged and released as a custom function, "vessel_detection".
    2. Porting to Xarray. This resulted in a single function called "adaptive_thresholding", that removed the dependency to the ellipsoid corrected SENTINEL1_GRD imagery.
    3. Porting to existing OpenEO processes. This addresses the feedback from the previous review, i.e. the implementation should be reproducable for this use case.
    Last Updated: 12/30/2024, 11:00:53 AM
    - + diff --git a/workspaces/index.html b/workspaces/index.html index 440123ee8..559acbe74 100644 --- a/workspaces/index.html +++ b/workspaces/index.html @@ -8,7 +8,7 @@ - + @@ -270,6 +270,6 @@ result = collection.save_result(format="netCDF")

    # User Collections

    User collections can be created by using the export_collection process after the save_result process, they will then be available to load by using the load_collection process.

    Last Updated: 12/30/2024, 11:00:53 AM
    - +