Importation des adresses de la Ville de Sherbrooke

From OpenStreetMap Wiki
Jump to navigation Jump to search

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 currently at the planning stage (2025-05-23) .

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

2025-06-15 - The imported data have no duplicates (address or location), do not yet exist in the database, and overlap with an Osm building. (On "Rue Annie" only as a trial).

Changesets:167664316.

Iteration 01

2025-06-20 - The imported data have no duplicates (address or location), do not yet exist in the database, and overlap with an Osm building.

Changesets: 167884613,167884634,167884654, 167884680.

Iteration 02

2025-07-03 - The imported data do not overlap with any OSM buildings. Updating buildings if required and manually importing the addresses.

Changesets:168455657, 168460780, 168464237, 168481193, 168613605, 168619229, 168757239, 168757253.

Iteration 03

2025-07-03 - The imported data duplicate the same address across multiple Osm buildings. Link the buildings with a multipolygon or add the address to the containing feature, when possible.

Changesets:168794601, 168809172.

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