Skip to content

Instantly share code, notes, and snippets.

@JeroenVerstraelen
Created June 3, 2024 07:22
Show Gist options
  • Save JeroenVerstraelen/c6ac9489d19077a68e9aa7cb3707dae0 to your computer and use it in GitHub Desktop.
Save JeroenVerstraelen/c6ac9489d19077a68e9aa7cb3707dae0 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"process_graph": {
"loadcollection1": {
"process_id": "load_collection",
"arguments": {
"bands": [
"B04",
"B08"
],
"id": "SENTINEL2_L2A",
"spatial_extent": {
"west": 16,
"south": 48,
"east": 16.1,
"north": 48.1
},
"temporal_extent": [
"2020-01-01",
"2020-03-15"
]
}
},
"reducedimension1": {
"process_id": "reduce_dimension",
"arguments": {
"data": {
"from_node": "loadcollection1"
},
"dimension": "bands",
"reducer": {
"process_graph": {
"arrayelement1": {
"process_id": "array_element",
"arguments": {
"data": {
"from_parameter": "data"
},
"index": 1
}
},
"arrayelement2": {
"process_id": "array_element",
"arguments": {
"data": {
"from_parameter": "data"
},
"index": 0
}
},
"subtract1": {
"process_id": "subtract",
"arguments": {
"x": {
"from_node": "arrayelement1"
},
"y": {
"from_node": "arrayelement2"
}
}
},
"multiply1": {
"process_id": "multiply",
"arguments": {
"x": 2.5,
"y": {
"from_node": "subtract1"
}
}
},
"arrayelement3": {
"process_id": "array_element",
"arguments": {
"data": {
"from_parameter": "data"
},
"index": 1
}
},
"arrayelement4": {
"process_id": "array_element",
"arguments": {
"data": {
"from_parameter": "data"
},
"index": 0
}
},
"multiply2": {
"process_id": "multiply",
"arguments": {
"x": 2.4,
"y": {
"from_node": "arrayelement4"
}
}
},
"add1": {
"process_id": "add",
"arguments": {
"x": {
"from_node": "arrayelement3"
},
"y": {
"from_node": "multiply2"
}
}
},
"add2": {
"process_id": "add",
"arguments": {
"x": {
"from_node": "add1"
},
"y": 1
}
},
"divide1": {
"process_id": "divide",
"arguments": {
"x": {
"from_node": "multiply1"
},
"y": {
"from_node": "add2"
}
},
"result": true
}
}
}
}
},
"adddimension1": {
"process_id": "add_dimension",
"arguments": {
"data": {
"from_node": "reducedimension1"
},
"label": "EVI",
"name": "bands",
"type": "bands"
}
},
"aggregatetemporalperiod1": {
"process_id": "aggregate_temporal_period",
"arguments": {
"data": {
"from_node": "adddimension1"
},
"dimension": "t",
"period": "month",
"reducer": {
"process_graph": {
"median1": {
"process_id": "median",
"arguments": {
"data": {
"from_parameter": "data"
}
},
"result": true
}
}
}
}
},
"applydimension1": {
"process_id": "apply_dimension",
"arguments": {
"data": {
"from_node": "aggregatetemporalperiod1"
},
"dimension": "t",
"process": {
"process_graph": {
"arrayinterpolatelinear1": {
"process_id": "array_interpolate_linear",
"arguments": {
"data": {
"from_parameter": "data"
}
},
"result": true
}
}
}
}
},
"applydimension2": {
"process_id": "apply_dimension",
"arguments": {
"data": {
"from_node": "applydimension1"
},
"dimension": "t",
"process": {
"process_graph": {
"arraycreate1": {
"process_id": "array_create",
"arguments": {
"data": {
"from_parameter": "data"
}
},
"result": true
}
}
},
"target_dimension": "bands"
}
},
"renamelabels1": {
"process_id": "rename_labels",
"arguments": {
"data": {
"from_node": "applydimension2"
},
"dimension": "bands",
"target": [
"S2-L2A-EVI_t0",
"S2-L2A-EVI_t1",
"S2-L2A-EVI_t2"
]
}
},
"aggregatespatial1": {
"process_id": "aggregate_spatial",
"arguments": {
"data": {
"from_node": "renamelabels1"
},
"geometries": {
"type": "FeatureCollection",
"features": [
{
"id": "15",
"type": "Feature",
"properties": {
"sample_id": "2021_BE_Flanders_full_1642470987",
"landcover_label": 11,
"croptype_label": 4351,
"irrigation_label": 0,
"valid_date": "2021-06-01",
"ref_id": "2021_EUR_DEMO_POLY_110",
"tile": "31UDS"
},
"geometry": {
"type": "Point",
"coordinates": [
2.70964374625748,
51.06891954507827
]
}
},
{
"id": "17",
"type": "Feature",
"properties": {
"sample_id": "2021_BE_Flanders_full_1965640332",
"landcover_label": 11,
"croptype_label": 4351,
"irrigation_label": 0,
"valid_date": "2021-06-01",
"ref_id": "2021_EUR_DEMO_POLY_110",
"tile": "31UDS"
},
"geometry": {
"type": "Point",
"coordinates": [
2.777548414187305,
51.00377983772219
]
}
},
{
"id": "18",
"type": "Feature",
"properties": {
"sample_id": "2021_BE_Flanders_full_2072010128",
"landcover_label": 11,
"croptype_label": 4352,
"irrigation_label": 0,
"valid_date": "2021-06-01",
"ref_id": "2021_EUR_DEMO_POLY_110",
"tile": "31UDS"
},
"geometry": {
"type": "Point",
"coordinates": [
2.723557574718434,
51.07883019470164
]
}
},
{
"id": "19",
"type": "Feature",
"properties": {
"sample_id": "2021_BE_Flanders_full_2072009926",
"landcover_label": 11,
"croptype_label": 4351,
"irrigation_label": 0,
"valid_date": "2021-06-01",
"ref_id": "2021_EUR_DEMO_POLY_110",
"tile": "31UDS"
},
"geometry": {
"type": "Point",
"coordinates": [
2.719879161390766,
51.10589339112414
]
}
}
]
},
"reducer": {
"process_graph": {
"mean1": {
"process_id": "mean",
"arguments": {
"data": {
"from_parameter": "data"
}
},
"result": true
}
}
}
}
},
"saveresult1": {
"process_id": "save_result",
"arguments": {
"data": {
"from_node": "aggregatespatial1"
},
"format": "csv",
"options": {}
},
"result": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment