Skip to content

Instantly share code, notes, and snippets.

@m-mohr
Last active December 17, 2019 13:16
Show Gist options
  • Save m-mohr/ec69ca2fc27a003aa3bd78a8e4b512da to your computer and use it in GitHub Desktop.
Save m-mohr/ec69ca2fc27a003aa3bd78a8e4b512da to your computer and use it in GitHub Desktop.
{
"dc": {
"process_id": "load_collection",
"description": "Loading the data; The order of the specified bands is important for the following reduce operation.",
"arguments": {
"id": "Sentinel-2",
"spatial_extent": {
"west": 16.1,
"east": 16.6,
"north": 48.6,
"south": 47.2
},
"temporal_extent": ["2018-01-01", "2018-02-01"],
"bands": ["B08", "B04", "B02"]
}
},
"evi": {
"process_id": "reduce",
"description": "Compute the EVI. Formula: 2.5 * (NIR - RED) / (1 + NIR + 6*RED + -7.5*BLUE)",
"arguments": {
"data": {"from_node": "dc"},
"dimension": "spectral",
"reducer": {
"callback": {
"sub": {
"process_id": "subtract",
"arguments": {
"data": [{"from_argument": "data", "index": "B8"}, {"from_argument": "data", "index": "B4"}]
}
},
"p1": {
"process_id": "product",
"arguments": {
"data": [6, {"from_argument": "data", "index": "B4"}]
}
},
"p2": {
"process_id": "product",
"arguments": {
"data": [-7.5, {"from_argument": "data", "index": "B2"}]
}
},
"sum": {
"process_id": "sum",
"arguments": {
"data": [1, {"from_argument": "data", "index": "B8"}, {"from_node": "p1"}, {"from_node": "p2"}]
}
},
"div": {
"process_id": "divide",
"arguments": {
"data": [{"from_node": "sub"}, {"from_node": "sum"}]
}
},
"p3": {
"process_id": "product",
"arguments": {
"data": [2.5, {"from_node": "div"}]
},
"result": true
}
}
}
}
},
"mintime": {
"process_id": "reduce",
"description": "Compute a minimum time composite by reducing the temporal dimension",
"arguments": {
"data": {"from_node": "evi"},
"dimension": "temporal",
"reducer": {
"callback": {
"min": {
"process_id": "min",
"arguments": {
"data": {"from_argument": "data"}
},
"result": true
}
}
}
}
},
"save": {
"process_id": "save_result",
"arguments": {
"data": {"from_node": "mintime"},
"format": "GTiff"
},
"result": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment