kartoza / fbf-project

Project data and resources for WB Forecast Based Financing work
22 stars 14 forks source link

Map should show which buildings are flooded #123

Closed timlinux closed 4 years ago

timlinux commented 4 years ago

When clicking a flood I dont get so see which buildings are flooded in a different colour any more.

timlinux commented 4 years ago

image

I would like to follow this scheme for visualisation of flooded buildings:

Use a color gradient for flooded buildings based on their vulnerability. Green low vulnerability, red high vulnerability. Have two flooded building layers for any flood event: 1) drawn with a red border are buildings that are in flood class 2 or higher 2) drawn with no border but using graduated colours for vulnerability are buildings that are in the flood footprint but in flood class 1 (low hazard)

The layer selector should let you toggle on or off buildings from the 2 groups as shown below.

image

timlinux commented 4 years ago

@gubuntu comment please

timlinux commented 4 years ago

See also #34 - we can close that when we close this

lucernae commented 4 years ago

Building's intersected materialized view needs to be populated first so we can have the layer by each flood event. Ping me back/reassign when the layer is done 👍

lucernae commented 4 years ago

I made the corresponding PR here: https://github.com/kartoza/fbf-project/pull/148

Layer spec:

Layer name: kartoza:exposed_buildings

Necessary fields for CQL filters:
 - depth_class: id of it's depth class of the building
 - dc_code: district code key from district table
 - sub_district_id: sub district code key from sub district table (sub_dc_code)
 - village_id: village code key from village table (village_code)

Fields for styling (in GeoServer styles)
 - vulnerability_score
 - depth_class
NyakudyaA commented 4 years ago

@lucernae I do not see the layer yet in GeoServer. Should I create it first. disregard my comment. Will create it first

timlinux commented 4 years ago

I added the needed view (see #134) and I have added the layer in GeoServer

image

image

NyakudyaA commented 4 years ago

I added the needed view (see #134) and I have added the layer in GeoServer

image

image

I will modify the view to add the vulnerability score, should this remain slow we can turn the view into mview

NyakudyaA commented 4 years ago

I have added the style for the layer style-added

@timlinux what is the grading for vulnerability ? 0 - 0.3 > low 0.4 - 0.6 > medium 0.7 - 1 > high

lucernae commented 4 years ago

@NyakudyaA The grading is on depth_class table itself with corresponding id.

NyakudyaA commented 4 years ago

@NyakudyaA The grading is on depth_class table itself with the corresponding id.

The depth class I understand about it. meant the scale for the total_vulnerability

I have implemented this @lucernae implemented

NyakudyaA commented 4 years ago

This is now working as expected