Product Brief · Kampala, Uganda · 2026

TRACE

Terrain Runoff Analysis & City Engineering. An AI-powered smart drainage intelligence platform for Kampala.

01Executive Summary

Kampala, Uganda faces a severe and growing urban flooding crisis. Roads overflow during heavy rains, infrastructure is damaged, and lives are lost: all due to an outdated and poorly understood drainage system.

TRACE is a zero-cost, open-source platform combining AI-driven 3D terrain modeling, real-time IoT sensor simulation, and smart drainage analysis to help city authorities understand, predict, and improve Kampala's drainage infrastructure. The platform is designed to be built entirely for free using Google Colab and open data sources, making it viable for teams with no budget.

02Problem Statement

Drainage built for a smaller, slower city.

Uganda: and Kampala in particular: suffers from chronic poor drainage. When heavy rainfall occurs, roads flood, properties are damaged, and transportation networks collapse. The root cause is not just the volume of rainfall, but the lack of intelligent infrastructure planning that accounts for Kampala's complex and hilly terrain.

Why existing solutions fail

  • Drainage systems were built without a full understanding of water flow dynamics across Kampala's varied topography.
  • There is no real-time monitoring of water levels at critical drainage points.
  • City planners lack tools to simulate the impact of adding or removing drainage infrastructure.
  • Hilly and low-lying areas require different drainage strategies, which current systems ignore.

03Recent Major Incidents (2024–2025)

March 2025

Kampala Flash Floods

Torrential rainfall killed at least 6–7 people including two minors. Areas affected: Clock Tower, Kawempe, Natete, Kamwokya, Northern Bypass, Banda, Kyambogo, Kinawataka, Sonde. The KCCA Executive Director called it a 'once-in-50-years storm' citing 80mm of rainfall: but experts noted flooding occurs with almost every significant downpour. The Nsobe river overflowed; hundreds of travelers stranded; businesses shut down.

The Independent Uganda · GDACS · Daily Monitor, March 26–30, 2025

November 2024

Bulambuli Landslides & Eastern Uganda Floods

Heavy rains triggered landslides across six villages in Bulambuli District, 280km from Kampala. At least 20 confirmed dead; 113 reported missing. 40 homes buried under mud, 125 destroyed. The Sironko–Kapchorwa and Muyembe–Nakapiripit roads were cut off; a bridge swept away; River Simu burst its banks.

Al Jazeera · PBS NewsHour · Washington Times, Nov 28–29, 2024

September 2024

Kasese, River Nyamwamba

Two killed; 1,469 households affected across thirteen villages; more than 120 homes lost.

ReliefWeb · IFRC GO, 2024

May 2024

Nationwide Floods

18,323 people affected; 1,129 houses completely destroyed; significant cropland and infrastructure damage; thousands of families displaced.

IFRC GO · ReliefWeb, May 2024

October 2025

CBD Flooding

Business in downtown Kampala came to a standstill when heavy rain flooded shopping arcades and commercial buildings in the central business district.

Daily Monitor, October–November 2025

04Root Causes

Destruction of wetlands

Makerere University research found that approximately 50% of Kampala's wetlands have been lost to urban development. Factories, industrial parks, and housing developments have been built on swamps. Developers have encroached on drainage channels, often with political backing. A 2024 NEMA audit flagged multiple sites for non-compliance, though enforcement has been weak.

Makerere University · NEMA 2024 Audit · Watchdog Uganda

Outdated and blocked drainage

Kampala's drainage system was built decades ago and was never designed to handle the city's current population or rainfall intensity. NEMA reports around 60% of urban waste is improperly disposed of: much of it ends up blocking drains. The Nakivubo Channel, the main drainage artery running through all five city divisions, handles more than half of Kampala's stormwater. KCCA's annual budget of UGX 827 billion had zero allocation for new drainage channels at one point.

Daily Monitor · Watchdog Uganda · NEMA Report, 2025

Rapid and unplanned urbanization

Informal settlements in low-lying flood-prone areas like Bwaise, Kalerwe, Kinawataka, Kisenyi, and Katwe are particularly vulnerable. Paved road surfaces increase runoff and reduce natural water absorption. Building in road reserves and flood plains is common, with inadequate enforcement. Makerere academic Denis Arinabo notes that colonial planning legacies, weak governance, and contested urban development have created a 'dangerous flooding cocktail'.

