Skip to content

refactor: convert flood control map to mapbox and added simple flood simulation with 5, 25 and 100 year flood data#536

Open
chryzxc wants to merge 13 commits intobettergovph:mainfrom
chryzxc:feat/leaflet-to-mapbox-flood-simulation-5-25-100yr
Open

refactor: convert flood control map to mapbox and added simple flood simulation with 5, 25 and 100 year flood data#536
chryzxc wants to merge 13 commits intobettergovph:mainfrom
chryzxc:feat/leaflet-to-mapbox-flood-simulation-5-25-100yr

Conversation

@chryzxc
Copy link

@chryzxc chryzxc commented Nov 10, 2025

Description
This PR refactors the existing flood control map from Leaflet to Mapbox GL JS and adds new data and features:

  • Converted the map from Leaflet to Mapbox for better 3D visualization and NOAH tilesets compatibility.
  • Added Project NOAH flood data: 5-Year, 25-Year, and 100-Year flood datasets.
  • Added a flood depth simulation feature using DEM + Project NOAH tilesets with Mapbox extrusion height to visualize flood levels dynamically.

Environment Changes
Added new Mapbox access token in .env:

VITE_MAPBOX_ACCESS_TOKEN=your_mapbox_token_here or you can use project noah access token that is exposed on their website.

Screenshots
Before
image

After
Bettergov 2025-11-11 002939
image
image
image
image
image
image

Data Reference

  • NOAH Studio Flood Hazard Tilesets
    • 5-Year Flood: upri-noah.ph_fh_5yr_tls
    • 25-Year Flood: upri-noah.ph_fh_25yr_tls
    • 100-Year Flood: upri-noah.ph_fh_100yr_tls

Notes

  • Flood depth increases periodically in the simulation to represent rising water levels.
  • The 3D extrusion reflects hazard levels: low, medium, high.
  • Only areas with available flood data will be visualized; the rest of the map remains unaffected.

@chryzxc chryzxc changed the title Refactor Flood Control Map to Mapbox and Added Simple Flood Simulation refactor: flood control map to mapbox and added simple flood simulation with 5, 25 and 100 year flood data Nov 10, 2025
@chryzxc chryzxc marked this pull request as draft November 10, 2025 17:00
@DaijobuDes DaijobuDes added the enhancement New feature or request label Nov 10, 2025
@chryzxc chryzxc changed the title refactor: flood control map to mapbox and added simple flood simulation with 5, 25 and 100 year flood data refactor: convert flood control map to mapbox and added simple flood simulation with 5, 25 and 100 year flood data Nov 11, 2025
@chryzxc chryzxc marked this pull request as ready for review November 11, 2025 11:26
@DaijobuDes DaijobuDes added the high priority This project is needed and needs to be done fast!!! label Nov 11, 2025
@jasontorres
Copy link
Collaborator

Good work here! Any chance we can apply this to https://bisto.ph?

@chryzxc
Copy link
Author

chryzxc commented Nov 24, 2025

Good work here! Any chance we can apply this to https://bisto.ph?

yep, but there would be limits if we're going to overlay the datasets from mapbox to google maps and since we are just using vector tiles from project noah, adding colors or applying styles in the map to visualize hazard levels is not possible

@jasontorres
Copy link
Collaborator

Btw, I still want this integrated. Will find time soon to get this sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request high priority This project is needed and needs to be done fast!!!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants