Skip to content

Commit

Permalink
update single BF input to multiple. Add BF folder to exposure folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Santonia27 committed Dec 12, 2023
1 parent d45d754 commit 436f4e1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Binary file not shown.
Binary file not shown.
23 changes: 19 additions & 4 deletions hydromt_fiat/fiat.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,10 +772,25 @@ def setup_building_footprint(
building_footprint_fn,
attribute_name,
)
building_footprints = Path(self.root).joinpath("output" , "building_footprints")
if not os.path.exists(building_footprints):
os.makedirs(building_footprints)
shutil.copy2(building_footprint_fn, building_footprints)
# Create BF folder in Exposure
building_footprints_exp = Path(self.root).joinpath("exposure" , "building_footprints")
if not os.path.exists(building_footprints_exp):
os.makedirs(building_footprints_exp)
if isinstance(building_footprint_fn,list):
for file in building_footprint_fn:
shutil.copy2(file, building_footprints_exp)
else:
shutil.copy2(building_footprint_fn, building_footprints_exp)

# Create BF folder in Output
building_footprints_out = Path(self.root).joinpath("output" , "building_footprints")
if not os.path.exists(building_footprints_out):
os.makedirs(building_footprints_out)
if isinstance(building_footprint_fn,list):
for file in building_footprint_fn:
shutil.copy2(file, building_footprints_out)
else:
shutil.copy2(building_footprint_fn, building_footprints_out)

# Update functions
def update_all(self):
Expand Down

0 comments on commit 436f4e1

Please sign in to comment.