Calgary Building and Address Import

From OpenStreetMap Wiki
Jump to navigation Jump to search

Calgary Building and Address Import is an incomplete (as of June 2025) one-time import of LIDAR-generated building outlines and a parcel address dataset provided by the City of Calgary, covering Calgary, Alberta, Canada.

Goals

Map all building outlines, with addresses for most residential buildings in the city.

Schedule

2024-

Import Data

Background

Data source sites:
https://data.calgary.ca/Base-Maps/Buildings/uc4c-6kbd/about_data
https://data.calgary.ca/Base-Maps/Parcel-Address/9zvu-p8uz/about_data
Data license: https://data.calgary.ca/stories/s/Open-Calgary-Terms-of-Use/u45n-7awa/
Type of license (if applicable): Open Government Licence – City of Calgary
Link to permission (if required):
OSM attribution (if required): https://wiki.openstreetmap.org/wiki/Contributors#Calgary
ODbL Compliance verified: yes

Import Type

One time, using JOSM.

Data Preparation

Data Reduction & Simplification

Building outlines contain a lot of unnecessary nodes so are simplified with geopandas.simplify(tolerance=0.000001, preserve_topology=True), which still doesn't get rid of a lot of unnecessary nodes though.

Tagging Plans

Building outline types (BLDG_CODE_DESC column) are mapped to building=* like this:

Original OSM
School Colleges building=school
Commercial building=commercial
Unclassified building=yes
Residential Garage building=garage
Residential Roof Outline building=residential

Outlines with other categories (like churches and stadiums) are dropped. Bus stop outlines were imported in 161645699 (achavi, OSMLab, FacilMap).

Changeset Tags

Import changesets don't include any special tags, besides the word "import" in the changeset comment and links to the two data sets in source=*.

All building outlines have a source=City of Calgary Digital Aerial Survey building roof outlines added.

Data Transformation

The data is transformed using these Python scripts:

https://github.com/verhovsky/calgary_osm_import/tree/master/buildings

The outlines are shifted slightly to align with Bing imagery, the outlines are simplified, outline type is converted to building=*, and the outlines are split into neighborhoods for piecemeal importing.

Addresses are converted into OSM compatible addr:unit=* addr:housenumber=* and addr:street=* tags. The street name in the dataset is in all caps, so the generated name is case-insensitively matched to an existing name=* value of a highway=* way within the Calgary boundary=administrative relation (relation 3227127) to correctly handle street names with "Mc"/"Mac" and "'s". Points that don't match an existing street name are removed.

Data Transformation Results

Not uploaded.

Data Merge Workflow

Workflow

Using JOSM with the Conflation plugin and the Building Colors map paint style.

  • Load the outlines for a neighborhood
  • Search for all building="residential" and Freeze as conflation Subject
  • Load address points for that neighborhood as a new layer
  • Select all points and Freeze as conflation Reference
  • Generate matches
  • Adjust the dataset and conflation selections until you get down to 0 in the "Refence only" and "Subject only" sets of the conflation result
    • Delete address points with no house (parks, apartments complexes)
    • unselect address points and outlines of duplexes/townhomes/apartments
    • Fix incorrectly categorized buildings
    • Move address nodes that are further than 30m (conflation plugin default) from the building outline centroid
    • Find and fix crossing conflation arrows (always a mistake)
  • Conflate
  • Search for building: and set as conflation Reference
  • Download OSM data for the given neighborhood as a new layer
  • Search for building: and set as conflation Subject
  • Generate matches
  • Fix conflicts and conflate old buildings with new, addressed buildings

QA

None besides looking at all the data

Discussion

The post to the community forum was made on 2025-03-05.