Conversation
Identification of NBS per UOM. This development adds a new process called process_nbs.py that takes as input the clc.tif and hexagons_*.gpkg from proces_uomkc.py. Use case "coastal" uom.py had to be modified to produced clc.tif as it was not created before with the previous functionality of the process. The commit indludes test/api_cases.uc6.json, test/api_cases.uc8.jsonand test/api_cases.uc8.json to demostrate the new process application to different user cases and archetypes.
…e app.yml file Updating NbS process to define NbS table and mapping of hazards in the app.yml file. This change removes hardcoded matching of hazards from the API with hazards from the clc_nbs_hazazard_updated.csv table.
Correcting app.yml file to have nbs as an independant section. The configuration for nbs was embedded in hazards section before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Ioanna and Gerrit,
I’ve added a new process lare-nbs (Get NBS per UOM). Please find a description of the main changes of the inputs and outputs below:
I have created a clc_nbs_hazard_updated.csv file with the "scripts/harmonize_clc_nbs_hazard.py". This codes harmonizes the table to have a single name per hazard in the case for intance of "Floods" and "Flood". The table also adds the landscape_case (Urban / Rural / Coastal), based on the information in data/landscapearchetype.csv, using desc0 as the linking key between the two tables. Note that landscapearchetype.csv is incomplete as not all have desc0 have a lac_d, and as a result not all NbS can taken into consideration in the lare-nbs process. We need to update this table to bring all the available NbS (e.g. Agro-forestry areas).
Config (app.yml) has new parameters where the NbS csv path is defined. The parameters also define the matching between hazard as defined in the app.yml and hazard as defined in the NbS csv table.
Under nbs:
nbs_table: path to the NBS CSV (now data/clc_nbs_hazard_updated.csv)
nbs_labels: maps API/hazard keys (heat, drought, pluvial_RP200, …) to hazard names in that CSV (Heat, Drought, Flood, …)
The hexagon_*.gpkg file has three new columns after running the process_nbs.py that can be used in the fronted to colour the hexagons or display a list of available NbS for the current combination of archeotype + hazard.
clc_nbs_majority: CLC class with the most pixels that has NBS for the selected archetype + hazard
nbs_list_majority: NbS codes for that class
clc_nbs_majority_area: pixel count for that CLC × CLC pixel size from clc.tif → area in m²
Note that in order to decide whether a list of NbS is applicable you also need to check if the hexagos is in a hotspot based on the columns created by uom.py and uomkcs.py processes.
I’ve checked results in QGISa and they look consistent.
Best,
Mario