Swiss GWR Address Data Import Guide

From OpenStreetMap Wiki
Jump to navigation Jump to search

This guide provides a step-by-step process for importing address data from the Federal Register of Buildings and Dwellings into OpenStreetMap (OSM) using JOSM. The register is known in Switzerland's national languages as:

  • German: Eidg. Gebäude- und Wohnungsregister (GWR)
  • French: Registre fédéral des bâtiments et des logements (RegBL)
  • Italian: Registro federale degli edifici e delle abitazioni (REA)

Important Notes

  • Only perform automated edits if you fully understand the implications!
  • Adherence to OSM's Import Guidelines is mandatory.
  • Always review data manually to prevent importing errors.
  • When in doubt, consult the relevant OSM Wiki pages or the local mapping community.
  • Be aware that GWR data may contain inaccuracies, duplications, missing buildings or improper placements.
  • Future updates should align with the same processes for consistency.
  • Report wrong addresses to the Federal Statistical Office.

Goals

The primary goal is to improve the accuracy and completeness of Swiss address data on OSM by:

  • Adding addresses from the Swiss GWR database.
  • Improving maintainability by using nodes instead of ways for address data.
  • Ensuring accurate placement of address points at building entrances.

Preparation/Import Data

  1. Download prepared address data for a municipality from qa.poole.ch/addresses/ch/ by selecting the full dataset O.
  2. Open JOSM and open the downloaded BFSNUMBER.osm file.
  3. Download (🡇) the corresponding OSM map data as a new layer using either:
    • Search for the municipality using Areas around places
    • Use Slippy map or advanced techniques for larger areas.
  4. Activate the downloaded OSM Map layer.
  5. Add aerial imagery via Imagery > swisstopo SWISSIMAGE.
  6. Install plugins utilsplugin2 and Conflation (Edit > Preferences > Plugins).

Data Cleanup

To ensure the imported GWR address data integrates seamlessly with existing OpenStreetMap (OSM) data, redundant or incorrect address tags must be removed. The GWR assigns addresses to building entrances[1], so nodes at entrance locations are preferred over tagging ways, buildings, or entrance nodes with address data. This approach enhances maintainability and supports future corrections or imports without creating conflicts or ambiguity.

Why Remove Existing Address Data?

  • Prevent Duplication: Redundant tags on buildings, entrances, and ways lead to overlapping information that can confuse users and tools interpreting the map.
  • Ensure Accuracy: GWR address data provides precise entrance points. Tagging buildings or ways with addresses creates less precise, harder-to-maintain data.
  • Facilitate Future Updates: Placing addresses on nodes, rather than ways or building outlines, ensures future imports or adjustments can easily replace or update data without breaking consistency.
  • Preserve Conflation Accuracy: Address data from ways cannot be automatically moved to entrances or aligned with GWR-provided positions. Removing these tags prevents errors and ensures that the imported data matches real-world building entrances.
  • Restoration During Conflation: All address data removed during this cleanup is added back in the conflation process. This ensures that no addresses are lost, and the final dataset includes precise and up-to-date address information at the correct entrance nodes.