Daily Monitor · AfriCGE · Laudato Youth Initiative

Climate change

The IPCC has linked human-induced global warming to a 20% increase in rainfall intensity in some regions of East Africa over recent decades. Uganda's National Meteorological Authority regularly forecasts above-normal rainfall seasons.

IPCC 2021 · Uganda National Meteorological Authority

05Proposed Solution

A two-component platform: software intelligence and a sensor network.

Software layer

3D Terrain Modeling

Using Copernicus GLO-10 elevation data and OpenStreetMap drainage layers, TRACE builds a high-resolution digital model of Kampala's terrain, capturing slopes, valleys, hills, and existing drainage infrastructure at 10m resolution.

Water Flow Simulation

WhiteboxTools runs proven D8 flow direction and accumulation algorithms on the conditioned DEM. This produces an accurate map of every natural drainage path across the terrain without requiring a custom-trained neural network.

Drainage Intelligence Engine

PyTorch and XGBoost analyze the gap between where water accumulates and where OSM drainage infrastructure exists. High accumulation with no nearby drain equals a recommendation zone. Output is a ranked list of coordinates with severity scores and suggested pipe routing.

Visualization Dashboard

A Streamlit dashboard embeds Pydeck for 3D terrain, Kepler.gl for flow heatmaps and risk layers, and Folium as a 2D fallback. City authorities can view recommendations, compare before-and-after scenarios, and monitor simulated sensor alerts in one interface.

Hardware layer (simulated for hackathon)

In the full production version, low-cost IoT water-level sensors are placed at key drainage points across Kampala. For the hackathon, this hardware layer is simulated digitally within the 3D model.

  • Sensors placed at road intersections, low-lying areas, and known flood hotspots.
  • Data transmitted via cellular and radio mesh networks for coverage in low-connectivity areas.
  • Real-time alerts sent to the dashboard when water levels approach critical thresholds.
  • Authorities can dispatch response teams to problem areas directly from the app.

06Target Users & Key Features

Target users

City Planners
Kampala Capital City Authority
Understand where to invest in drainage infrastructure
Emergency Responders
Flood response teams
Real-time alerts on flood risk zones
Civil Engineers
Infrastructure design teams
AI recommendations for pipe placement and routing
Government Officials
Policy and budget decision makers
Evidence-based investment priorities

Core features (Hackathon MVP)

3D Terrain Model
3D map of Kampala built from open satellite and elevation data
P0: Must Have
Water Flow Simulation
AI model simulating water movement across terrain
P0: Must Have
Drainage Recommendations
AI suggestions for pipe additions, removals, and rerouting
P0: Must Have
Sensor Visualization
Simulated sensor placement shown on the 3D model
P1: Should Have
Web Dashboard
Interactive UI for viewing terrain, flow, and recommendations
P1: Should Have
Flood Risk Alerts
Threshold-based alerts for high-risk drainage zones
P2: Nice to Have

07Technical Architecture

100% free. Street-level precision.

Every tool in this stack is free and open-source. All heavy computation runs on Google Colab, eliminating local hardware constraints entirely. The stack achieves street-level drainage precision by fusing four independent data sources: GLO-10 terrain, HydroSHEDS watershed geometry, OpenStreetMap drainage and road layers, and Mapillary street-level imagery processed with computer vision.

No single source is sufficient alone. GLO-10 gives terrain shape but misses street-scale features. OSM has mapped channels but incomplete coverage. Mapillary fills the gaps OSM cannot see. HydroSHEDS validates that watershed boundaries are hydrologically correct before any analysis begins. Together they form a composite ground model that reflects how water actually moves through Kampala's streets.

The critical step tying everything together is stream burning. After WhiteboxTools conditions the DEM and Mapillary detections are georeferenced, those real-world drain locations are burned into the elevation model as forced flow paths. From that point, all hydrology calculations follow actual infrastructure rather than raw terrain alone. This is what closes the gap between city-block analysis and street-corridor precision.

How the layers tie together

GLO-10 + HydroSHEDS → validated terrain with correct watershed boundaries

OSM roads + drains → impermeable surfaces, known channel geometry

Mapillary + YOLOv8 → street-level drain detections not in OSM

WhiteboxTools → condition DEM, burn all drain sources, run D8 flow

