Skip to content

Commit 6569f59

Browse files
All good for the aggregation areas and ground elevation in new development areas
1 parent da65d1b commit 6569f59

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

hydromt_fiat/workflows/exposure_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ def setup_new_composite_areas(
11011101
# new composite areas
11021102
if aggregation_area_fn is not None:
11031103
new_objects = join_exposure_aggregation_areas(
1104-
self.get_full_gdf(new_objects),
1104+
_new_exposure_geoms.merge(new_objects, on="Object ID"),
11051105
aggregation_area_fn=aggregation_area_fn,
11061106
attribute_names=attribute_names,
11071107
label_names=label_names,

tests/test_setup_new_composite_areas_ground_elevation.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"type": "datum",
2424
"path_ref": None,
2525
"attr_ref": None,
26+
"ground_elevation_file": None,
27+
"aggregation_area_fn": None,
28+
"attribute_names": None,
29+
"label_names": None,
2630
},
2731
"setup_new_composite_area_geom": {
2832
"dir": "test_read",
@@ -33,8 +37,8 @@
3337
"attr_ref": "bfe",
3438
"ground_elevation_file": None,
3539
"aggregation_area_fn": None,
36-
"attribute_names": "GEOID_short",
37-
"label_names": "Aggregation Label: Census Block",
40+
"attribute_names": None,
41+
"label_names": None,
3842
},
3943
"setup_new_composite_area_elevation": {
4044
"dir": "test_read",
@@ -45,7 +49,7 @@
4549
"attr_ref": None,
4650
"ground_elevation_file": DATADIRDEM
4751
/ "charleston_14m.tif",
48-
"aggregation_area_fn": EXAMPLEDIR.joinpath("exposure", "aggregation_areas", "block_groups.gpkg"),
52+
"aggregation_area_fn": EXAMPLEDIR.joinpath("test_read", "exposure", "aggregation_areas", "block_groups.gpkg"),
4953
"attribute_names": "GEOID_short",
5054
"label_names": "Aggregation Label: Census Block",
5155
},
@@ -73,6 +77,9 @@ def test_setup_new_composite_areas_ground_elevation(case):
7377
path_ref=_cases[case]["path_ref"],
7478
attr_ref=_cases[case]["attr_ref"],
7579
ground_elevation=_cases[case]["ground_elevation_file"],
80+
aggregation_area_fn=_cases[case]["aggregation_area_fn"],
81+
attribute_names=_cases[case]["attribute_names"],
82+
label_names=_cases[case]["label_names"],
7683
)
7784

7885
if _cases[case]["new_root"].exists():

0 commit comments

Comments
 (0)