Digitize TRREB district boundaries in QGIS #25

Closed
opened 2026-01-14 22:32:33 +00:00 by lmiranda · 2 comments
Owner

Summary

The Toronto Housing Dashboard currently uses City of Toronto neighbourhoods (158) as a proxy for the purchase market choropleth map. To properly display TRREB (Toronto Regional Real Estate Board) district data (W01, C01, E01, etc.), the district boundaries need to be manually digitized.

Background

  • TRREB district boundaries are not publicly available as GeoJSON/shapefile
  • The boundaries are proprietary and only available as PDF maps
  • Web searches confirmed no existing open-source digitization exists

Task

Manually trace TRREB district boundaries in QGIS using the official PDF map as reference:

Source PDF: https://webapp.proptx.ca/trrebdata/common/maps/Toronto.pdf

Output requirements:

  • Format: GeoJSON
  • CRS: EPSG:4326 (WGS84)
  • Output path: data/toronto/raw/geo/trreb_districts.geojson
  • Required properties per feature:
    • district_code: e.g., "W01", "C01", "E01"
    • district_name: e.g., "Long Branch", "Downtown Toronto"
    • area_type: "West", "Central", "East", or "North"

Districts to digitize (~35 total)

West (W01-W10):
W01, W02, W03, W04, W05, W06, W07, W08, W09, W10

Central (C01-C15):
C01, C02, C03, C04, C06, C07, C08, C09, C10, C11, C12, C13, C14, C15

East (E01-E11):
E01, E02, E03, E04, E05, E06, E07, E08, E09, E10, E11

Estimated effort

3-4 hours

Once complete

The TRREBDistrictParser in portfolio_app/toronto/parsers/geo.py is already implemented and ready to use. Just drop the GeoJSON file in the specified path and update callbacks/__init__.py to load it.

References

## Summary The Toronto Housing Dashboard currently uses City of Toronto neighbourhoods (158) as a proxy for the purchase market choropleth map. To properly display TRREB (Toronto Regional Real Estate Board) district data (W01, C01, E01, etc.), the district boundaries need to be manually digitized. ## Background - TRREB district boundaries are **not publicly available** as GeoJSON/shapefile - The boundaries are proprietary and only available as PDF maps - Web searches confirmed no existing open-source digitization exists ## Task Manually trace TRREB district boundaries in QGIS using the official PDF map as reference: **Source PDF:** https://webapp.proptx.ca/trrebdata/common/maps/Toronto.pdf **Output requirements:** - Format: GeoJSON - CRS: EPSG:4326 (WGS84) - Output path: `data/toronto/raw/geo/trreb_districts.geojson` - Required properties per feature: - `district_code`: e.g., "W01", "C01", "E01" - `district_name`: e.g., "Long Branch", "Downtown Toronto" - `area_type`: "West", "Central", "East", or "North" ## Districts to digitize (~35 total) **West (W01-W10):** W01, W02, W03, W04, W05, W06, W07, W08, W09, W10 **Central (C01-C15):** C01, C02, C03, C04, C06, C07, C08, C09, C10, C11, C12, C13, C14, C15 **East (E01-E11):** E01, E02, E03, E04, E05, E06, E07, E08, E09, E10, E11 ## Estimated effort 3-4 hours ## Once complete The `TRREBDistrictParser` in `portfolio_app/toronto/parsers/geo.py` is already implemented and ready to use. Just drop the GeoJSON file in the specified path and update `callbacks/__init__.py` to load it. ## References - [TRREB Community Map](https://www.torontomls.net/Communities/map.html) - [TRREB Central District Maps](http://maps.torontomls.net/central/index.htm)
Author
Owner

QGIS Workflow Tips

Setup

  1. Download the TRREB PDF map
  2. Open QGIS and create a new project with CRS set to EPSG:4326 (WGS84)
  3. Add a basemap layer (e.g., OpenStreetMap via XYZ Tiles)
  4. Georegister the PDF if importing as raster, OR use it as a visual reference while tracing

Digitization Approach

  1. Create a new vector layer: Layer → Create Layer → New GeoPackage/Shapefile Layer
    • Geometry type: Polygon
    • CRS: EPSG:4326
    • Add fields: district_code (text), district_name (text), area_type (text)
  2. Use the Add Polygon Feature tool to trace each district boundary
  3. Use the basemap and street names to align boundaries accurately
  4. Save regularly!

Quality Checks

  • Ensure no gaps between adjacent districts
  • Ensure no overlaps
  • Verify all 35 districts are present

Export

  1. Right-click layer → Export → Save Features As...
  2. Format: GeoJSON
  3. CRS: EPSG:4326 (verify this!)
  4. Save to: data/toronto/raw/geo/trreb_districts.geojson

Validation

Run this Python snippet to verify the output:

from portfolio_app.toronto.parsers.geo import TRREBDistrictParser
from pathlib import Path

parser = TRREBDistrictParser(Path("data/toronto/raw/geo/trreb_districts.geojson"))
districts = parser.parse()
print(f"Loaded {len(districts)} districts")
for d in districts[:5]:
    print(f"  {d.district_code}: {d.district_name} ({d.area_type.value})")
## QGIS Workflow Tips ### Setup 1. Download the TRREB PDF map 2. Open QGIS and create a new project with CRS set to **EPSG:4326 (WGS84)** 3. Add a basemap layer (e.g., OpenStreetMap via XYZ Tiles) 4. Georegister the PDF if importing as raster, OR use it as a visual reference while tracing ### Digitization Approach 1. Create a new vector layer: Layer → Create Layer → New GeoPackage/Shapefile Layer - Geometry type: **Polygon** - CRS: **EPSG:4326** - Add fields: `district_code` (text), `district_name` (text), `area_type` (text) 2. Use the **Add Polygon Feature** tool to trace each district boundary 3. Use the basemap and street names to align boundaries accurately 4. Save regularly! ### Quality Checks - Ensure no gaps between adjacent districts - Ensure no overlaps - Verify all 35 districts are present ### Export 1. Right-click layer → Export → Save Features As... 2. Format: **GeoJSON** 3. CRS: **EPSG:4326** (verify this!) 4. Save to: `data/toronto/raw/geo/trreb_districts.geojson` ### Validation Run this Python snippet to verify the output: ```python from portfolio_app.toronto.parsers.geo import TRREBDistrictParser from pathlib import Path parser = TRREBDistrictParser(Path("data/toronto/raw/geo/trreb_districts.geojson")) districts = parser.parse() print(f"Loaded {len(districts)} districts") for d in districts[:5]: print(f" {d.district_code}: {d.district_name} ({d.area_type.value})") ```
Author
Owner

Closing as won't do — Project is transitioning from TRREB districts to Toronto's 158 official neighbourhoods. Neighbourhood boundaries are available as GeoJSON from Toronto Open Data, eliminating the need for manual digitization. See docs/changes/Change-Toronto-Analysis-Reviewed.md for the new implementation plan.

Closing as **won't do** — Project is transitioning from TRREB districts to Toronto's 158 official neighbourhoods. Neighbourhood boundaries are available as GeoJSON from Toronto Open Data, eliminating the need for manual digitization. See `docs/changes/Change-Toronto-Analysis-Reviewed.md` for the new implementation plan.
lmiranda added this to the Launch: Host, Bio and Toronto House Market Analysis project 2026-01-16 14:51:54 +00:00
lmiranda self-assigned this 2026-01-16 14:51:59 +00:00
lmiranda moved this to Done in Launch: Host, Bio and Toronto House Market Analysis on 2026-01-16 14:52:07 +00:00
Sign in to join this conversation.