Flood Risk Data LULC In Urban Areas

Output File
/data/bangkok_flood_native
Requirements
Requirement | Details |
---|---|
Software | Python 3.x, Earth Engine Python API, geemap |
Earth Engine | Enabled Google Earth Engine account (https://signup.earthengine.google.com) |
Python Packages | geemap, earthengine-api, os, ee |
Internet | Required for Earth Engine data download |
Files Created
Filename | Description | Resolution |
---|---|---|
dem_srtm.tif | Elevation data from SRTM (clipped to AOI) | 30 m |
dw_water_built_mask.tif | Masked Dynamic World image (1=Water, 2=Built) | 10 m |
rainfall_oct2023_chirps.tif | CHIRPS total rainfall for Oct 2023 | ~5.5 km |
High-Level Workflow Steps
1. Setup and Define AOI
Define Bangkokβs location and buffer by 10 km to create an Area of Interest (AOI).2. Export SRTM Elevation
- Use the USGS/SRTMGL1_003 dataset
- Export as
dem_srtm.tif
at 30 m resolution
3. Export Landcover (Water & Built)
- Use the Google Dynamic World dataset for 2023
- Use
.mode()
to get the most frequent class - Remap values: 0 β Water (1), 6 β Built (2), others β 0
- Export as
dw_water_built_mask.tif
at 10 m resolution
4. Export Rainfall
- Use CHIRPS Daily rainfall dataset
- Sum rainfall for October 2023
- Export as
rainfall_oct2023_chirps.tif
at ~5.5 km resolution
Flood Risk Classification
This script generates a flood risk classification map of Bangkok using:- SRTM DEM (Elevation at 30m) to identify low-lying areas (< 5 meters elevation)
- Dynamic World Landcover (10m) to locate built-up and water regions
Output: Flood-Prone Map
You get a matplotlib map showing flood-prone areas based on both elevation and landcover:Legend Explained
Color | Label | Meaning |
---|---|---|
π΅ Blue | Low-lying Water | Areas classified as water in DW and below 5 meters elevation |
π΄ Red | Low-lying Built-up | Areas classified as built-up and below 5 meters elevation |
π Ready to implement this solution?
Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.
View Full Solution βGet Expert Help
Talk to a Geospatial Expert
Need help with your geospatial projects? Our team of experts is here to assist you with implementation, best practices, and technical support.
Other ways to get help:
- Guides: Use the /guides tab for detailed tutorials
- Community: Ask questions in our community forum
- Support: Send us a support request