Metadata-Version: 2.4
Name: floodsr
Version: 0.1.4
Summary: Flood grid super-resolution CLI
Author-email: CEFlood <bryant.seth@ceflood.com>
License: MIT
Project-URL: Homepage, https://floodsr.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/cefect/floodsr
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: geopandas<2,>=1.1
Requires-Dist: numpy<3,>=2
Requires-Dist: onnxruntime<2,>=1.22
Requires-Dist: platformdirs<5,>=4
Requires-Dist: pystac-client<0.10,>=0.9
Requires-Dist: rasterio<2,>=1.5
Requires-Dist: shapely<3,>=2
Requires-Dist: tqdm<5,>=4
Provides-Extra: dev
Requires-Dist: pytest<10,>=9; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file

# floodsr
[![CI](https://github.com/cefect/floodsr/workflows/CI/badge.svg)](https://github.com/cefect/floodsr/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/cefect/floodsr)](https://github.com/cefect/floodsr/releases)
[![Documentation Status](https://readthedocs.org/projects/floodsr/badge/?version=latest)](https://floodsr.readthedocs.io/en/latest/)
[![Documentation Status (FR)](https://readthedocs.org/projects/floodsr-fr/badge/?version=latest)](https://floodsr-fr.readthedocs.io/fr/latest/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

AI-powered super-resolution for flood hazard rasters that turns coarse water grids into sharp, decision-ready inundation maps.
Fuse low-res flood grids with high-res DEMs to infer fine-scale flood patterns. 
Built on PyTorch and GDAL, floodsr is designed for geospatial practitioners who need to enhance flood hazard data for better risk assessment and planning.


![floodsr header](docs/user/img/header.png)

- **Documentation**: https://floodsr.readthedocs.io/en/latest/
- **Contribute**: https://github.com/cefect/floodsr/blob/master/CONTRIBUTING.md

Implemented models (see `floodsr/models.json`):
- **ResUNet_16x_DEM**: 16x DEM-conditioned ResUNet
 

## Installation

see [documentation](https://floodsr.readthedocs.io/en/latest/installation.html) for details.

### basic install

```bash
pipx install floodsr
```
 
### extended install
for handling rasters too large for memory, floodsr requires GDAL backends.
```bash
# advanced install for VRT workflows
conda create -n floodsr-gdal -c conda-forge python=3.12 gdal -y
conda activate floodsr-gdal
python -m pip install floodsr
```
 

## Use

See the [Getting Started](https://floodsr.readthedocs.io/en/latest/getting_started.html) guide for a quick intro to using the CLI.
 
List available model versions:

Fetch a model by version into the default cache:

```bash
floodsr models fetch ResUNet_16x_DEM 
```

Enhance a low-resolution flood hazard raster *to high resolution* (``tohr``), fetching the DEM from the [HRDEM Mosaic](https://open.canada.ca/data/en/dataset/0fe65119-e96e-4a57-8bfe-9d9245fba06b) data source.

```bash
floodsr tohr --in lowres032.tif --fetch-hrdem 
```

Enhance with a local DEM file:

```bash
floodsr tohr --in lowres032.tif --dem hires002_dem.tif  

```

Doctor diagnostics:

```bash
floodsr doctor
```

For more details, see the [User Guide](https://floodsr.readthedocs.io/en/latest/user_guide.html).

  
 
