# HydroImpact **Repository Path**: izxj/HydroImpact ## Basic Information - **Project Name**: HydroImpact - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-04 - **Last Updated**: 2026-08-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🌊 HydroImpact: Dam Breach Post Processing Toolkit A Streamlit application for processing and analyzing hydrodynamic modeling outputs from HEC-RAS dam breach simulations. This tool automates the extraction of flood impact data for buildings, cross-sections, and points of interest. --- ## πŸ“‹ Features ### 🏒 Building Footprint Analysis - **Automatic Building Detection** from Microsoft’s Global Buildings dataset - **Custom Building Import** using shapefiles - **Statistics Extraction** (mean, min, max, std) from rasters - **Interactive Map** with WSE overlay and building highlights - **Export Options**: CSV + zipped shapefile ### πŸ“Š Cross Section Visualization - Terrain (DEM) and water surface elevation (WSE) profiles - Plotly-based interactive visuals - Batch cross-section processing - Export all plots as a single HTML report ### πŸ“ Point-Based Analysis - Extracts raster values at specific points - Flexible column selection for IDs - Includes calculated depth above ground - CSV output ### πŸ”„ Automatic CRS Management - Checks coordinate system consistency - One-click reprojection to EPSG:4326 - Reprojects only the needed files --- ## πŸš€ Installation ### Prerequisites - Python 3.8 or higher - `pip` package manager ### Setup ```bash git clone https://github.com/mohsennasab/HydroImpact.git cd hydro-toolkit # Create a virtual environment python -m venv venv # Activate it # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate # Install dependencies pip install -r requirements.txt ``` --- ## πŸ“ Required Input Files ### Raster Files (GeoTIFF) - βœ… DEM (Digital Elevation Model) – Required - βœ… WSE (Max Water Surface Elevation) – Required - βž• Max Velocity – Optional - βž• Max Depth – Optional - βž• Arrival Time – Optional ### Vector Files (Shapefile) - βœ… Cross-section polylines – For elevation profiles - βœ… Points of interest – For point-based values - βž• Building footprints – Optional (can auto-download) *Note: Files will be automatically reprojected to EPSG:4326 if needed.* --- ## 🎯 Usage ### Start the App ```bash # Option 1: With launcher script python run.py # Option 2: Direct Streamlit call streamlit run app/main.py ``` App will open at: [http://localhost:8502](http://localhost:8502) ### Workflow 1. **Upload Files** - Upload DEM and WSE (required) - Upload vector shapefiles (.shp, .shx, .dbf, .prj) 2. **Check/Reproject CRS** - Click πŸ” "Check CRS" - Click πŸ”„ "Auto-Reproject" if needed 3. **Run Analysis** - Choose a tab (Buildings, Cross Sections, or Points) - Configure inputs and run 4. **View Results & Export** - View tables and plots in-app - Download CSVs, shapefiles, or HTML reports --- ## πŸ“Š Output Files | File Name | Description | |-----------|-------------| | `building_analysis_results.csv` | Building-level stats | | `building_footprints.zip` | Zipped shapefile of buildings | | `cross_section_profiles.html` | Interactive cross-section plots | | `point_analysis_results.csv` | Raster values at point locations | --- ## πŸ—οΈ Project Structure ``` hydro_toolkit/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ main.py # Streamlit app interface β”‚ β”œβ”€β”€ config.py # Configuration constants β”‚ └── ui_helpers.py # UI components β”œβ”€β”€ modules/ β”‚ β”œβ”€β”€ crs_check.py # CRS validation and reprojection β”‚ β”œβ”€β”€ building_analysis.py # Building analysis logic β”‚ β”œβ”€β”€ cross_section_plot.py # Cross-section plotting β”‚ └── point_analysis.py # Point-based raster extraction β”œβ”€β”€ utils/ β”‚ β”œβ”€β”€ raster_utils.py # Raster helpers β”‚ └── vector_utils.py # Vector helpers β”œβ”€β”€ requirements.txt # Dependency list β”œβ”€β”€ run.py # Launch script └── README.md # You’re reading it! ``` --- ## πŸ› οΈ Technical Details **Technologies Used** - Streamlit - GeoPandas - Rasterio - Plotly - Folium - Mercantile (for building tiles) **CRS Handling** - Enforced EPSG:4326 - Auto-reprojection included **Building Footprints** - From Microsoft’s ML Global Building Footprints when not provided --- ## 🀝 Contributing Contributions are welcome! Please open an issue for major changes before submitting a pull request. --- ## πŸ“ License Custom Open-Source License Copyright (c) 2024 Mohsen Tahmasebi Nasab Permission is granted, free of charge, for personal, academic, or internal non-commercial use. Commercial use and redistribution (in part or full, modified or not) are not permitted without written permission. ### Disclaimer The software is provided as is, without warranty of any kind. The author is not liable for any damages or claims arising from use. --- ## πŸ“§ Contact Questions? Contact Mohsen: www.hydromohsen.com