Importation des adresses de la Ville de Sherbrooke
The project aims to add all missing addresses to OSM buildings in Sherbrooke. The Sherbrooke addresses are provided by the City of Sherbrooke as part of an open data initiative. The import is completed (2025-09-21) .
Goals
Adding all missing addresses to Sherbrooke's OSM buildings. There are about 60,000 buildings in Osm within the City limits. Most of these were mapped two years ago. Existing addresses will be validated and missing buildings will be added, when possible..
Schedule
- Summer 2025, easy cases import.
- Fall 2025 (or earlier if all goes well), all other cases using manual import/integration.
Import Data
Background
- Data source: Données ouvertes de la ville de Sherbrooke
- Data license: CC BY 4.0
- OSM attribution: http://wiki.openstreetmap.org/wiki/Contributors#Sherbrooke
- ODbL Compliance verified: yes
Import Type
This is a one-time import. Database/GIS tools are used to identify and solve (if possible) the different data integration cases between addresses data and OSM buildings. An iterative approach is used to import the data, as data integration issues are resolved, from simple to complex cases. Every iteration is uploaded using JOSM, with prior visual inspection and data validation using “Validator”.
Data Preparation
Data Reduction & Simplification
The address dataset contains 70,255 records and 10 fields. Addresses are located on building/apartment centroids. Four provided fields are used.
- no_civique: house number,
- rue: street name,
- x: X-coordinate (srid 3857),
- y: Y-coordinate (srid 3857).
Here, "rue" values are not appropriate for import (i.e., all capitalized, missing hyphens and street orientation). They are replaced by the value of the “toponymie” field of Sherbrooke “Segments de rue” dataset (ODbL Compliance verified). This field matches actual street signs in Sherbrooke.
Tagging Plans
- no_civique converted to addr:housenumber.
- rue replaced by toponymie then converted to addr:street.
Changeset Tags
| Key | Value |
|---|---|
| comment | Description of the current iteration |
| import | yes |
| source | Sherbrooke Adresses.csv Dataset |
| source:url | https://donneesouvertes-sherbrooke.opendata.arcgis.com/ |
| source:date | 2025-05-09 |
| import:page | https://wiki.openstreetmap.org/wiki/Importation_des_adresses_de_la_Ville_de_Sherbrooke |
| source:license | CC-BY-4.0 |
Data Transformation and Potential Issues
Address tags (addr:housenumber, addr:street) are added to OSM buildings if, and only if, there is no conflict with any other address tags. In some cases, address nodes will be created to integrated them manually on Osm features via JOSM.
Here is a list of all expected data integration cases, along with potential conflicts/issues, the number of occurrences detected (...), some explanations for each case, and the steps taken to resolve the issues or integrate the data into Osm.
Imported addresses internal issues
- Duplicate address records in the same location (1983), mostly condos. Action: keep only one address occurrence per location.
- Duplicate address records at different locations (2996), mainly farms, housing estates, or government/commercial complexes. Action: To be determined.
- Street names do not match some Osm addr:streetname (24/1888 distinct Osm street names), mostly Osm letter case problems. Action: adjust street names to the street signs.
Imported addresses are present on OSM addr:Interpolation ways
- Both sides of an Osm addr:interpolation way match imported addresses (7995 ways), Action: Remove the addr:interpolation way and both address nodes after import.
- Only one side of an Osm addr:interpolation way matches imported addresses (34 ways), mostly because one side is outside city limits. Action: Edit addr:interpolation way and its address nodes after import.
- Osm addr:interpolation way does not match imported addresses (0). No case detected.
Imported addresses are present on other OSM features
- Imported address location matches Osm feature location (1440). Action: no import needed; job done!
- Imported address location does not match Osm feature (1429), mainly shop and amenity nodes. Action: Confirm Osm feature location when distance >25m. Otherwise, no import needed; job done!
Imported addresses integration to Osm buildings
- Imported addresses touch or are within an Osm building not in above cases (64099), Action: add addr:housenumber and addr:street tags to the building.
- Imported addresses are less than 50m away of an Osm building not tagged yet (2300). Action: Check Osm building location then either move/add the building or add the addr:street tags to the building.
- Imported address is at least 50m away from an Osm building (1356). Action: Check Osm building location then either move/add the building or add the addr:street tags to the building.
Data Transformation Results
Automated edits will be sent upon request as a change file (.osc), one file per iteration.
Data Merge Workflow
Workflow
Setup a PostgreSQL database and assess the data for potential integration issues
- Install PostGIS for GIS operations and build required tables using Osmosis (pgsnapshot).
- Load the Addresses.csv file into the PostgreSQL database.
- Load the StreetSegment.csv file into the PostgreSQL database.
- Download Osm data using Overpass API and load them into the PostgreSQL database using Osmosis.
- Check for all potential data integration issues (results are shown in previous section).
Iterations over address integration cases
- Download Osm data using Overpass API and save it as an "initial" .osm file.
- Reset PostgreSQL database tables then load the "initial" osm file into the PostgreSQL database using Osmosis.
- Solve the simplest of the remaining data transformation issues listed above. Either add the address tags to an existing feature or create an address node.
- Extract Osm data from the PostgreSQL database using Osmosis and save it as a "resulting" .osm file.
- Create a changeset (.osc) by comparing the "initial" and "resulting" .osm files with Osmosis.
- Open the changeset with JOSM, update the data, complete and validate the address integration with the "Validator".
- Upload the changeset to OSM database with requested changeset tags.
note: Each iteration aims to upload addresses for which all above issues are resolved (automatically or manually), from the simplest to the most complex cases. Once an iteration is completed, the next one starts by creating a new “initial” .osm file (download).
Data Merge History
Iteration 00: Add address tags to buildings W/R (Trial).
2025-06-15 - Each imported address intersects with a single OSM building; No other imported address intersects the same building; Address does not exist in OSM ; Action: Add address tags to the building (W/R).
Changesets:167664316.
Iteration 01: Add address tags to buildings W/R.
2025-06-20 - Each imported address intersects with a single OSM building; No other addresses intersect the same building; Address does not exist in OSM ; Action: Add address tags to the building (W/R).
Changesets: 167884613,167884634,167884654, 167884680, 171654705.
Iteration 02: Add missing OSM features using imported addresses.
2025-07-03 - Imported addresses are disjoint from OSM buildings; Action: Update relevant buildings or other OSM features if possible; manually import the addresses if they are not associated with a building.
Changesets:168455657, 168460780, 168464237, 168481193, 168613605, 168619229, 168757239, 168757253.
Iteration 03: Add address tags to a building complex.
2025-07-03 - Imported address is duplicated over multiple neighboring buildings. No other imported address intersects the same buildings; Address does not exist in OSM ; Action: Create a multipolygon with concerned buildings or add address tags to a surrounding feature (W/R).
Changesets:168794601, 168809172, 171704141, 171704879.
Iteration 04: Add address tags to buildings W/R within a building complex.
2025-09-09 - Imported address intersects with one or a few OSM buildings. No other imported address intersects the same buildings; The address exists on an OSM feature surrounding the buildings. It seems appropriate to tag the buildings anyway; Action: Add address tags to the buildings (W/R)
Changesets: 171705517
Iteration 05: Add address tags to buildings W/R containing nodes with address tags.
2025-09-09 - Each imported address intersects with a single OSM building; No other imported addresses intersect the same building; One or more nodes with the same address tags lies within the building; Action: Add address tags to the buildings (W/R); Remove nodes when they contain only address tags;
Changesets: 171706505
Iteration 06: Add address nodes in buildings that have multiple addresses.
2025-09-19 - More than one imported address intersects with the same building; Address tags may exist on OSM building W/R; Action: Add address nodes in the building, at a random location, sorted by addresses; Remove address tags from the building W/R, if any;
Changesets: 172133129, 172181336
Iteration 07: Add or manually edit the remaining cases.
2025-09-21 - Imported addresses are sometimes duplicated for neighboring buildings. Action: Manually add or edit about 500 remaining addresses;
Changesets: 172256307
Iteration 08: Delete address interpolation nodes and ways.
2025-09-21 - Delete all address interpolation nodes and ways since all addresses in Sherbrooke have been uploaded;
Changesets: 172261126, 172261224,172261532
QA
Questions and answers are handled on the Canadian Osm forum. Topics will be summarized in the discussion page.
Discussion
The post to the community forum was sent on 2025-06-07 and can be found here