PyTorch + XGBoost → gap analysis, flood risk scoring, ranked recommendations

Streamlit + Pydeck → dashboard rendering for KCCA decision makers

Compute
Google Colab (Free T4 GPU)
All heavy processing runs in the cloud. Zero local hardware required.
Terrain DEM
Copernicus GLO-10
10m resolution, plus or minus 4m vertical accuracy. Free GeoTIFF download, no account needed. Best available free DEM for Kampala.
Watershed Base
HydroSHEDS (WWF)
Pre-conditioned SRTM drainage basins covering Uganda, processed specifically for hydrological analysis. Validates GLO-10 watershed boundaries and provides stream order data showing which channels carry the most water.
Drainage Data
OpenStreetMap via Overpass Turbo
Two queries run in parallel: waterway=drain/culvert/ditch for existing drain geometry, and highway=* with surface=* tags for road surfaces. Roads are modeled as impermeable, forcing runoff to their edges and into side drains.
Street Imagery
Mapillary API
Free, open street-level photo platform with coverage across Kampala's main roads. Images are pulled for the target neighborhood via the Mapillary API at zero cost. Used as ground truth for drain locations that are not recorded in OSM.
Drain Detection CV
YOLOv8 on Colab
Object detection model run on Mapillary images to locate drain inlets, culvert openings, and blocked channels at street level. The base YOLOv8 model is pretrained and free. Fine-tuning on Kampala drain images improves accuracy for local infrastructure types.
Geo Processing
Rasterio + GDAL + GeoPandas
Rasterio parses GeoTIFF elevation files from GLO-10 and HydroSHEDS. GeoPandas handles all OSM vector layers and Mapillary detection outputs. QGIS for visual QA during development.
DEM Conditioning
WhiteboxTools: BreachDepressionsLeastCost
Corrects flat valley floors in the raw GLO-10 DEM so water routing is hydrologically accurate. Mandatory before any flow analysis.
Stream Burning
WhiteboxTools: BurnStreamsAtRoads
Burns Mapillary-detected drain locations and OSM road drainage geometry directly into the conditioned DEM as forced flow paths. This is what elevates analysis from neighborhood scale to street-corridor scale.
Hydrology Engine
WhiteboxTools: D8 Flow Direction + Accumulation
Proven deterministic hydrology algorithms run on the stream-burned DEM. Produces a map of every drainage path and accumulation hotspot now anchored to real street-level infrastructure.
AI / ML
PyTorch + XGBoost
Gap analysis between flow accumulation output and the combined OSM and Mapillary drain coverage. Flood risk scoring per grid cell. Produces the ranked recommendation list for new infrastructure.
3D Visualization
Pydeck (DeckGL)
Geospatial-native 3D terrain renderer. Embeds directly in Streamlit. Displays the stream-burned DEM with drain network and risk zone overlays.
Pitch 3D
CesiumJS
Cinematic 3D terrain flythrough for the hackathon presentation. Runs in browser, free tier.
Geo Layers
Kepler.gl
Flow accumulation heatmaps, drain network overlays, Mapillary detection points, and flood risk zones in one interface. Zero code required for layer rendering.
Dashboard
Streamlit
Embeds Pydeck, Kepler.gl, and Folium natively. Free hosting on Streamlit Cloud. No DevOps.
2D Fallback
Folium
Leaflet wrapper in Python. Lightweight 2D drain overlay for devices that cannot handle 3D rendering.
Sensor Simulation
NumPy (synthetic data)
Generates synthetic water level readings at identified bottleneck points. Feeds threshold-based alert UI in the dashboard.