For ways
The downloaded OSM Map layer needs to be always active for the data cleanup.
  1. Open the Search Tool (Ctrl+F).
  2. Ensure that you only select and remove data for one municipality: Select type:relation "swisstopo:BFS_NUMMER"=XXXX (Replace XXXX with your municipality's BFS number).
  3. Press Alt+Shift+I to select All Inside. Plugin utilsplugin2 is needed for this step.
  4. Open the Search Tool (Ctrl+F) and use Find in Selection with the following query: type:way ("addr:street"=* OR "addr:housenumber"=*)
  5. Select the elements like apartments, buildings, house, House number ..., industrial, residential and click Select.
  6. Select the following tags:
    • addr:city
    • addr:country
    • addr:housenumber
    • addr:postcode
    • addr:street
    • addr:suburb
  7. Delete the selected tags.
For entrances

The house number should be added at another node in the building or at the building itself, not the entrance. Source: Tag:entrance=yes

  1. Open the Search Tool (Ctrl+F).
  2. Select type:relation "swisstopo:BFS_NUMMER"=XXXX.
  3. Press Alt+Shift+I to select All Inside.
  4. Open the Search Tool (Ctrl+F) and use Find in Selection with the following query: entrance=*.
  5. Delete the following tags:
    • addr:city
    • addr:country
    • addr:housenumber
    • addr:postcode
    • addr:street
    • addr:suburb
For Nodes on Building Edges
  1. Open the Search Tool (Ctrl+F).
  2. Select type:relation "swisstopo:BFS_NUMMER"=XXXX.
  3. Press Alt+Shift+I to select All Inside.
  4. Open the Search Tool (Ctrl+F) and use Find in Selection with the following query: type:node "addr:housenumber"=* child building
  5. Delete the following tags:
    • addr:city
    • addr:country
    • addr:housenumber
    • addr:postcode
    • addr:street
    • addr:suburb

Conflation Process

The conflation process involves relocating address nodes to the correct positions from GWR and importing missing addresses.

Configuration
  1. Install the conflation Plugin: In JOSM, go toF12 > Pluginsand install the Conflation plugin.
  2. Open the Conflation settings (Configure).
  3. Set Up Reference and Subject Layers:
    • Activate the BFSNUMBER.osm Layer, select all nodes (Ctrl+A), and click Reference: Freeze.
    • Activate the OSM map layer and use Ctrl+F to select type:relation "swisstopo:BFS_NUMMER"=XXXX.
    • Press Alt+Shift+I to select All Inside.
    • Open the Search Tool (Ctrl+F) and use Find in Selection with the following query:type:node "addr:housenumber"=* for Subject: Freeze.
  4. Configure the matching parameters:
    • Method: One to One
    • Distance: Standard < 200
    • Tags: addr:housenumber
  5. Generate matches.
Review conflation results
Conflation Results: The tab Matches categorizes entries under Conflicts! and No conflicts!.

information sign

Every conflation result must be reviewed individually, regardless of automatic matches.

Recommended workflow

  1. Sort the results first by distance, then by conflicts.
  2. Review each match individually.
  3. Use guidelines below while maintaining manual verification.

1. Matches Without Conflicts

Subject Distance Action Reason
Only address tags present ("House number ...")Fixaddresses.png < 10 cm Remove The button Remove just removes the match from the conflation list. Such a minor change in location is not recommended. The location could be already from an earlier import.
> 10 cm Conflate This usually just moves the address node to the entrance.
Other (POI etc.) Import the address node individually from the POI or Conflate, provided there is a single POI at this address and it is centered around the entrance.
  1. Activate the XXXX.osm Layer.
  2. Select the address node and add it to the Openstreetmap layer (Ctrl+Shift+M).
  3. Leave the Subject node (POI) as is.

2. Matches With Conflicts

Score Action Reason
> 0.7 Conflate Usually corrects incorrect values
< 0.7 Fix Manual edits are essential for lower scores
Conflation Results: The Reference only tab displays entries that are most likely to be ignored. This screenshot was taken after clicking 'Conflate' to import valid addresses. You can either ignore these entries or click 'Remove' to clear the conflation list, ensuring none of these entries are imported.

3. Reference-Only Cases

Pattern Action Reason
House number at Avoid import/

check (tooltip) thoroughly

Usually no values present
House number at Street Usually only addr:street present
House number 900 Buildings placed in forests or misplaced/wrong address
House number aa Carports, parking garages
House number a Consider conflating after checking tooltip
House number 1xx
House number Typically addr:place without a number or street
House number 1 Conflate and verify manually Typically this is an address without addr:street but with addr:place.
House number 1 at Street If this is not the first import, avoid automatic bulk conflation.

The initial import likely excluded some addresses from the GWR due to manual checks and verification steps.

Handling Validation Warnings

Validation Results: At a minimum, fix the categories: Duplicate house numbers, addr:housenumber without number, Nodes at same position, Other duplicated nodes, and suspicious tag combination. Review all other warnings.

The JOSM data validator checks for common errors made by users and editor programs. Click on upload (🡅) to initiate the validator checks and close the Popup. Go through the validation results pane.

Duplicate house numbers
Manually review and delete duplicates (Duplicate house numbers).

Zoom to problem by pressing 6.

Duplicates may be present due to:

  • New construction projects
  • Basement/Underground entrances
  • Underground facilities (civil protection shelter)
  • Multiple buildings sharing one housenumber
addr:housenumber without number
Remove keys without values: Search for "addr:housenumber"= and delete the keys.
Nodes at same position and

Other duplicated nodes

Review duplicated nodes and try to fix the root cause.
Suspicious tag combination
addr:street together with addr:place: Removing addr:street from places usually is the correct solution.

Upload

  1. Review all warnings
  2. Add descriptive comment:
    • Example: Add missing addresses for ...
  3. Specify data source:
    • Example: GWR data from 2024-10-29