Inspiration

Climate change isn't just a global problem; it's a local one as well. The Urban Heat Island effect keeps cities several degrees C hotter than surrounding rural areas, disproportionately affecting vulnerable communities.

Though many cities have access to satellite data, they lack the tools to act on it. Urban planners are stuck between raw scientific rasters and bureaucratic grant applications. ReLeaf bridges that gap. We wanted to create a tool that shows the problem but also empowers planners to design the solution, visualize the impact, and write the check to pay for it.

What it does

ReLeaf is a comprehensive "Digital Twin" for urban resilience planning. It guides the user through the entire lifecycle of a climate intervention:

Diagnosis: It ingests Sentinel-2 Satellite thermal data to render a high-fidelity Heat Risk Layer, overlaying it with social vulnerability data (hospitals, schools, low-income zones) to prioritize equity.

Intervention: Users can plant Trees, install Cool Roofs, and build Bio-Swales. Our physics engine calculates the cooling impact (degrees C reduction) and energy savings in real-time.

Visualization: Using Google Gemini 2.5 Flash, users can click any planted tree to see a "Real Life View." We fetch the actual Google Street View panorama and use generative AI to compositing the tree into the scene at the exact coordinates.

Funding: With one click, Gemini 2.0 Flash analyzes the simulation metrics (CO2 offset, people protected, ROI) and writes a professional, FEMA-compliant Grant Proposal Narrative instantly.

How we built it

ReLeaf is a full-stack web application built for both speed and scientific accuracy.

Geospatial Engine: The backend is built with Python (FastAPI). We use rasterio and numpy to process raw GeoTIFF satellite imagery, converting pixel-level thermal readings into queryable JSON data.

Map: The frontend is React (Vite) powered by Deck.gl and the Google Maps JavaScript API. This allows us to render thousands of data points (Red Zones) and 3D tree models without lag.

AI Vision: For the "Real Life View," we built a pipeline that fetches a static image from the Google Street View API, calculates the heading/pitch, and prompts Gemini to "predict" the intervention while preserving the existing building geometry.

AI Grant Writer: We feed the simulation state (JSON) into Gemini to generate persuasive text for funding applications.

Validation: We use OpenStreetMap (Overpass API) to validate every click, preventing users from accidentally planting trees in the middle of intersections or the ocean.

Persistence: We implemented Supabase (with PostgreSQL + PostGIS) to save projects and cache expensive AI and Street View API calls.

Challenges we ran into

Satellite Data Size: Processing 500MB+ GeoTIFFs on the fly is slow. We optimized this by implementing a localized caching strategy and building a synthetic fallback mode for demo purposes.

AI Consistency: Getting Generative AI to "add a tree" without hallucinating a completely different city street was tough. We spent time refining the system prompts to ensure Gemini respected the original scene geometry.

Accomplishments that we're proud of

End-to-End Workflow: We built not only a map, but a tool that goes from "Diagnosis" to "Funding."

Gemini Usage: We utilized Gemini for both its vision capabilities (image editing) and its language capabilities (grant writing) in a single, cohesive product.

Real Data: This isn't a simulation on a fake map. We are using real thermal readings from Vancouver and real infrastructure data.

What we learned

We gained experience in geospatial engineering and bridging the gap between raster data (satellite pixels) and vector data (map markers). We also learned how to use multimodal AI as a specialized component in a software pipeline.

What's next for ReLeaf

Multi-City Support: Currently, our GEOTiff pipeline only ingests data from Vancouver. In the future, we hope to expand our GeoTIFF pipeline to ingest data for any city on Earth automatically.

Improved Location Validation: Our app uses OpenStreetMap data to determine the type of location selected by the user and whether this location is suitable for the chosen intervention (ex. tree planting). This validation technique is somewhat accurate, but we would hope for even more accuracy. In the future, we hope to allow urban planners to integrate existing data of their chosen cities' maps in order to achieve higher accuracy.

Built With

Share this project:

Updates