08Data Pipeline

  1. 01Download Copernicus GLO-10 GeoTIFF and HydroSHEDS basin data for the target neighborhood bounding box. Pull OSM drain, culvert, waterway, and road surface layers via Overpass Turbo in parallel.
  2. 02Validate watershed boundaries using HydroSHEDS stream order data. This confirms the GLO-10 terrain is correctly oriented before any conditioning begins.
  3. 03Run DEM conditioning in WhiteboxTools using BreachDepressionsLeastCost. Corrects flat valley floors so water routing follows real terrain, not DEM artifacts.
  4. 04Pull Mapillary street-level images for the target area via the free API. Run YOLOv8 object detection on each image to locate drain inlets, culvert openings, and blocked channels not recorded in OSM. Georeference each detection to its GPS coordinate.
  5. 05Burn all drain sources into the conditioned DEM using WhiteboxTools BurnStreamsAtRoads. This merges OSM drain geometry, OSM road edge drainage, and Mapillary-detected drain locations into the elevation model as forced flow paths. This is the step that achieves street-level precision.
  6. 06Compute D8 Flow Direction and D8 Flow Accumulation on the stream-burned DEM. Flow now follows real infrastructure at street-corridor scale, not raw terrain alone.
  7. 07Run gap analysis using GeoPandas spatial join and PyTorch or XGBoost. Score each high-accumulation cell by distance to the nearest confirmed drain from any source. High score plus no drain equals a recommendation zone.
  8. 08Render results on the Streamlit dashboard: Pydeck for 3D terrain with burn lines visible, Kepler.gl for flow heatmaps and risk zones with Mapillary detection points, Folium for 2D fallback. NumPy synthetic sensor data feeds the real-time alert panel.

09Hackathon Game Plan

Five days to a working demo.

Day 1
Download GLO-10 DEM, HydroSHEDS basins, and pull OSM drainage and road layers for Bwaise
Overpass Turbo, Rasterio, GeoPandas, QGIS
Validated terrain dataset with watershed boundaries and drain network ready
Day 2
Pull Mapillary imagery, run YOLOv8 drain detection, condition DEM and burn all drain sources
Mapillary API, YOLOv8 on Colab, WhiteboxTools: BreachDepressionsLeastCost + BurnStreamsAtRoads
Stream-burned DEM with street-level drain locations fused into the elevation model
Day 3
Run D8 flow simulation, gap analysis, and generate ranked drainage recommendations
WhiteboxTools D8, PyTorch or XGBoost on Colab, GeoPandas spatial join
Ranked list of coordinates with flood risk scores where new drainage is needed
Day 4
Build web dashboard with 3D terrain, risk layers, detection points, and sensor alert panel
Streamlit, Pydeck, Kepler.gl, Folium, NumPy
Interactive demo with terrain view, Mapillary detection overlay, risk zones, and live alerts
Day 5
Polish demo, prepare pitch, rehearse presentation
CesiumJS for 3D flythrough, slides
Hackathon-ready presentation with live demo

10Proof of Concept Scope

For the hackathon, the team will focus on one specific neighborhood in Kampala rather than the entire city. This is intentional: a focused, working demo is more compelling than a broad, broken one. The pitch will clearly articulate how the system scales city-wide.

Recommended starting area

Choose a neighborhood known for flooding, such as Bwaise, Nakivubo, or Katanga, where the terrain and flooding patterns are well documented. This makes the AI recommendations immediately credible and relatable to judges.

11Government & KCCA Response

KCCA Drainage Upgrade Works (2025–2026)

Constructed 16 crossing culverts along Allen Road and Sebana Road. In March 2026, flood water in the CBD drained in just 7 minutes instead of the usual 3+ hours. 7 of 18 planned drainage crossings completed by December 2025; remaining 11 targeted within 30 days. Longitudinal drainage along Ben Kiwanuka Street underway. Planned major box culvert on Namirembe Road to channel stormwater into Nakivubo. KCCA plans 47.7km of new drainage across 98 parishes in FY 2025/26, with 500 manhole covers reconstructed.

KCCA · AllAfrica, March 2026 / December 2025

KCCA Council Resolution: April 3, 2025

A landmark resolution approved a new model: partnering with competent local investors to upgrade and cover Kampala's open drainage channels under strict KCCA supervision. Vision: a Kampala with closed, modern underground drainage systems, free from solid waste blockages. Inspired by the success of the Nakivubo Jugula channel project by Ham Enterprises: the area remained dry during the March 2025 floods. Funding to come from public-private partnerships as government and donor funding declines.

Watchdog Uganda · PML Daily · UG Bulletin, April 2025

Kampala Sanitation and Flood Resilience Master Strategy 2025–2030

A five-year master strategy built around four pillars: drainage system upgrade (Nakivubo, Lubigi, Kinawataka), waste management reform, green infrastructure (eco-friendly pavements, wetland reforestation, green corridors), and community engagement. Budget: UGX 1.3 trillion over five years, sourced from government, World Bank urban resilience grants, and green infrastructure investments.

