Skip to content

Commit

Permalink
small correction based on change of spatial join read in hydromt fiat
Browse files Browse the repository at this point in the history
  • Loading branch information
panosatha committed Oct 30, 2024
1 parent c882c03 commit ac51b82
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions flood_adapt/database_builder/create_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,22 +686,22 @@ def read_fiat(self):
else:
for aggr in self.fiat_model.spatial_joins["aggregation_areas"]:
# Make sure paths are correct
aggr.file = str(
self.static_path.joinpath("templates", "fiat", aggr.file)
aggr["file"] = str(
self.static_path.joinpath("templates", "fiat", aggr["file"])
.relative_to(self.static_path)
.as_posix()
)
if aggr.equity is not None:
aggr.equity.census_data = str(
if aggr["equity"] is not None:
aggr["equity"]["census_data"] = str(
self.static_path.joinpath(
"templates", "fiat", aggr.equity.census_data
"templates", "fiat", aggr["equity"]["census_data"]
)
.relative_to(self.static_path)
.as_posix()
)
self.site_attrs["fiat"]["aggregation"].append(aggr.model_dump())
self.site_attrs["fiat"]["aggregation"].append(aggr)
self.logger.info(
f"The aggregation types {[aggr.name for aggr in self.fiat_model.spatial_joins['aggregation_areas']]} from the FIAT model are going to be used."
f"The aggregation types {[aggr['name'] for aggr in self.fiat_model.spatial_joins['aggregation_areas']]} from the FIAT model are going to be used."
)

# Read SVI
Expand Down

0 comments on commit ac51b82

Please sign in to comment.