Skip to content

Commit 1ca0288

Browse files
enhanced the evaluation module and upgrade the version
1 parent 3d73b00 commit 1ca0288

3 files changed

Lines changed: 4 additions & 14 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fimserve"
3-
version = "0.1.92"
3+
version = "0.1.93"
44
description = "Framework which is developed with the purpose of quickly generating Flood Inundation Maps (FIM) for emergency response and risk assessment. It is developed under Surface Dynamics Modeling Lab (SDML)."
55
authors = [{ name = "Supath Dhital", email = "sdhital@crimson.ua.edu" }]
66
maintainers = [{ name = "Supath Dhital", email = "sdhital@crimson.ua.edu" }]

src/fimserve/fimevaluation/run_fimeval.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class run_evaluation:
2828
target_crs : Optional[str]; CRS to reproject FIM rasters to (e.g., "EPSG:3857").
2929
target_resolution : Optional[float]; Output raster resolution (units depend on CRS).
3030
method_name : Optional[str]; Name of the evaluation method to evaluate. Defaults to "AOI".
31-
countryISO : Optional[str]; ISO-3 country code used only when downloading footprints from GEE.
32-
geeprojectID : Optional[str]; Google Earth Engine project ID for footprint download (if no local file provided).
3331
print_graphs : bool; If True, generates and saves contingency maps and evaluation metric plots.
3432
Evalwith_BF : bool; If True, performs building-footprint-based exposure evaluation.
3533
"""
@@ -43,8 +41,6 @@ def __init__(
4341
target_crs: Optional[str] = None,
4442
target_resolution: Optional[float] = None,
4543
method_name: Optional[str] = None, #By default it will use 'AOI' which is downloaded but incase user want to explore different method they can pass here
46-
countryISO: Optional[str] = None,
47-
geeprojectID: Optional[str] = None,
4844
print_graphs: bool = False,
4945
Evalwith_BF: bool = False, #If user want to run evaluation with building footprint
5046
):
@@ -68,8 +64,6 @@ def __init__(
6864
self.method_name = 'AOI'
6965
else:
7066
self.method_name = method_name
71-
self.countryISO = countryISO
72-
self.geeprojectID = geeprojectID
7367
self.Evalwith_BF = Evalwith_BF
7468
self.print_graphs = print_graphs
7569

@@ -105,8 +99,6 @@ def run_eval(self):
10599
main_dir=self.Main_dir,
106100
method_name=self.method_name,
107101
output_dir=self.output_dir,
108-
country=self.countryISO,
109-
geeprojectID=self.geeprojectID,
110102
building_footprint=self.building_footprint,
111103
)
112104
except Exception as e:

tests/test_evalutionhandfim.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def test_bm_fimlookup():
77
out = fm.fim_lookup(
88
HUCID="10240011",
9-
# date_input="2019-06-15", # If user is more specific then they can pass date (with hour if known) along with HUC8
9+
date_input="2019-06-15", # If user is more specific then they can pass date (with hour if known) along with HUC8
1010
# start_date="2017-06-20", #If user is not sure of the exact date then they can pass a range of dates
1111
# end_date="2024-06-25",
1212
run_handfim=True, #It will look for the owp hand fim for the mentioned HUC8 and date, if not found it will download and generate the owp hand fim; default is False
@@ -19,16 +19,14 @@ def test_bm_fimlookup():
1919
# After finalizing the benchmark FIM data user can run evaluation
2020
def test_run_fimeval():
2121
fm.run_evaluation(
22-
Main_dir="./FIMserv/test", # If user uses their own input directory where FIM outputs; basically out_dir in fim_lookup is Main_dir here
22+
Main_dir="../test_FIMeval", # If user uses their own input directory where FIM outputs; basically out_dir in fim_lookup is Main_dir here
2323
output_dir=None, # Folder where evaluation results will be saved
2424
shapefile_path=None, # AOI shapefile or vector file used to clip data during evaluation. Internally uses the geopackage within folder.
2525
PWB_dir=None, # Directory containing the Permanent Water Bodies.
26-
building_footprint="./AOI/building_footprint.gpkg", # Local building footprint dataset (GeoJSON/Shapefile) for building-level exposure evaluation.
26+
building_footprint=None, # Local building footprint dataset (GeoJSON/Shapefile) for building-level exposure evaluation., else it will use the arcgis online hosted building footprint using REST API
2727
target_crs=None, # CRS to reproject FIM rasters to (e.g., "EPSG:3857").
2828
target_resolution=None, # Output raster resolution (units depend on CRS).
2929
method_name=None, # By default it will use 'AOI'; to explore different methods pass here
30-
countryISO=None, # ISO-3 country code used only when downloading footprints from GEE.
31-
geeprojectID=None, # Google Earth Engine project ID for footprint download (if no local file provided).
3230
print_graphs=True, # If True, generates and saves contingency maps and evaluation metric plots.
3331
Evalwith_BF=True, # If True, run evaluation with building footprint
3432
)

0 commit comments

Comments
 (0)