|
5 | 5 | # Look for the benchmark FIM data for the HUC8 and event date |
6 | 6 | def test_bm_fimlookup(): |
7 | 7 | out = fm.fim_lookup( |
8 | | -<<<<<<< HEAD |
9 | | - HUCID="10170203", |
10 | | - date_input="2019-09-19 16:00:00", # If user is more specific then they can pass date (with hour if known) along with HUC8 |
11 | | - 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 |
12 | | - # file_name="PSS_1_0m_20190919T165541_963659W424518N_BM.tif", #If user pass the specific filename, it will download that and assume that this is the right benchmark, else based on exact match of date it will look for the benchmark |
13 | | - # out_dir = None, # If user want to save the benchmark fim in specific directory |
14 | | -======= |
15 | 8 | HUCID="07070005", |
16 | 9 | date_input="2019-05-30 23:00:00", # If user is more specific then they can pass date (with hour if known) along with HUC8 |
17 | | - 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 |
18 | | - file_name="S1A_9_6m_20190530T23573_910244W430506N_BM.tif", #If user pass the specific filename, it will download that and assume that this is the right benchmark, else based on exact match of date it will look for the benchmark |
19 | | - out_dir = "./FIMserv/test", # If user want to save the benchmark fim in specific directory |
20 | | ->>>>>>> devsd |
21 | | - # start_date="2024-06-20", #If user is not sure of the exact date then they can pass a range of dates |
| 10 | + 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 |
| 11 | + file_name="S1A_9_6m_20190530T23573_910244W430506N_BM.tif", # If user passes a specific filename, it will download that and assume it is the right benchmark |
| 12 | + out_dir="./FIMserv/test", # If user wants to save the benchmark FIM in a specific directory |
| 13 | + # start_date="2024-06-20", # If user is not sure of the exact date then they can pass a range of dates |
22 | 14 | # end_date="2024-06-25", |
23 | 15 | ) |
24 | 16 | print(out) |
25 | | - |
26 | | -#After finalizing the benchmark FIM data user can run evaluation |
| 17 | + |
| 18 | + |
| 19 | +# After finalizing the benchmark FIM data user can run evaluation |
27 | 20 | def test_run_fimeval(): |
28 | 21 | fm.run_evaluation( |
29 | | -<<<<<<< HEAD |
30 | | - Main_dir=None, #If user use their own input directory to where FIM outputs; basically out_dir in fim_lookup us Main_dir here |
31 | | - output_dir= None, #Folder where evaluation results will be saved |
32 | | - shapefile_path= None, #AOI shapefile or vector file used to clip data during evaluation. Internally used the geopackage within folder. |
33 | | - PWB_dir= None, #Directory containing the Permanent Water Bodies. |
34 | | - building_footprint= None, #Local building footprint dataset (GeoJSON/Shapefile) for building-level exposure evaluation. |
35 | | -======= |
36 | | - Main_dir="./FIMserv/test", #If user use their own input directory to where FIM outputs; basically out_dir in fim_lookup us Main_dir here |
37 | | - output_dir= None, #Folder where evaluation results will be saved |
38 | | - shapefile_path= None, #AOI shapefile or vector file used to clip data during evaluation. Internally used the geopackage within folder. |
39 | | - PWB_dir= None, #Directory containing the Permanent Water Bodies. |
40 | | - building_footprint= "./AOI/building_footprint.gpkg", #Local building footprint dataset (GeoJSON/Shapefile) for building-level exposure evaluation. |
41 | | ->>>>>>> devsd |
42 | | - target_crs= None, #CRS to reproject FIM rasters to (e.g., "EPSG:3857"). |
43 | | - target_resolution= None, #Output raster resolution (units depend on CRS). |
44 | | - method_name= None, #By default it will use 'AOI' which is downloaded but incase user want to explore different method they can pass here |
45 | | - countryISO= None, #ISO-3 country code used only when downloading footprints from GEE. |
46 | | - geeprojectID= None, #Google Earth Engine project ID for footprint download (if no local file provided). |
47 | | -<<<<<<< HEAD |
48 | | - print_graphs= False, #If True, generates and saves contingency maps and evaluation metric plots. |
49 | | - Evalwith_BF= False, #If user want to run evaluation with building footprint |
50 | | -======= |
51 | | - print_graphs= True, #If True, generates and saves contingency maps and evaluation metric plots. |
52 | | - Evalwith_BF= True, #If user want to run evaluation with building footprint |
53 | | ->>>>>>> devsd |
54 | | - ) |
| 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 |
| 23 | + output_dir=None, # Folder where evaluation results will be saved |
| 24 | + shapefile_path=None, # AOI shapefile or vector file used to clip data during evaluation. Internally uses the geopackage within folder. |
| 25 | + 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. |
| 27 | + target_crs=None, # CRS to reproject FIM rasters to (e.g., "EPSG:3857"). |
| 28 | + target_resolution=None, # Output raster resolution (units depend on CRS). |
| 29 | + 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). |
| 32 | + print_graphs=True, # If True, generates and saves contingency maps and evaluation metric plots. |
| 33 | + Evalwith_BF=True, # If True, run evaluation with building footprint |
| 34 | + ) |
0 commit comments