Inspiration
"I just can't afford to give up. I don't know where else we'd go." That's a real quote from Trudy Banker — a woman from Kitchener who lived in her home for 17 years before rising housing costs nearly forced her out. Her neighbours weren't as lucky. Their units now rent for over $1,000 more than what they were paying. Stories like Trudy's are everywhere in Canada right now. Everyone agrees we need to build more homes — but what nobody talks about is how hard it is to even figure out where we can build. Before a single brick is laid, developers and governments have to navigate a maze of zoning laws, environmental regulations, flood maps, contaminated site records, Indigenous land rights, and provincial planning policies. That research takes months and costs tens of thousands of dollars in consulting fees. We thought — what if all of that took seconds instead of months? That's why we built TerraCheck.
What it does
TerraCheck is an AI-powered land viability assessment platform for Canada. A government planner or housing developer drops a pin on an interactive map, and within seconds receives a comprehensive viability report covering:
Zoning compatibility — Is this land zoned for the intended use? Environmental constraints — Protected wetlands, species at risk habitats, greenbelt boundaries Flood risk — Flood plain mapping from conservation authorities Contaminated sites — Federal contaminated sites inventory Indigenous land considerations — Treaty boundaries and duty-to-consult requirements Regulatory pathway — What approvals are needed and estimated timelines
The platform generates an overall viability score (0–100), flags critical blockers and warnings, recommends specific mitigation strategies, and provides an AI-generated voice briefing of the full report. Users can ask follow-up "what if" questions to explore how changes to their plans would affect viability. What used to cost $50K–$200K in consulting fees and take months of manual research is now available in five seconds with one click.
How we built it
Frontend: Next.js 14 with React and Tailwind CSS. The map interface uses Leaflet with OpenStreetMap tiles, rendering multiple GeoJSON data layers with color-coded overlays (flood zones in blue, zoning in yellow, protected areas in green, contaminated sites in red). The assessment panel features an animated viability score gauge, expandable detail cards, and an integrated follow-up chat. Backend: FastAPI (Python) handles all server-side logic. GeoPandas and Shapely power the geospatial engine — when a user drops a pin, the backend creates a point geometry, buffers it to a configurable search radius, and runs spatial intersection queries against every loaded data layer. All intersecting features and their attributes are packaged into a structured context object. AI Engine: The Gemini API receives the full geospatial context along with a system prompt encoding Canadian federal and provincial environmental regulations (Impact Assessment Act, Species at Risk Act, Ontario Planning Act, Greenbelt Act, and more). It returns a structured JSON report with viability scores, blockers, warnings, green flags, regulatory pathways, and mitigation recommendations. The same engine powers the follow-up chat for "what if" scenario analysis. Authentication: Auth0 provides secure login with support for SSO — critical for government and enterprise users who need to save and revisit assessments. Data Sources: Real Canadian government data from Open Canada (federal contaminated sites, species at risk, treaty boundaries), Ontario GeoHub (flood mapping, greenbelt boundaries, provincial wetlands), and Waterloo Region Open Data (municipal zoning).
Challenges we ran into
Data wrangling was brutal. Government geospatial data comes in wildly inconsistent formats — different coordinate reference systems, inconsistent attribute naming, incomplete metadata. We spent significant time preprocessing shapefiles and GeoJSON files into a unified format that our geospatial engine could query consistently. Prompt engineering for regulatory accuracy. Getting Gemini to consistently return structured, legally-grounded assessments required extensive iteration. Early outputs were either too vague ("there may be environmental concerns") or hallucinated specific regulations that didn't exist. We had to carefully craft the system prompt with explicit references to real Canadian legislation and build in guardrails so the AI flags uncertainty rather than guessing. Making it feel real-time. The pipeline involves geocoding, multiple spatial queries, a Gemini API call, and optional ElevenLabs audio generation. Each step adds latency. We optimized by running spatial queries in parallel, streaming the Gemini response, and using optimistic UI updates so the interface feels responsive even while processing. Scoping for a hackathon. The vision is nationwide, but we had to scope the prototype to one region. Choosing Waterloo Region and curating a focused but representative set of data layers let us build a demo that feels complete rather than spread thin.
Accomplishments that we're proud of
Real government data, not mock data — every layer on the map comes from actual Canadian government sources The full pipeline from pin drop to comprehensive AI report in under 10 seconds Voice briefing that makes dense regulatory analysis accessible to anyone A product that could genuinely help accelerate housing development in Canada
What we learned
Canadian geospatial data is publicly available but incredibly fragmented — there's a real need for unified access The gap between "information exists" and "information is accessible" is where the biggest opportunities live Prompt engineering for domain-specific AI (environmental law, urban planning) requires grounding in real legislation, not just general knowledge Building for government/enterprise users requires a different UX mindset than consumer apps — clarity and trust matter more than flashiness
What's next for TerraCheck
Nationwide expansion — Integrate data layers for all provinces and territories, not just Ontario Municipal API partnerships — Work with cities to get real-time zoning and planning data feeds Indigenous consultation integration — Partner with Indigenous communities to ensure duty-to-consult requirements are accurately represented Cost estimation engine — Add estimated development costs based on site conditions, required mitigations, and local construction costs Historical assessment comparison — Let users compare how viability has changed over time as regulations and environmental conditions evolve
Built With
- auth0
- css
- fastapi
- gemini
- geojson
- geopanda
- html
- javascript
- leaflet.js
- next.js
- python
- react
- shapely
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.