Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#146 and #125 gis functions in separate file and ground floor height updating #178

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ cache
/examples/FIAT_database
hydromt_fiat/data/damage_functions/flooding/AllDDF_HAZUS_fractions.xlsx
hydromt_fiat/data/damage_functions/flooding/~$AllDDF_HAZUS_fractions.xlsx
examples/data/update_ground_floor_height/test_update_ground_floor_height_points
examples/data/update_ground_floor_height/test_update_ground_floor_height_polygons
examples/data/building_footprints/fiat_model_bfs
examples/data/aggregation_zones_example/aggregation_test_1_output
examples/data/aggregation_zones_example/aggregation_test_2_output
45 changes: 45 additions & 0 deletions examples/data/hydromt_fiat_catalog_USA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

NSI:
path: "https://nsi.sec.usace.army.mil/nsiapi/structures?fmt=fc"
data_type: GeoDataFrame
driver: vector
crs: 4326
translation_fn: "attribute_linking/NSI_attributes_to_FIAT.json"
meta:
category: exposure

default_vulnerability_curves:
path: damage_functions/flooding/Hazus_IWR_curves.csv
data_type: DataFrame
driver: csv
meta:
category: vulnerability
source: HAZUS SQL database, USACE-IWR and FEMA expert elicitation curves. The source of these curves is the Draft Report Nonresidential Flood Depth-Damage Functions Derived from Expert Elicitation, April 2009, Revised 2013. FEMA Contract Number HSFEHQ-06-D-0162. Task Order HSFEHQ-08-J-0014. Not for distribution, but data shared by USACE.

jrc_vulnerability_curves:
path: damage_functions/flooding/JRC_damage_functions.xlsx
data_type: DataFrame
driver: xlsx
meta:
category: vulnerability

hazus_max_potential_damages:
path: max_potential_damages/damage_values_fema_hazus-inventory-technical-manual-4.2.3.xlsx
data_type: DataFrame
driver: xlsx
meta:
category: vulnerability

social_vulnerability:
path: social_vulnerability/census_vulnerability_data_codebook.xlsx
data_type: DataFrame
driver: xlsx
meta:
category: social_vulnerability

default_hazus_iwr_linking:
path: vulnerability_linking/default_hazus_iwr_curve_linking.csv
data_type: DataFrame
driver: csv
meta:
category: vulnerability
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,995 changes: 1,995 additions & 0 deletions examples/data/update_ground_floor_height/fiat_model/exposure/exposure.csv

Large diffs are not rendered by default.

Binary file not shown.
20 changes: 20 additions & 0 deletions examples/data/update_ground_floor_height/fiat_model/settings.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[global]
crs = "epsg:4326"

[output]
path = "output"

[output.csv]
name = "output.csv"

[output.geom]
name1 = "spatial.gpkg"

[vulnerability]
file = "./vulnerability/vulnerability_curves.csv"
scale = 0.1