Kampala Express, April 2025

Greater Kampala Metropolitan Urban Development Programme (GKMA-UDP)

A UGX 2.2 trillion programme launched in September 2024, co-funded by the World Bank. 15 roads covering 19.85km under active construction (Phase 1 of 81.7km total). Drainage channels constructed alongside road works. China Railway Seventh Group contracted for Wakiso road works at UGX 35 billion. Cross culverts installed at 11 of 13 targeted locations as of April 2026.

Daily Monitor · KCCA, 2024–2025

Greater Kampala Integrated Flood Resilience (GKIFR) Partnership

A nature-based solutions initiative by KCCA with the Ministry of Water and Environment, Uganda Manufacturers Association, and international funders (EU, German BMZ, UK DFID). Pilot rainwater harvesting at 7 sites including schools and markets: Kitebi Secondary School received an 80,000-litre tank. Focus on integrating green infrastructure into urban planning.

KCCA, 2023–2024

12The Critical Gap

Reactive today. Predictive tomorrow.

Despite ongoing physical infrastructure works, Uganda has no smart, data-driven system for monitoring, predicting, or intelligently optimizing its drainage network. Current responses are almost entirely reactive: authorities respond after flooding occurs, not before.

What exists now
What is missing
Manual culvert cleaning and drain upgrades
Real-time water level monitoring across the city
Reactive flood response (pumps, rescue teams)
Predictive flood alerts before disaster strikes
Physical drainage channel construction
AI analysis of terrain to optimize where pipes go
Political debate over drainage responsibility
Data-driven evidence for infrastructure decisions
Rainwater harvesting pilots at 7 sites
City-wide smart drainage intelligence platform

"Every year it's the same story. Wetlands are filled, water has nowhere to go, and roads become rivers. Without serious reforms, we'll keep seeing this."Paul Senoga, environmental policy analyst

"If the government doesn't step up with some drastic, decisive interventions, Ugandans will continue experiencing senseless loss of lives, business and property as a result of extreme weather episodes."Joel Ssenyonyi, Opposition Leader

13Scalability & Impact

How it scales

  • The 3D modeling approach works for any geographic area: expanding from one neighborhood to all of Kampala is a matter of adding more data, not redesigning the system.
  • The AI model improves as more sensor data is added over time.
  • The platform can be adapted for other Ugandan cities and eventually across East Africa.

Long-term vision

  • Deploy physical IoT sensors at 500+ drainage points across Kampala.
  • Integrate with Uganda's National Meteorological Authority for predictive flood alerts.
  • Partner with Kampala Capital City Authority for city-wide drainage planning.
  • Open-source the platform for adoption across Sub-Saharan Africa.

Why this matters

Poor drainage in Kampala costs the economy millions of dollars annually in road damage, property loss, and lost productivity. TRACE gives city planners an evidence-based tool to make smarter infrastructure decisions: turning a reactive system into a proactive one.

14Constraints & Assumptions

Zero budget
All tools are free and open-source; Google Colab eliminates hardware requirements
4GB RAM laptop
All heavy computation runs on Google Colab in the cloud, not the local machine
No physical sensors
Hardware layer is simulated digitally for the hackathon demo
Limited connectivity in some areas
Mesh radio networks included in the full hardware architecture plan
One week timeline
Scope limited to one neighborhood; city-wide scale is part of the pitch vision

15Success Metrics

For the hackathon

  • Working 3D terrain model of at least one Kampala neighborhood.
  • Demonstrable AI water flow simulation.
  • At least 3 concrete drainage recommendations generated by the AI.
  • Clear and compelling pitch that communicates city-wide impact.

For full deployment

  • Reduction in average flood response time by 40%.
  • 500+ sensors deployed across Kampala within 2 years.
  • AI drainage recommendations adopted by Kampala Capital City Authority.
  • Platform replicated in at least 2 other Ugandan cities within 3 years.

Closing

Built for Uganda. Designed for Africa.

The MVP is deliberately scoped to be achievable in one week with zero budget. Focus on making the demo clear and impactful: judges respond to a compelling problem, a credible solution, and visible potential. All team members should have Google accounts to access Google Colab. Divide tasks as follows: one person handles data collection and terrain modeling, one handles the AI simulation, and one handles the dashboard and presentation. Daily check-ins are essential given the tight timeline.