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

Update to newest Delft version and setup impacted population #406

Merged
merged 50 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1137d96
start to setup a method to add affected population
Santonia27 Oct 21, 2024
02926ab
fix method name impacted pop
Santonia27 Oct 21, 2024
36719e5
add code to provide one file for occupancy and asset location
Santonia27 Oct 23, 2024
f468a8f
add docstring
Santonia27 Oct 23, 2024
6ece46e
fix self.get_geodataframe
Santonia27 Oct 23, 2024
192e4df
fix asset location
Santonia27 Oct 23, 2024
558b98d
add handling for multipolygons
Santonia27 Oct 23, 2024
89a5b03
write exposure geopackage
Santonia27 Oct 24, 2024
562f6d6
Update hydromt fiat exposure output names (#403)
Santonia27 Oct 24, 2024
ccada6f
revert code
Santonia27 Oct 24, 2024
7c229fd
name fix ground_elevtn
Santonia27 Oct 24, 2024
5f2282d
bugfix setup occupancy condition warning message. Add condition for g…
Santonia27 Oct 29, 2024
ba98640
clip exposure when setup hazard to hazard bounds. Add fn affected peo…
Santonia27 Oct 30, 2024
04e091f
replace max_damage with max_damages
Santonia27 Oct 30, 2024
7dc74df
fix fn_damage_{ to fn_damages_{
Santonia27 Oct 30, 2024
4f112e4
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Oct 31, 2024
4a2bc1f
bugfix object_id and Object ID
Santonia27 Oct 31, 2024
f1fa9c0
remove method=nearest
Santonia27 Oct 31, 2024
40d120e
add again method nearest just so it can run. need fixing
Santonia27 Oct 31, 2024
03c0aca
remove method nearest
Santonia27 Oct 31, 2024
75e9e29
revert to original (main)
Santonia27 Oct 31, 2024
7e8e8f4
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 4, 2024
f453ed1
remove bug write geoms
Santonia27 Nov 18, 2024
e1600c5
add additional/aggregation attributes to read geoms
Santonia27 Nov 18, 2024
43bfde2
add aggregation and additional attributes to read()
Santonia27 Nov 18, 2024
7e7ced9
remove #
Santonia27 Nov 18, 2024
7d6ea56
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 20, 2024
a5b9eb6
revert old naming from merge of main to new naming
Santonia27 Nov 20, 2024
81c790e
#if isinstance(asset_locations, str):
Santonia27 Nov 20, 2024
c721845
ead spatial joints incl bf
Santonia27 Nov 20, 2024
8bf6c4d
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 20, 2024
efc8ba0
ADD IF STATEMENT GFH CONVERSION
Santonia27 Nov 20, 2024
f16deb0
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 21, 2024
1770575
get_full_gdf if-statement for old and new model object id (temporary)
Santonia27 Nov 21, 2024
c94c60c
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 26, 2024
f134420
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Nov 27, 2024
7ca29da
update damages to damage
Santonia27 Nov 27, 2024
9a053e0
update damages to damage
Santonia27 Nov 27, 2024
c3d64ed
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Dec 3, 2024
89781cc
bugfix Object ID and object_id transition code
Santonia27 Dec 3, 2024
4012375
Merge branch 'main' of https://github.com/Deltares/hydromt_fiat into …
Santonia27 Dec 10, 2024
f9cc258
update geometry files Object ID to object_id
Santonia27 Dec 11, 2024
c2a9a52
update notebooks
Santonia27 Dec 11, 2024
62abd7d
fix tests
Santonia27 Dec 11, 2024
1f0beb7
fix tests
Santonia27 Dec 11, 2024
6175459
fox road network notebook
Santonia27 Dec 11, 2024
6ae4ac2
replace Max Potential Damage
Santonia27 Dec 12, 2024
ce56986
replace Max Potential Damage
Santonia27 Dec 12, 2024
cc7edcc
refactor multipolygon function
Santonia27 Dec 12, 2024
ee01f89
snakecase segment_length
Santonia27 Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/data/national_structure_inventory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ user can access the data through providing 'NSI' in the configuration file as su
The following attributes for Delft-FIAT (left-hand side) will be filled with data from the
corresponding NSI fields (right-hand side)::

"Object ID": "fd_id",
"Object Name": "fd_id",
"Primary Object Type": "st_damcat",
"Secondary Object Type": "occtype",
"Max Potential Damage: Structure": "val_struct",
"Max Potential Damage: Content": "val_cont",
"Ground Elevation": "ground_el",
"object_id": "fd_id",
"object_name": "fd_id",
"primary_object_type": "st_damcat",
"secondary_object_type": "occtype",
"max_damage_structure": "val_struct",
"max_damage_content": "val_cont",
"ground_elevtn": "ground_el",
"X Coordinate": "x",
"Y Coordinate": "y",
"Aggregation Label: Census Block": "cbfips"
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/user_guide_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ After loading the configuration file (*.yml*) and executing the **FIAT Hydro MT*

Aggregation Label: {label_name}

*Note: It may occur that polygons overlap in the aggregation vector files. In this case the information for the affected Object ID will be merged and both aggregation zones will be assigned to the object.* ::
*Note: It may occur that polygons overlap in the aggregation vector files. In this case the information for the affected object_id will be merged and both aggregation zones will be assigned to the object.* ::

Object ID Zone
object_id Zone

1 Base Zone 1
2 Land Use 1, Land Use 3 > two zones (polygons) in the land-use aggregation file overlap and object
Expand Down
655 changes: 257 additions & 398 deletions examples/add_roadnetwork.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions examples/aggregation_zones_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Load the newly created *exposure.csv* file from the <em>/ \"output\" / \"aggregation_zones_test1\" /</em> - directory and the original exposure geopackage from the <em> \"exposure\" / \"buildings.gpkg\" </em>. Before the results can be displayed, we must merge the **exposure.csv** with the **buildings.gpkg** via common *\"Object ID\"*. "
"Load the newly created *exposure.csv* file from the <em>/ \"output\" / \"aggregation_zones_test1\" /</em> - directory and the original exposure geopackage from the <em> \"exposure\" / \"buildings.gpkg\" </em>. Before the results can be displayed, we must merge the **exposure.csv** with the **buildings.gpkg** via common *\"object_id\"*. "
]
},
{
Expand All @@ -354,7 +354,7 @@
"new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"aggregation_zones_test1\" / \"exposure\" / \"buildings.gpkg\")\n",
"\n",
"#Merge dataframe with GeoDataFrame\n",
"merged_gdf = new_exposure.merge(df_single_aggregation, left_on='Object ID', right_on='Object ID', how='inner')\n",
"merged_gdf = new_exposure.merge(df_single_aggregation, left_on='object_id', right_on='object_id', how='inner')\n",
"\n",
"#Display base_zones aggregation zone\n",
"base_zones_map = merged_gdf.explore(column = 'Base_zones')\n",
Expand All @@ -372,7 +372,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Load the newly created *exposure.csv* file from the <em>/ \"output\" / \"aggregation_zones_test2\" /</em> - directory and the original exposure geopackage from the <em> \"exposure\" / \"buildings.gpkg\" </em>. Before the results can be displayed, we must merge the **exposure.csv** with the **buildings.gpkg** via common *\"Object ID\"*. "
"Load the newly created *exposure.csv* file from the <em>/ \"output\" / \"aggregation_zones_test2\" /</em> - directory and the original exposure geopackage from the <em> \"exposure\" / \"buildings.gpkg\" </em>. Before the results can be displayed, we must merge the **exposure.csv** with the **buildings.gpkg** via common *\"object_id\"*. "
]
},
{
Expand All @@ -388,7 +388,7 @@
"new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"aggregation_zones_test2\" / \"exposure\" / \"buildings.gpkg\")\n",
"\n",
"# Merge dataframe with GeoDataFrame\n",
"merged_gdf_multiple = new_exposure.merge(df_multiple_aggregation, left_on='Object ID', right_on='Object ID', how='inner')"
"merged_gdf_multiple = new_exposure.merge(df_multiple_aggregation, left_on='object_id', right_on='object_id', how='inner')"
]
},
{
Expand Down
Binary file not shown.
1,000 changes: 500 additions & 500 deletions examples/data/aggregation_zones/fiat_model/exposure/exposure.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object ID,Object Name,Primary Object Type,Secondary Object Type,Max Potential Damage: Structure,Max Potential Damage: Content,Ground Elevation,X Coordinate,Y Coordinate,Aggregation Label: Census Block,Ground Floor Height,Extraction Method,Damage Function: Structure,Aggregation Label: Base_zones
object_id,object_name,primary_object_type,secondary_object_type,max_damage_structure,max_damage_content,ground_elevtn,X Coordinate,Y Coordinate,Aggregation Label: Census Block,ground_flht,extract_method,fn_damage_structure,Aggregation Label: Base_zones
573783417,573783417,COM,RES4,1177614.2,588807.1,8.381748561544418,-79.93000008,32.770545239,450190002002010,1,centroid,RES4,SR-3
573783433,573783433,COM,RES4,476216.254,238108.127,7.374183635444641,-79.92968382,32.771271301,450190002002010,1,centroid,RES4,SR-4
573785665,573785665,RES,RES1-2SNB,330007.42,165003.71,7.364031290178299,-79.93179589,32.773364727,450190002002004,1,centroid,RES1-2SNB,SR-5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object ID,Object Name,Primary Object Type,Secondary Object Type,Max Potential Damage: Structure,Max Potential Damage: Content,Ground Elevation,X Coordinate,Y Coordinate,Aggregation Label: Census Block,Ground Floor Height,Extraction Method,Damage Function: Structure,Aggregation Label: Base_zones,Aggregation Label: Land_use,Aggregation Label: Accommodation_type
object_id,object_name,primary_object_type,secondary_object_type,max_damage_structure,max_damage_content,ground_elevtn,X Coordinate,Y Coordinate,Aggregation Label: Census Block,ground_flht,extract_method,fn_damage_structure,Aggregation Label: Base_zones,Aggregation Label: Land_use,Aggregation Label: Accommodation_type
573783417,573783417,COM,RES4,1177614.2,588807.1,8.381748561544418,-79.93000008,32.770545239,450190002002010,1,centroid,RES4,SR-3,Neighborhood,
573783433,573783433,COM,RES4,476216.254,238108.127,7.374183635444641,-79.92968382,32.771271301,450190002002010,1,centroid,RES4,SR-4,Neighborhood,
573785665,573785665,RES,RES1-2SNB,330007.42,165003.71,7.364031290178299,-79.93179589,32.773364727,450190002002004,1,centroid,RES1-2SNB,SR-5,Neighborhood,
Expand Down
2 changes: 1 addition & 1 deletion examples/data/aggregation_zones/fiat_model/settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ file = "./exposure/exposure.csv"
[exposure.geom]
crs = "EPSG:4326"
unit = "feet"
file1 = "./exposure/buildings.gpkg"
file1 = "exposure/buildings.gpkg"
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object ID,Object Name,Primary Object Type,Secondary Object Type,Max Potential Damage: Structure,Max Potential Damage: Content,Ground Elevation,X Coordinate,Y Coordinate,Aggregation Label: Census Block,Ground Floor Height,Extraction Method,Damage Function: Structure,Aggregation Label: Zoning_map
object_id,object_name,primary_object_type,secondary_object_type,max_damage_structure,max_damage_content,ground_elevtn,X Coordinate,Y Coordinate,Aggregation Label: Census Block,ground_flht,extract_method,fn_damage_structure,Zoning_map
573783417,573783417,COM,RES4,1177614.2,588807.1,8.381748561544418,-79.93000008,32.770545239,450190002002010,1,centroid,RES4,SR-3
573783433,573783433,COM,RES4,476216.254,238108.127,7.374183635444641,-79.92968382,32.771271301,450190002002010,1,centroid,RES4,SR-4
573785665,573785665,RES,RES1-2SNB,330007.42,165003.71,7.364031290178299,-79.93179589,32.773364727,450190002002004,1,centroid,RES1-2SNB,SR-5
Expand Down Expand Up @@ -1572,8 +1572,8 @@ Object ID,Object Name,Primary Object Type,Secondary Object Type,Max Potential Da
573789313,573789313,RES,RES1-2SNB,316664.648,158332.324,5.035890999441147,-79.937703,32.771885698,450190001003020,1,centroid,RES1-2SNB,SR-2
573789328,573789328,COM,COM1,405166.887,405166.887,5.684294907550812,-79.93746248,32.775702903,450190001002003,1,centroid,COM1,DR-1F
573789334,573789334,RES,RES1-2SNB,317436.136,158718.068,3.665345899348259,-79.93868974,32.774538661,450190001002003,1,centroid,RES1-2SNB,DR-1F
573789341,573789341,RES,RES3A,309951.7,154975.85,3.9668100886774074,-79.93917071,32.774845088,450190001002003,1,centroid,RES3A,STR
573789342,573789342,COM,COM4,103317.233,103317.233,3.9668100886774074,-79.93917071,32.774845088,450190001002003,1,centroid,COM4,STR
573789341,573789341,RES,RES3A,309951.7,154975.85,3.966810088677408,-79.93917071,32.774845088,450190001002003,1,centroid,RES3A,STR
573789342,573789342,COM,COM4,103317.233,103317.233,3.966810088677408,-79.93917071,32.774845088,450190001002003,1,centroid,COM4,STR
573789344,573789344,RES,RES3A,570614.421,285307.21,4.573926436867714,-79.93837185,32.774970542,450190001002003,1,centroid,RES3A,DR-1F
573789358,573789358,RES,RES1-2SNB,351245.902,175622.951,5.113630868315696,-79.93831938,32.775569158,450190001002003,1,centroid,RES1-2SNB,DR-1F
573789363,573789363,RES,RES1-3SNB,309123.527,154561.763,5.60085426879406,-79.93765526,32.775658099,450190001002003,1,centroid,RES1-3SNB,DR-1F
Expand Down Expand Up @@ -2202,7 +2202,7 @@ Object ID,Object Name,Primary Object Type,Secondary Object Type,Max Potential Da
573789232,573789232,RES,RES3A,576162.41,288081.205,4.328003296589851,-79.93776485,32.772881263,450190001002007,1,centroid,RES3A,SR-2
573789237,573789237,RES,RES1-2SNB,208679.165,104339.582,5.003123696923256,-79.93759388,32.773226578,450190001002007,1,centroid,RES1-2SNB,SR-2
573789312,573789312,RES,RES3A,565328.563,282664.281,4.841776577877998,-79.93756021,32.7718473,450190001003020,1,centroid,RES3A,SR-2
573789336,573789336,RES,RES1-1SNB,246491.079,123245.539,3.9544648086738583,-79.93918259,32.774666558,450190001002003,1,centroid,RES1-1SNB,STR
573789336,573789336,RES,RES1-1SNB,246491.079,123245.539,3.9544648086738574,-79.93918259,32.774666558,450190001002003,1,centroid,RES1-1SNB,STR
573789351,573789351,RES,RES1-2SNB,364241.81,182120.905,6.969832595825196,-79.937993,32.775313812,450190001002003,1,centroid,RES1-2SNB,DR-1F
573789459,573789459,RES,RES1-2SNB,136383.114,68191.5572,5.929636081199646,-79.9379172,32.777179279,450190001001005,1,centroid,RES1-2SNB,DR-1F
573789691,573789691,RES,RES3A,528008.485,264004.242,4.63035451570034,-79.93868916,32.772740818,450190001002008,1,centroid,RES3A,SR-2
Expand Down
Loading
Loading