[exposure.geom]
csv = "./exposure/exposure.csv"
crs = "EPSG:4326"
file1 = "./exposure/building_points.gpkg"
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#UNIT=feet
#METHOD,max,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean,mean
water depth [feet],AGR1,COM1,COM10,COM2,COM3,COM4,COM5,COM6,COM7,COM8,COM9,EDU1,GOV1,GOV2,IND1,IND2,IND3,IND4,IND5,IND6,REL1,RES1-1SNB,RES1-1SWB,RES1-2SNB,RES1-2SWB,RES1-3SNB,RES1-3SWB,RES2,RES3A,RES3B,RES3C,RES3D,RES3E,RES3F,RES4,RES5,RES6
-4.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.07,0.0,0.04,0.0,0.03,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
-3.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.07,0.0,0.04,0.0,0.03,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
-2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.07,0.0,0.08,0.0,0.06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
-1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.11,0.0,0.14,0.0,0.1,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
0.0,0.0,0.01,0.0,0.0,0.0,0.02,0.0,0.0,0.02,0.01,0.0,0.0,0.0,0.0,0.01,0.01,0.0,0.0,0.0,0.0,0.0,0.18,0.17,0.11,0.19,0.05,0.12,0.11,0.12,0.12,0.12,0.12,0.12,0.12,0.0,0.0,0.0
1.0,0.06,0.09,0.03,0.05,0.09,0.11,0.11,0.0,0.11,0.09,0.02,0.05,0.05,0.07,0.1,0.09,0.13,0.1,0.13,0.22,0.1,0.22,0.21,0.12,0.21,0.08,0.14,0.44,0.25,0.25,0.25,0.25,0.25,0.25,0.03,0.07,0.07
2.0,0.11,0.14,0.05,0.08,0.12,0.16,0.11,0.0,0.12,0.11,0.04,0.07,0.08,0.1,0.12,0.14,0.14,0.14,0.14,0.31,0.11,0.25,0.29,0.14,0.26,0.12,0.2,0.63,0.5,0.5,0.5,0.5,0.5,0.5,0.05,0.1,0.1
3.0,0.15,0.16,0.06,0.11,0.13,0.22,0.12,0.2,0.13,0.12,0.05,0.09,0.13,0.11,0.15,0.17,0.19,0.18,0.19,0.37,0.11,0.28,0.34,0.18,0.29,0.17,0.25,0.73,0.75,0.75,0.75,0.75,0.75,0.75,0.06,0.14,0.14
4.0,0.19,0.18,0.07,0.13,0.16,0.28,0.13,0.25,0.14,0.14,0.05,0.09,0.14,0.12,0.19,0.22,0.22,0.22,0.22,0.43,0.12,0.3,0.38,0.2,0.34,0.19,0.31,0.78,1.0,1.0,1.0,1.0,1.0,1.0,0.07,0.15,0.15
5.0,0.25,0.2,0.08,0.16,0.19,0.35,0.15,0.3,0.16,0.16,0.05,0.1,0.14,0.15,0.22,0.26,0.25,0.26,0.25,0.47,0.12,0.31,0.43,0.22,0.39,0.22,0.36,0.79,1.0,1.0,1.0,1.0,1.0,1.0,0.09,0.15,0.15
6.0,0.3,0.23,0.1,0.19,0.22,0.38,0.17,0.35,0.17,0.18,0.06,0.11,0.15,0.17,0.26,0.3,0.28,0.34,0.28,0.5,0.13,0.4,0.5,0.24,0.44,0.24,0.38,0.81,1.0,1.0,1.0,1.0,1.0,1.0,0.12,0.16,0.16
7.0,0.35,0.26,0.13,0.22,0.25,0.41,0.19,0.4,0.18,0.2,0.08,0.13,0.17,0.2,0.3,0.32,0.3,0.41,0.3,0.54,0.14,0.43,0.5,0.26,0.5,0.25,0.41,0.82,1.0,1.0,1.0,1.0,1.0,1.0,0.14,0.18,0.18
8.0,0.41,0.3,0.17,0.25,0.28,0.44,0.22,0.43,0.2,0.22,0.1,0.15,0.19,0.23,0.35,0.35,0.33,0.42,0.33,0.57,0.14,0.43,0.54,0.3,0.55,0.3,0.44,0.83,1.0,1.0,1.0,1.0,1.0,1.0,0.18,0.2,0.2
9.0,0.46,0.34,0.21,0.29,0.32,0.47,0.24,0.47,0.22,0.26,0.12,0.17,0.22,0.27,0.39,0.37,0.34,0.42,0.34,0.61,0.15,0.45,0.55,0.34,0.57,0.35,0.48,0.84,1.0,1.0,1.0,1.0,1.0,1.0,0.21,0.23,0.23
10.0,0.51,0.38,0.25,0.32,0.35,0.5,0.28,0.5,0.24,0.29,0.15,0.2,0.26,0.31,0.42,0.39,0.36,0.45,0.36,0.63,0.17,0.46,0.55,0.38,0.59,0.38,0.5,0.85,1.0,1.0,1.0,1.0,1.0,1.0,0.26,0.26,0.26
11.0,0.57,0.42,0.3,0.37,0.39,0.54,0.31,0.53,0.27,0.33,0.2,0.24,0.31,0.35,0.48,0.43,0.39,0.47,0.39,0.64,0.19,0.47,0.57,0.39,0.61,0.39,0.52,0.86,1.0,1.0,1.0,1.0,1.0,1.0,0.31,0.3,0.3
12.0,0.63,0.47,0.35,0.41,0.43,0.57,0.34,0.55,0.3,0.37,0.24,0.28,0.37,0.4,0.5,0.46,0.4,0.49,0.4,0.65,0.24,0.47,0.58,0.4,0.63,0.4,0.54,0.88,1.0,1.0,1.0,1.0,1.0,1.0,0.36,0.34,0.34
13.0,0.7,0.51,0.41,0.45,0.47,0.59,0.37,0.57,0.34,0.41,0.29,0.33,0.44,0.44,0.51,0.48,0.42,0.5,0.42,0.67,0.3,0.49,0.6,0.42,0.65,0.42,0.56,0.89,1.0,1.0,1.0,1.0,1.0,1.0,0.41,0.38,0.38
14.0,0.75,0.55,0.47,0.49,0.5,0.62,0.4,0.6,0.37,0.45,0.35,0.39,0.51,0.48,0.53,0.5,0.42,0.5,0.42,0.68,0.38,0.5,0.62,0.43,0.66,0.43,0.57,0.9,1.0,1.0,1.0,1.0,1.0,1.0,0.46,0.42,0.42
15.0,0.79,0.58,0.52,0.52,0.54,0.66,0.44,0.6,0.41,0.5,0.42,0.45,0.59,0.52,0.54,0.51,0.43,0.5,0.43,0.69,0.45,0.5,0.63,0.44,0.68,0.44,0.59,0.91,1.0,1.0,1.0,1.0,1.0,1.0,0.5,0.47,0.47
16.0,0.82,0.61,0.58,0.55,0.57,0.68,0.48,0.6,0.44,0.53,0.49,0.52,0.65,0.56,0.55,0.54,0.43,0.5,0.43,0.7,0.52,0.5,0.65,0.45,0.69,0.45,0.61,0.92,1.0,1.0,1.0,1.0,1.0,1.0,0.54,0.52,0.52
17.0,0.84,0.64,0.65,0.58,0.61,0.7,0.51,0.6,0.48,0.57,0.56,0.59,0.7,0.6,0.55,0.55,0.44,0.5,0.44,0.71,0.58,0.51,0.67,0.47,0.71,0.47,0.63,0.94,1.0,1.0,1.0,1.0,1.0,1.0,0.58,0.57,0.57
18.0,0.87,0.67,0.71,0.61,0.64,0.72,0.55,0.6,0.51,0.6,0.62,0.64,0.74,0.64,0.56,0.57,0.44,0.5,0.44,0.72,0.64,0.51,0.69,0.48,0.72,0.48,0.65,0.95,1.0,1.0,1.0,1.0,1.0,1.0,0.62,0.62,0.62
19.0,0.89,0.69,0.76,0.63,0.68,0.74,0.59,0.6,0.54,0.63,0.68,0.69,0.79,0.68,0.56,0.59,0.44,0.5,0.44,0.73,0.69,0.52,0.7,0.49,0.74,0.49,0.67,0.96,1.0,1.0,1.0,1.0,1.0,1.0,0.66,0.67,0.67
20.0,0.9,0.71,0.81,0.66,0.71,0.76,0.63,0.6,0.56,0.66,0.74,0.74,0.83,0.72,0.57,0.6,0.44,0.5,0.44,0.74,0.74,0.52,0.72,0.5,0.75,0.5,0.69,0.97,1.0,1.0,1.0,1.0,1.0,1.0,0.7,0.72,0.72
21.0,0.92,0.74,0.86,0.68,0.75,0.77,0.67,0.6,0.59,0.69,0.8,0.79,0.87,0.76,0.57,0.62,0.44,0.5,0.44,0.75,0.78,0.53,0.74,0.52,0.77,0.52,0.71,0.98,1.0,1.0,1.0,1.0,1.0,1.0,0.74,0.77,0.77
22.0,0.93,0.76,0.91,0.7,0.78,0.78,0.71,0.6,0.61,0.73,0.86,0.84,0.91,0.8,0.57,0.63,0.45,0.5,0.45,0.76,0.82,0.53,0.76,0.53,0.79,0.53,0.73,0.99,1.0,1.0,1.0,1.0,1.0,1.0,0.78,0.82,0.82
23.0,0.95,0.78,0.96,0.71,0.82,0.79,0.75,0.6,0.64,0.76,0.92,0.89,0.95,0.84,0.58,0.65,0.45,0.5,0.45,0.76,0.85,0.54,0.77,0.54,0.8,0.54,0.75,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.82,0.87,0.87
24.0,0.96,0.8,1.0,0.73,0.85,0.8,0.79,0.6,0.66,0.78,0.98,0.94,0.98,0.88,0.58,0.66,0.45,0.5,0.45,0.77,0.88,0.54,0.79,0.56,0.82,0.56,0.77,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.86,0.92,0.92
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
,Name,Link,BldgDmgFnID,Occupancy,Source,Description,full_identifier
0,AGR1,AGR1,616,AGR1 ,USACE - Galveston,"Average Agriculture, structure","616AGR1USACE-GalvestonAverageAgriculture,structure"
1,COM1,COM1,217,COM1 ,USACE - Galveston,"Average Retail, Structure","217COM1USACE-GalvestonAverageRetail,Structure"
2,COM10,COM10,543,COM10,USACE - Galveston,"Garage, structure","543COM10USACE-GalvestonGarage,structure"
3,COM2,COM2,341,COM2 ,USACE - Galveston,"Average wholesale, Structure","341COM2USACE-GalvestonAveragewholesale,Structure"
4,COM3,COM3,375,COM3 ,USACE - Galveston,"Average Personal & Repair Services, Structure","375COM3USACE-GalvestonAveragePersonal&RepairServices,Structure"
5,COM4,COM4,431,COM4 ,USACE - Galveston,"Average Prof/Tech Services, Structure","431COM4USACE-GalvestonAverageProf/TechServices,Structure"
6,COM5,COM5,467,COM5 ,USACE - Galveston,"Bank, Structure","467COM5USACE-GalvestonBank,Structure"
7,COM6,COM6,474,COM6 ,USACE - Galveston,"Hospital, Structure","474COM6USACE-GalvestonHospital,Structure"
8,COM7,COM7,475,COM7 ,USACE - Galveston,"Average Medical Office, Structure","475COM7USACE-GalvestonAverageMedicalOffice,Structure"
9,COM8,COM8,493,COM8 ,USACE - Galveston,"Average Entertainment/Recreation, Structure","493COM8USACE-GalvestonAverageEntertainment/Recreation,Structure"
10,COM9,COM9,532,COM9 ,USACE - Galveston,"Average theatre, Structure","532COM9USACE-GalvestonAveragetheatre,Structure"
11,EDU1,EDU1,643,EDU1 ,USACE - Galveston,"Average school, structure","643EDU1USACE-GalvestonAverageschool,structure"
12,GOV1,GOV1,631,GOV1 ,USACE - Galveston,"Average government services, structure","631GOV1USACE-GalvestonAveragegovernmentservices,structure"
13,GOV2,GOV2,640,GOV2 ,USACE - Galveston,"Average emergency response, Structure","640GOV2USACE-GalvestonAverageemergencyresponse,Structure"
14,IND1,IND1,545,IND1 ,USACE - Galveston,"Average heavy industrial, Structure","545IND1USACE-GalvestonAverageheavyindustrial,Structure"
15,IND2,IND2,559,IND2 ,USACE - Galveston,"Average light industrial, structure","559IND2USACE-GalvestonAveragelightindustrial,structure"
16,IND3,IND3,575,IND3 ,USACE - Galveston,"Average Food/Drug/Chem, Structure","575IND3USACE-GalvestonAverageFood/Drug/Chem,Structure"
17,IND4,IND4,586,IND4 ,USACE - Galveston,"Average Metals/Minerals processing, structure","586IND4USACE-GalvestonAverageMetals/Mineralsprocessing,structure"
18,IND5,IND5,591,IND5 ,USACE - Galveston,"Average High Technology, structure","591IND5USACE-GalvestonAverageHighTechnology,structure"
19,IND6,IND6,592,IND6 ,USACE - Galveston,"Average Construction, structure","592IND6USACE-GalvestonAverageConstruction,structure"
20,REL1,REL1,624,REL1 ,USACE - Galveston,"Church, structure","624REL1USACE-GalvestonChurch,structure"
21,RES1-1SNB,RES1-1SNB,105,RES1 ,FIA,"one floor, no basement, Structure, A-Zone","105RES1FIAonefloor,nobasement,Structure,A-Zone"
22,RES1-1SWB,RES1-1SWB,106,RES1 ,FIA (MOD.),"one floor, w/ basement, Structure, A-Zone","106RES1FIA(MOD.)onefloor,w/basement,Structure,A-Zone"
23,RES1-2SNB,RES1-2SNB,107,RES1 ,FIA,"two floors, no basement, Structure, A-Zone","107RES1FIAtwofloors,nobasement,Structure,A-Zone"
24,RES1-2SWB,RES1-2SWB,108,RES1 ,FIA (MOD.),"two floors, w/ basement, Structure, A-Zone","108RES1FIA(MOD.)twofloors,w/basement,Structure,A-Zone"
25,RES1-3SNB,RES1-3SNB,109,RES1 ,FIA,"three or more floors, no basement, Structure, A-Zone","109RES1FIAthreeormorefloors,nobasement,Structure,A-Zone"
26,RES1-3SWB,RES1-3SWB,110,RES1 ,FIA (MOD.),"three or more floors, w/ basement, Structure, A-Zone","110RES1FIA(MOD.)threeormorefloors,w/basement,Structure,A-Zone"
27,RES2,RES2,189,RES2 ,FIA,"Mobile home, structure, A-Zone","189RES2FIAMobilehome,structure,A-Zone"
28,RES3A,RES3A,659,RES3A,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","659RES3ABCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
29,RES3B,RES3B,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","660RES3BBCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
30,RES3C,RES3C,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","660RES3BBCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
31,RES3D,RES3D,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","660RES3BBCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
32,RES3E,RES3E,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","660RES3BBCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
33,RES3F,RES3F,660,RES3B,BCAR - Jan 2011,"1to2 Stories, slab - no basement, Coastal A or V Zone","660RES3BBCAR-Jan20111to2Stories,slab-nobasement,CoastalAorVZone"
34,RES4,RES4,209,RES4 ,USACE - Galveston,"Average Hotel & Motel, structure","209RES4USACE-GalvestonAverageHotel&Motel,structure"
35,RES5,RES5,214,RES5 ,USACE - Galveston,"Average institutional dormitory, structure","214RES5USACE-GalvestonAverageinstitutionaldormitory,structure"
36,RES6,RES6,215,RES6 ,USACE - Galveston,"Nursing Home, structure","215RES6USACE-GalvestonNursingHome,structure"
Binary file not shown.
Loading