Skip to main content

Postprocessing Build Plantable Area layer AWS Step Function

This step function is used to orchestrate the building of a plantable area layer and uploading the results to the desired hosting infrastructure. The function requires a successfull Slope, run postprocessing-build-slope-step-function if that is not the case. Processing the plantable area layer is basically a user defined reclassification of the slope layer. The step function uses the slope layer tiles and feeds those into a lambda which runs some Numpy calculations and returns a reclassified tile based on the same index as the slope layer.

Step functions

The step functions that are used within this step function:

Lambdas

./datastore.properties  # contains database schema information
./indexer.properties # contains coverage information (EPSG)
./timeregex.properties # contains regex string to determine date
./footprint.properties # contains trigger for COG hosting

Invocation description

The following keys are required:

job_id: str, job id reference
client_tag: str, client tag to determine costing

The following keys are specific and optional for this step function. It is not possible to use only one of the keys, if it's opted to go for the optional input all keys need to be used. Otherwise the options will fallback to their defaults. These keys are written within an options key.

breaks: list, an array of numeric class labels, default: [1, 2, 3, 4]
classes: list, an array of classes describing the values between which is classified, default: [0, 5, 10, 15, 20]
colours: list, an array of HTML colour codes used for the classes, default: ['#549d2c', '#becd16', #cd9616', '#250015']
si_unit: list, an array of string labels, default: ['0 - 5%', '5 - 10%', '10 - 15%', '> 20%']
nodata: uint, value to overwrite the source dataset nodata value

The following keys can be used whenever:

legacy: bool, a switch used to determine whether the Geoserver or Serverless Infrastructure is used, default: false

Example

A minimal example:

{
"job_id": "20220520151302-1327-0ad42aeec1014698b5efc953b83b5825",
"client_tag": "Some Client"
}

An optional example:

{
"job_id": "20230801082343-1336-59db45f24ed944a7bf50083090fc6ed0",
"client_tag": "Some Client",
"legacy": true,
"options": {
"classes": [
0,
50,
100
],
"breaks": [
1,
2
],
"nodata": 0,
"colours": [
"#549d2c",
"#250015"
],
"si_unit": [
"0 - 50%",
"50 - 100%"
]
}
}