fimbench 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fimbench-0.1.0/LICENSE +61 -0
- fimbench-0.1.0/PKG-INFO +256 -0
- fimbench-0.1.0/README.md +159 -0
- fimbench-0.1.0/pyproject.toml +84 -0
- fimbench-0.1.0/setup.cfg +4 -0
- fimbench-0.1.0/src/fimbench/__init__.py +66 -0
- fimbench-0.1.0/src/fimbench/_log.py +15 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/README.md +41 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/__init__.py +23 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/fema_ble.py +398 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/hwm.py +447 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/tier1.py +507 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/tier2.py +472 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/tier3.py +463 -0
- fimbench-0.1.0/src/fimbench/processing_floodmap/utils.py +114 -0
- fimbench-0.1.0/src/fimbench/publish/README.md +92 -0
- fimbench-0.1.0/src/fimbench/publish/__init__.py +26 -0
- fimbench-0.1.0/src/fimbench/publish/arcgis_online.py +323 -0
- fimbench-0.1.0/src/fimbench/publish/s3/__init__.py +10 -0
- fimbench-0.1.0/src/fimbench/publish/s3/s3_client.py +98 -0
- fimbench-0.1.0/src/fimbench/publish/s3/s3_io.py +19 -0
- fimbench-0.1.0/src/fimbench/publish/upload_benchmarkfloodmap.py +68 -0
- fimbench-0.1.0/src/fimbench/publish/upload_catalogntilesintos3.py +16 -0
- fimbench-0.1.0/src/fimbench/query/README.md +104 -0
- fimbench-0.1.0/src/fimbench/query/__init__.py +15 -0
- fimbench-0.1.0/src/fimbench/query/access_benchfim.py +899 -0
- fimbench-0.1.0/src/fimbench/query/utilis.py +720 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/README.md +83 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/__init__.py +17 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/build_catalog.py +346 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/smoothen_fimextent.py +117 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/tiling.py +587 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/viewtile_locally/README.md +74 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/viewtile_locally/__init__.py +9 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/viewtile_locally/serve_tiles.py +49 -0
- fimbench-0.1.0/src/fimbench/webcontent_utils/viewtile_locally/view.html +85 -0
- fimbench-0.1.0/src/fimbench.egg-info/PKG-INFO +256 -0
- fimbench-0.1.0/src/fimbench.egg-info/SOURCES.txt +45 -0
- fimbench-0.1.0/src/fimbench.egg-info/dependency_links.txt +1 -0
- fimbench-0.1.0/src/fimbench.egg-info/requires.txt +27 -0
- fimbench-0.1.0/src/fimbench.egg-info/top_level.txt +1 -0
- fimbench-0.1.0/tests/test_buildcatalog.py +31 -0
- fimbench-0.1.0/tests/test_processing_floodmap.py +79 -0
- fimbench-0.1.0/tests/test_queryFIM.py +29 -0
- fimbench-0.1.0/tests/test_upload2arcgisonline.py +37 -0
- fimbench-0.1.0/tests/test_upload_benchmarkfloodmap.py +33 -0
- fimbench-0.1.0/tests/test_workwithtiles.py +41 -0
fimbench-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
FIMbench License
|
|
2
|
+
-----
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 Surface Dynamics Modeling Lab (SDML), University of Alabama.
|
|
5
|
+
|
|
6
|
+
This project is distributed under two licenses, according to the type of
|
|
7
|
+
material. The software and source code are licensed under the Creative Commons
|
|
8
|
+
Attribution 4.0 International License (CC BY 4.0). The FIMbench dataset is
|
|
9
|
+
licensed under the Creative Commons Attribution-NonCommercial 4.0 International
|
|
10
|
+
License (CC BY-NC 4.0).
|
|
11
|
+
|
|
12
|
+
"Software and source code" refers to the FIMbench Python package and the
|
|
13
|
+
accompanying scripts in this repository. "FIMbench dataset" refers to the
|
|
14
|
+
benchmark Flood Inundation Maps (FIMs) and their derived extents, catalog, and
|
|
15
|
+
metadata distributed through the FIMbench database, regardless of where they are
|
|
16
|
+
hosted.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Software and source code
|
|
20
|
+
------------
|
|
21
|
+
|
|
22
|
+
This work is licensed under the Creative Commons Attribution 4.0 International
|
|
23
|
+
License. To view a copy of this license, visit
|
|
24
|
+
https://creativecommons.org/licenses/by/4.0/.
|
|
25
|
+
|
|
26
|
+
You are free to share and adapt the material for any purpose, including
|
|
27
|
+
commercially, provided that you give appropriate credit, provide a link to the
|
|
28
|
+
license, and indicate if changes were made. You may not apply legal terms or
|
|
29
|
+
technological measures that legally restrict others from doing anything the
|
|
30
|
+
license permits.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
FIMbench dataset
|
|
34
|
+
-------
|
|
35
|
+
|
|
36
|
+
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0
|
|
37
|
+
International License. To view a copy of this license, visit
|
|
38
|
+
https://creativecommons.org/licenses/by-nc/4.0/.
|
|
39
|
+
|
|
40
|
+
You are free to share and adapt the material, provided that you give appropriate
|
|
41
|
+
credit, provide a link to the license, and indicate if changes were made, and
|
|
42
|
+
that you do not use the material for commercial purposes. You may not apply legal
|
|
43
|
+
terms or technological measures that legally restrict others from doing anything
|
|
44
|
+
the license permits.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Disclaimer
|
|
48
|
+
-----
|
|
49
|
+
|
|
50
|
+
The material is provided "as is", without warranties of any kind. The licenses
|
|
51
|
+
may not give you all of the permissions necessary for your intended use, as
|
|
52
|
+
other rights such as publicity, privacy, or moral rights may limit how you use
|
|
53
|
+
the material.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Acknowledgment
|
|
57
|
+
-------
|
|
58
|
+
|
|
59
|
+
This research was supported by the Cooperative Institute for Research to
|
|
60
|
+
Operations in Hydrology (CIROH) with funding under award NA22NWS4320003 from the
|
|
61
|
+
NOAA Cooperative Institute Program.
|
fimbench-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fimbench
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Flood inundation map (FIM) benchmarking utilities: preprocessing the floodmap to a standardized format before uploading to the FIMbench database, S3 database interaction, and querying for FIMbench.
|
|
5
|
+
Author: Surface Dynamics Modeling Lab (SDML), The University of Alabama
|
|
6
|
+
Author-email: Supath Dhital <sdhital@ua.edu>
|
|
7
|
+
Maintainer: Surface Dynamics Modeling Lab (SDML), The University of Alabama
|
|
8
|
+
Maintainer-email: Supath Dhital <sdhital@ua.edu>
|
|
9
|
+
License: FIMbench License
|
|
10
|
+
-----
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Surface Dynamics Modeling Lab (SDML), University of Alabama.
|
|
13
|
+
|
|
14
|
+
This project is distributed under two licenses, according to the type of
|
|
15
|
+
material. The software and source code are licensed under the Creative Commons
|
|
16
|
+
Attribution 4.0 International License (CC BY 4.0). The FIMbench dataset is
|
|
17
|
+
licensed under the Creative Commons Attribution-NonCommercial 4.0 International
|
|
18
|
+
License (CC BY-NC 4.0).
|
|
19
|
+
|
|
20
|
+
"Software and source code" refers to the FIMbench Python package and the
|
|
21
|
+
accompanying scripts in this repository. "FIMbench dataset" refers to the
|
|
22
|
+
benchmark Flood Inundation Maps (FIMs) and their derived extents, catalog, and
|
|
23
|
+
metadata distributed through the FIMbench database, regardless of where they are
|
|
24
|
+
hosted.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Software and source code
|
|
28
|
+
------------
|
|
29
|
+
|
|
30
|
+
This work is licensed under the Creative Commons Attribution 4.0 International
|
|
31
|
+
License. To view a copy of this license, visit
|
|
32
|
+
https://creativecommons.org/licenses/by/4.0/.
|
|
33
|
+
|
|
34
|
+
You are free to share and adapt the material for any purpose, including
|
|
35
|
+
commercially, provided that you give appropriate credit, provide a link to the
|
|
36
|
+
license, and indicate if changes were made. You may not apply legal terms or
|
|
37
|
+
technological measures that legally restrict others from doing anything the
|
|
38
|
+
license permits.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
FIMbench dataset
|
|
42
|
+
-------
|
|
43
|
+
|
|
44
|
+
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0
|
|
45
|
+
International License. To view a copy of this license, visit
|
|
46
|
+
https://creativecommons.org/licenses/by-nc/4.0/.
|
|
47
|
+
|
|
48
|
+
You are free to share and adapt the material, provided that you give appropriate
|
|
49
|
+
credit, provide a link to the license, and indicate if changes were made, and
|
|
50
|
+
that you do not use the material for commercial purposes. You may not apply legal
|
|
51
|
+
terms or technological measures that legally restrict others from doing anything
|
|
52
|
+
the license permits.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Disclaimer
|
|
56
|
+
-----
|
|
57
|
+
|
|
58
|
+
The material is provided "as is", without warranties of any kind. The licenses
|
|
59
|
+
may not give you all of the permissions necessary for your intended use, as
|
|
60
|
+
other rights such as publicity, privacy, or moral rights may limit how you use
|
|
61
|
+
the material.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Acknowledgment
|
|
65
|
+
-------
|
|
66
|
+
|
|
67
|
+
This research was supported by the Cooperative Institute for Research to
|
|
68
|
+
Operations in Hydrology (CIROH) with funding under award NA22NWS4320003 from the
|
|
69
|
+
NOAA Cooperative Institute Program.
|
|
70
|
+
|
|
71
|
+
Project-URL: Homepage, https://github.com/sdmlua/fimbench
|
|
72
|
+
Keywords: flood,FIM,benchmark,geospatial,s3,geopackage
|
|
73
|
+
Requires-Python: >=3.10
|
|
74
|
+
Description-Content-Type: text/markdown
|
|
75
|
+
License-File: LICENSE
|
|
76
|
+
Requires-Dist: boto3>=1.40
|
|
77
|
+
Requires-Dist: botocore>=1.40
|
|
78
|
+
Requires-Dist: geopandas>=1.1
|
|
79
|
+
Requires-Dist: pandas>=2.2
|
|
80
|
+
Requires-Dist: numpy>=1.24
|
|
81
|
+
Requires-Dist: shapely>=2.0
|
|
82
|
+
Requires-Dist: rasterio>=1.3
|
|
83
|
+
Requires-Dist: requests>=2.31
|
|
84
|
+
Requires-Dist: mbutil>=0.3
|
|
85
|
+
Requires-Dist: arcgis>=2.4
|
|
86
|
+
Provides-Extra: processing-floodmap
|
|
87
|
+
Provides-Extra: webcontent-utils
|
|
88
|
+
Provides-Extra: query
|
|
89
|
+
Provides-Extra: publish
|
|
90
|
+
Provides-Extra: tiling
|
|
91
|
+
Provides-Extra: all
|
|
92
|
+
Provides-Extra: dev
|
|
93
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
94
|
+
Requires-Dist: black>=24.0; extra == "dev"
|
|
95
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
96
|
+
Dynamic: license-file
|
|
97
|
+
|
|
98
|
+
<div align="center">
|
|
99
|
+
<img src="assets/fimbench-logo.png" alt="FIMbench" width="150" />
|
|
100
|
+
<h2>FIMbench — an Extensive Benchmark Flood Inundation Mapping Database</h2>
|
|
101
|
+
<p>
|
|
102
|
+
<a href="https://github.com/sdmlua/fimbench/releases"><img src="https://img.shields.io/github/v/release/sdmlua/fimbench?include_prereleases" alt="Release" /></a>
|
|
103
|
+
<a href="https://github.com/sdmlua/fimbench/issues"><img src="https://img.shields.io/github/issues/sdmlua/fimbench" alt="Issues" /></a>
|
|
104
|
+
<a href="https://opensource.org/licenses/GPL-3.0"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPL v3" /></a><br>
|
|
105
|
+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" /></a>
|
|
106
|
+
<a href="https://tethys.ciroh.org/apps/fimbench-gui/"><img src="https://img.shields.io/badge/GUI-live-brightgreen.svg" alt="GUI live" /></a><br>
|
|
107
|
+
<a href="https://pypi.org/project/fimbench/"><img src="https://badge.fury.io/py/fimbench.svg?icon=si%3Apython" alt="PyPI version" /></a>
|
|
108
|
+
<a href="https://pepy.tech/projects/fimbench"><img src="https://static.pepy.tech/badge/fimbench" alt="PyPI Downloads" /></a>
|
|
109
|
+
</p>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
### **FIMbench - an Extensive Benchmark Flood Inundation Mapping Database**
|
|
113
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
114
|
+
|
|
115
|
+
| | |
|
|
116
|
+
| --- | --- |
|
|
117
|
+
| <a href="https://sdml.ua.edu"><img src="assets/sdml-logo.png" alt="SDML Logo" width="400"></a> | FIMbench is an **extensive, multi-tier, multi-source benchmark Flood Inundation Mapping (FIM) database** and the toolkit that powers it. It brings benchmark flood maps from many sources into one **standardized**, **programmatically queryable** database, and connects **seamlessly to evaluation frameworks such as [FIMeval](https://github.com/sdmlua)** so model predictions can be benchmarked against as many reliable reference maps as possible. It is developed under the Surface Dynamics Modeling Lab (SDML) at The University of Alabama as part of a project funded by the Cooperative Institute for Research to Operations in Hydrology (CIROH). |
|
|
118
|
+
|
|
119
|
+
### **Background**
|
|
120
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
121
|
+
|
|
122
|
+
Reliable evaluation of flood inundation models depends on having reliable benchmark
|
|
123
|
+
maps to evaluate against — and those maps are scattered across many sources, formats,
|
|
124
|
+
resolutions, and levels of confidence. **FIMbench** consolidates them into a single
|
|
125
|
+
**extensive benchmark database** that is **multi-source** (remote-sensing-derived maps,
|
|
126
|
+
high-resolution airborne imagery, machine-learning-derived maps, and more) and
|
|
127
|
+
**multi-tier** (organized by source, confidence, and resolution), so users can reason
|
|
128
|
+
about *which* benchmark to trust for a given location and event.
|
|
129
|
+
|
|
130
|
+
Beyond storing data, FIMbench is built to be **used programmatically**. The `fimbench`
|
|
131
|
+
Python package lets you **query** the database to discover what benchmark maps exist for
|
|
132
|
+
a region or event, **access and download** the matching assets, and feed them straight
|
|
133
|
+
into an evaluation workflow. This makes FIMbench **seamlessly connected to evaluation
|
|
134
|
+
frameworks such as [FIMeval](https://github.com/sdmlua)** — the standardized maps it
|
|
135
|
+
serves are evaluation-ready, enabling robust benchmarking of model predictions against
|
|
136
|
+
**as many reference maps as possible**, automatically and at scale.
|
|
137
|
+
|
|
138
|
+
In one toolkit, FIMbench **standardizes** raw benchmark flood maps to a common format,
|
|
139
|
+
builds the **tiles and web content** consumed by the GUI, and **publishes** everything
|
|
140
|
+
into the database. The published data is served through the
|
|
141
|
+
**[FIM Database](https://sdmlab.ciroh.org/index.html#FIM_Database/)** and explored
|
|
142
|
+
interactively in the live **[FIMbench GUI](https://tethys.ciroh.org/apps/fimbench-gui/)**.
|
|
143
|
+
|
|
144
|
+
### How the data is created
|
|
145
|
+
|
|
146
|
+
<div align="center">
|
|
147
|
+
<img src="assets/fimbench-flowchart.png" alt="FIMbench data creation flowchart" width="90%" />
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
## Architecture
|
|
151
|
+
|
|
152
|
+
`fimbench` is deployed as Python library organised into four groups that follow
|
|
153
|
+
the FIM data lifecycle- content is **created** in one group and **pushed out** by
|
|
154
|
+
another, with a single shared S3 access layer.
|
|
155
|
+
|
|
156
|
+
<div align="center">
|
|
157
|
+
<img src="assets/fimbench-arct.png" alt="FIMbench architecture" width="90%" />
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
The codebase is as follows:
|
|
161
|
+
```
|
|
162
|
+
fimbench/
|
|
163
|
+
├── docs/ # documentation + per-module notebooks
|
|
164
|
+
├── assets/ # logos, diagrams, screenshots
|
|
165
|
+
├── src/fimbench/
|
|
166
|
+
│ ├── processing_floodmap/ # raw flood map -> standardized, DB-compatible artifact
|
|
167
|
+
│ ├── webcontent_utils/ # CREATE catalog, tiles & web content
|
|
168
|
+
│ ├── query/ # QUERY availability + download assets
|
|
169
|
+
│ └── publish/ # PUSH content to S3 / ArcGIS Online (incl. the S3 layer)
|
|
170
|
+
└── tests/
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
> For the detailed architecture — group responsibilities, dependency direction, and
|
|
174
|
+
> design principles — see **[./docs/architecture.md](./docs/architecture.md)**.
|
|
175
|
+
|
|
176
|
+
## FIMbench in the web- GUI
|
|
177
|
+
|
|
178
|
+
Alongside programmatic access, the benchmark database can be explored visually through
|
|
179
|
+
the live FIMbench GUI, built on the CIROH Tethys Platform. Explore it at
|
|
180
|
+
**[tethys.ciroh.org/apps/fimbench-gui](https://tethys.ciroh.org/apps/fimbench-gui/)**
|
|
181
|
+
and read more in the **[GUI docs](https://tethys.ciroh.org/apps/fimbench-gui/docs)**.
|
|
182
|
+
|
|
183
|
+
<div align="center">
|
|
184
|
+
<img src="assets/fimbench-intropage.png" alt="FIMbench GUI — intro page" width="75%" />
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
The **landing page** introduces the database and its scope, giving newcomers a quick
|
|
188
|
+
sense of what benchmark flood maps are available and how the collection is organized.
|
|
189
|
+
|
|
190
|
+
<div align="center">
|
|
191
|
+
<img src="assets/fimbench-interactivemapwithfilters.png" alt="FIMbench GUI — interactive map with filters" width="75%" />
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
The **interactive map** lets users browse the full extent of the database and **filter**
|
|
195
|
+
benchmark maps by source, location, and event — making it easy to find the right
|
|
196
|
+
reference map across the multi-source, multi-tier collection.
|
|
197
|
+
|
|
198
|
+
<div align="center">
|
|
199
|
+
<img src="assets/fimbench-floodextentvizz.png" alt="FIMbench GUI — flood extent visualization" width="75%" />
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
Selecting a benchmark renders its **flood extent visualization** on the map, so the
|
|
203
|
+
inundated area can be inspected in detail and compared against the underlying terrain
|
|
204
|
+
and surrounding layers.
|
|
205
|
+
|
|
206
|
+
<div align="center">
|
|
207
|
+
<img src="assets/fimbench-documentationpage.png" alt="FIMbench GUI — documentation page" width="75%" />
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
The built-in **documentation page** explains the data sources, methodology, and how to
|
|
211
|
+
work with the database — both interactively through the GUI and programmatically with
|
|
212
|
+
the `fimbench` package.
|
|
213
|
+
|
|
214
|
+
## Usage
|
|
215
|
+
|
|
216
|
+
Install and set up the package by following **[docs/getting-started.md](docs/getting-started.md)**.
|
|
217
|
+
|
|
218
|
+
Each lifecycle stage has a runnable notebook walkthrough under `docs/`:
|
|
219
|
+
|
|
220
|
+
| Notebook | Stage |
|
|
221
|
+
| --- | --- |
|
|
222
|
+
| [`fimbench_processingfloodmap.ipynb`](docs/fimbench_processingfloodmap.ipynb) | Standardize a raw flood map into a DB-compatible artifact |
|
|
223
|
+
| [`fimbench_webcontent.ipynb`](docs/fimbench_webcontent.ipynb) | Build the catalog, make tiles & web content |
|
|
224
|
+
| [`fimbench_query.ipynb`](docs/fimbench_query.ipynb) | Query availability and download assets |
|
|
225
|
+
| [`fimbench_publish.ipynb`](docs/fimbench_publish.ipynb) | Push catalog/tiles to S3 and extents to ArcGIS Online |
|
|
226
|
+
|
|
227
|
+
## Citing this tool
|
|
228
|
+
|
|
229
|
+
1. Cohen, S., Baruah, A., Nikrou, P., Tian, D., & Liu, H. (2025). Toward robust evaluations of flood inundation predictions using remote sensing derived benchmark maps. *Water Resources Research*, 61(8), e2024WR039574.
|
|
230
|
+
2. Munasinghe, D., Cohen, S., Tian, D., Liu, H., Baruah, A., and Devi, D. (2025). A Database of Flood Maps using high-resolution Airborne Imagery and Machine Learning Models. In: *CIROH Developers' Conference*, May 28–30, 2025.
|
|
231
|
+
3. Devi, D., Dhital, S., Munasinghe, D., Cohen, S., Baruah, A., Chen, Y., ... & Pruitt, C. (2025). A Framework for the Evaluation of Flood Inundation Predictions Over Extensive Benchmark Databases.
|
|
232
|
+
4. Tian, D., Liu, H., Wang, L., Cohen, S., Thapa, P. (2024). Enhancing satellite image-derived flood maps with hydrologically guided region growing method and high-resolution DEMs. *Chapman Conference on Remote Sensing of the Water Cycle*.
|
|
233
|
+
|
|
234
|
+
## Contributing
|
|
235
|
+
|
|
236
|
+
Contributions are welcome- see **[CONTRIBUTING.md](CONTRIBUTING.md)** for how to set
|
|
237
|
+
up a development environment, run the tests and linters, and submit changes.
|
|
238
|
+
|
|
239
|
+
### **Acknowledgements**
|
|
240
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
241
|
+
|
|
242
|
+
| | |
|
|
243
|
+
| --- | --- |
|
|
244
|
+
| <a href="https://ciroh.ua.edu/"><img src="assets/CIROH-logo.jpg" alt="CIROH Logo" width="400"></a> | Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama. |
|
|
245
|
+
| | We would like to acknowledge [Aquaveo](https://aquaveo.com/), who helped develop the interactive [FIMbench GUI](https://tethys.ciroh.org/apps/fimbench-gui/) on the CIROH Tethys Platform. |
|
|
246
|
+
|
|
247
|
+
### **For More Information**
|
|
248
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
249
|
+
|
|
250
|
+
#### **Contact**
|
|
251
|
+
|
|
252
|
+
<a href="https://geography.ua.edu/people/sagy-cohen/" target="_blank">Dr. Sagy Cohen</a> (sagy.cohen@ua.edu),
|
|
253
|
+
Supath Dhital (sdhital@ua.edu),
|
|
254
|
+
Dipsikha Devi (ddevi@ua.edu)
|
|
255
|
+
</content>
|
|
256
|
+
</invoke>
|
fimbench-0.1.0/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="assets/fimbench-logo.png" alt="FIMbench" width="150" />
|
|
3
|
+
<h2>FIMbench — an Extensive Benchmark Flood Inundation Mapping Database</h2>
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://github.com/sdmlua/fimbench/releases"><img src="https://img.shields.io/github/v/release/sdmlua/fimbench?include_prereleases" alt="Release" /></a>
|
|
6
|
+
<a href="https://github.com/sdmlua/fimbench/issues"><img src="https://img.shields.io/github/issues/sdmlua/fimbench" alt="Issues" /></a>
|
|
7
|
+
<a href="https://opensource.org/licenses/GPL-3.0"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPL v3" /></a><br>
|
|
8
|
+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" /></a>
|
|
9
|
+
<a href="https://tethys.ciroh.org/apps/fimbench-gui/"><img src="https://img.shields.io/badge/GUI-live-brightgreen.svg" alt="GUI live" /></a><br>
|
|
10
|
+
<a href="https://pypi.org/project/fimbench/"><img src="https://badge.fury.io/py/fimbench.svg?icon=si%3Apython" alt="PyPI version" /></a>
|
|
11
|
+
<a href="https://pepy.tech/projects/fimbench"><img src="https://static.pepy.tech/badge/fimbench" alt="PyPI Downloads" /></a>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
### **FIMbench - an Extensive Benchmark Flood Inundation Mapping Database**
|
|
16
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
17
|
+
|
|
18
|
+
| | |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| <a href="https://sdml.ua.edu"><img src="assets/sdml-logo.png" alt="SDML Logo" width="400"></a> | FIMbench is an **extensive, multi-tier, multi-source benchmark Flood Inundation Mapping (FIM) database** and the toolkit that powers it. It brings benchmark flood maps from many sources into one **standardized**, **programmatically queryable** database, and connects **seamlessly to evaluation frameworks such as [FIMeval](https://github.com/sdmlua)** so model predictions can be benchmarked against as many reliable reference maps as possible. It is developed under the Surface Dynamics Modeling Lab (SDML) at The University of Alabama as part of a project funded by the Cooperative Institute for Research to Operations in Hydrology (CIROH). |
|
|
21
|
+
|
|
22
|
+
### **Background**
|
|
23
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
24
|
+
|
|
25
|
+
Reliable evaluation of flood inundation models depends on having reliable benchmark
|
|
26
|
+
maps to evaluate against — and those maps are scattered across many sources, formats,
|
|
27
|
+
resolutions, and levels of confidence. **FIMbench** consolidates them into a single
|
|
28
|
+
**extensive benchmark database** that is **multi-source** (remote-sensing-derived maps,
|
|
29
|
+
high-resolution airborne imagery, machine-learning-derived maps, and more) and
|
|
30
|
+
**multi-tier** (organized by source, confidence, and resolution), so users can reason
|
|
31
|
+
about *which* benchmark to trust for a given location and event.
|
|
32
|
+
|
|
33
|
+
Beyond storing data, FIMbench is built to be **used programmatically**. The `fimbench`
|
|
34
|
+
Python package lets you **query** the database to discover what benchmark maps exist for
|
|
35
|
+
a region or event, **access and download** the matching assets, and feed them straight
|
|
36
|
+
into an evaluation workflow. This makes FIMbench **seamlessly connected to evaluation
|
|
37
|
+
frameworks such as [FIMeval](https://github.com/sdmlua)** — the standardized maps it
|
|
38
|
+
serves are evaluation-ready, enabling robust benchmarking of model predictions against
|
|
39
|
+
**as many reference maps as possible**, automatically and at scale.
|
|
40
|
+
|
|
41
|
+
In one toolkit, FIMbench **standardizes** raw benchmark flood maps to a common format,
|
|
42
|
+
builds the **tiles and web content** consumed by the GUI, and **publishes** everything
|
|
43
|
+
into the database. The published data is served through the
|
|
44
|
+
**[FIM Database](https://sdmlab.ciroh.org/index.html#FIM_Database/)** and explored
|
|
45
|
+
interactively in the live **[FIMbench GUI](https://tethys.ciroh.org/apps/fimbench-gui/)**.
|
|
46
|
+
|
|
47
|
+
### How the data is created
|
|
48
|
+
|
|
49
|
+
<div align="center">
|
|
50
|
+
<img src="assets/fimbench-flowchart.png" alt="FIMbench data creation flowchart" width="90%" />
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
## Architecture
|
|
54
|
+
|
|
55
|
+
`fimbench` is deployed as Python library organised into four groups that follow
|
|
56
|
+
the FIM data lifecycle- content is **created** in one group and **pushed out** by
|
|
57
|
+
another, with a single shared S3 access layer.
|
|
58
|
+
|
|
59
|
+
<div align="center">
|
|
60
|
+
<img src="assets/fimbench-arct.png" alt="FIMbench architecture" width="90%" />
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
The codebase is as follows:
|
|
64
|
+
```
|
|
65
|
+
fimbench/
|
|
66
|
+
├── docs/ # documentation + per-module notebooks
|
|
67
|
+
├── assets/ # logos, diagrams, screenshots
|
|
68
|
+
├── src/fimbench/
|
|
69
|
+
│ ├── processing_floodmap/ # raw flood map -> standardized, DB-compatible artifact
|
|
70
|
+
│ ├── webcontent_utils/ # CREATE catalog, tiles & web content
|
|
71
|
+
│ ├── query/ # QUERY availability + download assets
|
|
72
|
+
│ └── publish/ # PUSH content to S3 / ArcGIS Online (incl. the S3 layer)
|
|
73
|
+
└── tests/
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> For the detailed architecture — group responsibilities, dependency direction, and
|
|
77
|
+
> design principles — see **[./docs/architecture.md](./docs/architecture.md)**.
|
|
78
|
+
|
|
79
|
+
## FIMbench in the web- GUI
|
|
80
|
+
|
|
81
|
+
Alongside programmatic access, the benchmark database can be explored visually through
|
|
82
|
+
the live FIMbench GUI, built on the CIROH Tethys Platform. Explore it at
|
|
83
|
+
**[tethys.ciroh.org/apps/fimbench-gui](https://tethys.ciroh.org/apps/fimbench-gui/)**
|
|
84
|
+
and read more in the **[GUI docs](https://tethys.ciroh.org/apps/fimbench-gui/docs)**.
|
|
85
|
+
|
|
86
|
+
<div align="center">
|
|
87
|
+
<img src="assets/fimbench-intropage.png" alt="FIMbench GUI — intro page" width="75%" />
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
The **landing page** introduces the database and its scope, giving newcomers a quick
|
|
91
|
+
sense of what benchmark flood maps are available and how the collection is organized.
|
|
92
|
+
|
|
93
|
+
<div align="center">
|
|
94
|
+
<img src="assets/fimbench-interactivemapwithfilters.png" alt="FIMbench GUI — interactive map with filters" width="75%" />
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
The **interactive map** lets users browse the full extent of the database and **filter**
|
|
98
|
+
benchmark maps by source, location, and event — making it easy to find the right
|
|
99
|
+
reference map across the multi-source, multi-tier collection.
|
|
100
|
+
|
|
101
|
+
<div align="center">
|
|
102
|
+
<img src="assets/fimbench-floodextentvizz.png" alt="FIMbench GUI — flood extent visualization" width="75%" />
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
Selecting a benchmark renders its **flood extent visualization** on the map, so the
|
|
106
|
+
inundated area can be inspected in detail and compared against the underlying terrain
|
|
107
|
+
and surrounding layers.
|
|
108
|
+
|
|
109
|
+
<div align="center">
|
|
110
|
+
<img src="assets/fimbench-documentationpage.png" alt="FIMbench GUI — documentation page" width="75%" />
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
The built-in **documentation page** explains the data sources, methodology, and how to
|
|
114
|
+
work with the database — both interactively through the GUI and programmatically with
|
|
115
|
+
the `fimbench` package.
|
|
116
|
+
|
|
117
|
+
## Usage
|
|
118
|
+
|
|
119
|
+
Install and set up the package by following **[docs/getting-started.md](docs/getting-started.md)**.
|
|
120
|
+
|
|
121
|
+
Each lifecycle stage has a runnable notebook walkthrough under `docs/`:
|
|
122
|
+
|
|
123
|
+
| Notebook | Stage |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| [`fimbench_processingfloodmap.ipynb`](docs/fimbench_processingfloodmap.ipynb) | Standardize a raw flood map into a DB-compatible artifact |
|
|
126
|
+
| [`fimbench_webcontent.ipynb`](docs/fimbench_webcontent.ipynb) | Build the catalog, make tiles & web content |
|
|
127
|
+
| [`fimbench_query.ipynb`](docs/fimbench_query.ipynb) | Query availability and download assets |
|
|
128
|
+
| [`fimbench_publish.ipynb`](docs/fimbench_publish.ipynb) | Push catalog/tiles to S3 and extents to ArcGIS Online |
|
|
129
|
+
|
|
130
|
+
## Citing this tool
|
|
131
|
+
|
|
132
|
+
1. Cohen, S., Baruah, A., Nikrou, P., Tian, D., & Liu, H. (2025). Toward robust evaluations of flood inundation predictions using remote sensing derived benchmark maps. *Water Resources Research*, 61(8), e2024WR039574.
|
|
133
|
+
2. Munasinghe, D., Cohen, S., Tian, D., Liu, H., Baruah, A., and Devi, D. (2025). A Database of Flood Maps using high-resolution Airborne Imagery and Machine Learning Models. In: *CIROH Developers' Conference*, May 28–30, 2025.
|
|
134
|
+
3. Devi, D., Dhital, S., Munasinghe, D., Cohen, S., Baruah, A., Chen, Y., ... & Pruitt, C. (2025). A Framework for the Evaluation of Flood Inundation Predictions Over Extensive Benchmark Databases.
|
|
135
|
+
4. Tian, D., Liu, H., Wang, L., Cohen, S., Thapa, P. (2024). Enhancing satellite image-derived flood maps with hydrologically guided region growing method and high-resolution DEMs. *Chapman Conference on Remote Sensing of the Water Cycle*.
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
Contributions are welcome- see **[CONTRIBUTING.md](CONTRIBUTING.md)** for how to set
|
|
140
|
+
up a development environment, run the tests and linters, and submit changes.
|
|
141
|
+
|
|
142
|
+
### **Acknowledgements**
|
|
143
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
144
|
+
|
|
145
|
+
| | |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| <a href="https://ciroh.ua.edu/"><img src="assets/CIROH-logo.jpg" alt="CIROH Logo" width="400"></a> | Funding for this project was provided by the National Oceanic & Atmospheric Administration (NOAA), awarded to the Cooperative Institute for Research to Operations in Hydrology (CIROH) through the NOAA Cooperative Agreement with The University of Alabama. |
|
|
148
|
+
| | We would like to acknowledge [Aquaveo](https://aquaveo.com/), who helped develop the interactive [FIMbench GUI](https://tethys.ciroh.org/apps/fimbench-gui/) on the CIROH Tethys Platform. |
|
|
149
|
+
|
|
150
|
+
### **For More Information**
|
|
151
|
+
<hr style="border: 1px solid black; margin: 0;">
|
|
152
|
+
|
|
153
|
+
#### **Contact**
|
|
154
|
+
|
|
155
|
+
<a href="https://geography.ua.edu/people/sagy-cohen/" target="_blank">Dr. Sagy Cohen</a> (sagy.cohen@ua.edu),
|
|
156
|
+
Supath Dhital (sdhital@ua.edu),
|
|
157
|
+
Dipsikha Devi (ddevi@ua.edu)
|
|
158
|
+
</content>
|
|
159
|
+
</invoke>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fimbench"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Flood inundation map (FIM) benchmarking utilities: preprocessing the floodmap to a standardized format before uploading to the FIMbench database, S3 database interaction, and querying for FIMbench."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = { file = "LICENSE" }
|
|
8
|
+
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Surface Dynamics Modeling Lab (SDML), The University of Alabama" },
|
|
11
|
+
{ name = "Supath Dhital", email = "sdhital@ua.edu" },
|
|
12
|
+
]
|
|
13
|
+
maintainers = [
|
|
14
|
+
{ name = "Surface Dynamics Modeling Lab (SDML), The University of Alabama" },
|
|
15
|
+
{ name = "Supath Dhital", email = "sdhital@ua.edu" },
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
keywords = ["flood", "FIM", "benchmark", "geospatial", "s3", "geopackage"]
|
|
19
|
+
|
|
20
|
+
# A plain `pip install fimbench` installs ALL four modules and EVERYTHING they
|
|
21
|
+
# need, including the heavier integrations (arcgis for ArcGIS Online, mbutil for
|
|
22
|
+
# vector tiling). Nothing else is required for full functionality.
|
|
23
|
+
# Note: vector tiling also needs the `tippecanoe` binary on PATH (not a Python
|
|
24
|
+
# package): `brew install tippecanoe`.
|
|
25
|
+
dependencies = [
|
|
26
|
+
"boto3>=1.40",
|
|
27
|
+
"botocore>=1.40",
|
|
28
|
+
"geopandas>=1.1",
|
|
29
|
+
"pandas>=2.2",
|
|
30
|
+
"numpy>=1.24",
|
|
31
|
+
"shapely>=2.0",
|
|
32
|
+
"rasterio>=1.3",
|
|
33
|
+
"requests>=2.31",
|
|
34
|
+
"mbutil>=0.3",
|
|
35
|
+
"arcgis>=2.4",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
# The base install above is already complete. These per-module names remain
|
|
39
|
+
# valid install targets for users who write `pip install "fimbench[publish]"`,
|
|
40
|
+
# but they resolve to the base (extras can only add to it, never subtract), so
|
|
41
|
+
# every one of them installs the same complete package.
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
processing_floodmap = []
|
|
44
|
+
webcontent_utils = []
|
|
45
|
+
query = []
|
|
46
|
+
publish = []
|
|
47
|
+
tiling = []
|
|
48
|
+
all = []
|
|
49
|
+
|
|
50
|
+
dev = [
|
|
51
|
+
"pytest>=8.0",
|
|
52
|
+
"black>=24.0",
|
|
53
|
+
"ruff>=0.6",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[project.urls]
|
|
57
|
+
Homepage = "https://github.com/sdmlua/fimbench"
|
|
58
|
+
|
|
59
|
+
[tool.setuptools]
|
|
60
|
+
package-dir = { "" = "src" }
|
|
61
|
+
|
|
62
|
+
[tool.setuptools.packages.find]
|
|
63
|
+
where = ["src"]
|
|
64
|
+
|
|
65
|
+
# Ship non-Python files needed at runtime / for reference: per-module READMEs
|
|
66
|
+
# and the local tile viewer's HTML page.
|
|
67
|
+
[tool.setuptools.package-data]
|
|
68
|
+
"*" = ["*.md"]
|
|
69
|
+
"fimbench.webcontent_utils.viewtile_locally" = ["*.html"]
|
|
70
|
+
|
|
71
|
+
[build-system]
|
|
72
|
+
requires = ["setuptools>=61.0"]
|
|
73
|
+
build-backend = "setuptools.build_meta"
|
|
74
|
+
|
|
75
|
+
[tool.black]
|
|
76
|
+
line-length = 100
|
|
77
|
+
target-version = ["py310"]
|
|
78
|
+
|
|
79
|
+
[tool.ruff]
|
|
80
|
+
line-length = 100
|
|
81
|
+
target-version = "py310"
|
|
82
|
+
|
|
83
|
+
[tool.pytest.ini_options]
|
|
84
|
+
testpaths = ["tests"]
|
fimbench-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
fimbench
|
|
3
|
+
|
|
4
|
+
FIM benchmarking utilities. Pipeline: processing_floodmap (standardize) ->
|
|
5
|
+
webcontent_utils (catalog + tiles) -> query (availability) -> publish (S3 /
|
|
6
|
+
ArcGIS Online). Public classes are re-exported at the top level
|
|
7
|
+
(e.g. fimbench.Tier1Processor) and resolved lazily so `import fimbench` stays
|
|
8
|
+
light.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.0"
|
|
14
|
+
|
|
15
|
+
# Lazy top-level names (see __getattr__); avoids importing rasterio/geopandas/
|
|
16
|
+
# arcgis until a name is actually used.
|
|
17
|
+
__all__: list[str] = [
|
|
18
|
+
# subpackages
|
|
19
|
+
"processing_floodmap",
|
|
20
|
+
"webcontent_utils",
|
|
21
|
+
"query",
|
|
22
|
+
"publish",
|
|
23
|
+
# processing_floodmap classes -> fimbench.Tier1Processor, etc.
|
|
24
|
+
"Tier1Processor",
|
|
25
|
+
"Tier2Processor",
|
|
26
|
+
"Tier3Processor",
|
|
27
|
+
"FemaBleProcessor",
|
|
28
|
+
"HwmProcessor",
|
|
29
|
+
# webcontent_utils classes
|
|
30
|
+
"FIMCatalogBuilder",
|
|
31
|
+
"CatalogandTileManager",
|
|
32
|
+
# query
|
|
33
|
+
"benchFIMquery",
|
|
34
|
+
# publish
|
|
35
|
+
"PublishFIMExtent2ArcGISOnline",
|
|
36
|
+
"upload_benchmarkfloodmap",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
# name -> (submodule, attribute) for lazy top-level re-export.
|
|
40
|
+
_LAZY = {
|
|
41
|
+
"Tier1Processor": ("processing_floodmap", "Tier1Processor"),
|
|
42
|
+
"Tier2Processor": ("processing_floodmap", "Tier2Processor"),
|
|
43
|
+
"Tier3Processor": ("processing_floodmap", "Tier3Processor"),
|
|
44
|
+
"FemaBleProcessor": ("processing_floodmap", "FemaBleProcessor"),
|
|
45
|
+
"HwmProcessor": ("processing_floodmap", "HwmProcessor"),
|
|
46
|
+
"FIMCatalogBuilder": ("webcontent_utils", "FIMCatalogBuilder"),
|
|
47
|
+
"CatalogandTileManager": ("webcontent_utils", "CatalogandTileManager"),
|
|
48
|
+
"benchFIMquery": ("query", "benchFIMquery"),
|
|
49
|
+
"PublishFIMExtent2ArcGISOnline": ("publish", "PublishFIMExtent2ArcGISOnline"),
|
|
50
|
+
"upload_benchmarkfloodmap": ("publish", "upload_benchmarkfloodmap"),
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def __getattr__(name: str):
|
|
55
|
+
import importlib
|
|
56
|
+
|
|
57
|
+
target = _LAZY.get(name)
|
|
58
|
+
if target is not None:
|
|
59
|
+
submod, attr = target
|
|
60
|
+
module = importlib.import_module(f"{__name__}.{submod}")
|
|
61
|
+
return getattr(module, attr)
|
|
62
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def __dir__():
|
|
66
|
+
return sorted(__all__)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
fimbench._log
|
|
3
|
+
|
|
4
|
+
Shared status logger so every subpackage emits output the same way:
|
|
5
|
+
[HH:MM:SS] message
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from datetime import datetime
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def log(msg):
|
|
14
|
+
"""Print a timestamped status line."""
|
|
15
|
+
print(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}")
|