Osm-conflation-engine
| osm-conflation-engine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Author: | Kylenz | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| License: | MIT License | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Platform: | Web | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Status: | Active | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Version: | 3.13.0 (2026-10-22) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Language: | multiple languages
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Website: | https://osm-nz.github.io/osm-conflation-engine | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Source code: | osm-nz/osm-conflation-engine GitHub | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Programming language: | TypeScript | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A framework for building automated Conflation-based import projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
osm-conflation-engine is a software project which helps you to create import projects that run automatically, and use partially-automated Conflation.
For example, it can be used to regularly compare and sync street addresses from a government dataset into OSM. For obvious reasons, there must be a human who reviews all the automated suggestions before they're actually uploaded to OSM.
To use the tool, go to the website: osm-nz.github.io/osm-conflation-engine
Background
There are several limitations with ordinary OpenStreetMap import projects:
- They are usually one-off projects, which rely on manual data processing, so the imported data becomes out of data very quickly.
- Each region's import projects need to create their own bespoke software or system to review changes before uploading them to OSM. This creates a lot of duplicate work.
- Splitting up the work of an import project between multiple people is very difficult, and there's a risk of missing certain areas.
"osm-conflation-engine" tries to fix all these problems. It allows you to create an OSM import project using very minimal code.
- Instead of a one-off import, you configure a regular scheduled synchronisation. This automatically compares every feature in your dataset with OSM, and flags features which are missing or have the wrong tags.
- Every import project uses the same unified website to perform the importing, as well as same shared integrations with tools like MapRoulette and RapiD.
It handles all the complicated parts of conflation for you:
- Setting up a system that runs regularly
- Publish the results from the comparison
- Convert the conflation results into a format that can be loaded into OSM editors or MapRoulette.
- Implementing the matching between OSM features and rows in the source dataset
System Architecture
History
- This project started in 2021, but at the time it was only usable for LINZ/Address Import and other import projects from New Zealand.
- In 2026, the code was refactored into a generic system that could be re-used for any import project in any country.
Scalability
Despite being written mostly in TypeScript with minimal Golang, this project has not hit a performance bottleneck (yet).
The largest import project using this tool is the LINZ/Address Import, which has 2.2 million rows, and covers a land area larger than the UK. For that project, the conflation takes about 3 minutes to run.
Tags
This tool does not use any OSM tags itself. That is all defined by the import projects, this tool only provides the infrastructure and website.
Prerequisites
Imports that want to use "osm-conflation-engine" need to meet all these requirements, in addition to Import Guidelines:
- Your import needs to use a
ref:*=*tag on every OSM feature, such asref:linz:place_id=*. This is non-negotiable, otherwise it would be extremely slow, unreliable, and computationally expensive to perform automated conflation.- if you're importing data that doesn't have distinct features, or doesn't have a clear ID for each feature (like rivers or buildings), then this tool is not for you, sorry.
- You need some way of downloading the source data programatically with a script.
- You need some basic knowledge of TypeScript and how to use GitHub or another code-hosting platform.
Legacy systems (Public Transport / GTFS)
osm-conflation-engine is a combination of 7 different import projects from New Zealand, which were later unified into a single system. Therefore, some older parts of the system are not fully integrated with the new website.
For example, Public Transport (GTFS) conflation operates quite differently, and is described on a separate wiki page: Osm-conflation-engine/GTFS.
Screenshots
-
The page to select an import project
-
The page to select which task/area you want to review
-
The page to select and review specific features
-
The page shows metrics and statistics about the import
Usage
To create an import project using this tool, you only need to define three things:
- A script to download the data from your source data
- A script which is given 1 OSM feature and 1 row from your source data. The matching is performed automaticaly, so your script just needs to check if the OSM tags are correct for the provided pair.
- A JSON configuration file. For example, you can control how matching works, whether geometry should be compared, and how to download the OSM data (Overpass, Postpass, Planet file extracts, etc.)
For a very simple example project, see osm-nz/doc-accommodation-import GitHub.
See the README on GitHub for more details.
Discussion with the community
- 2021: discussion on the talk-nz mailing list
- 2021: discussion on the imports mailing list
- 2023(-ongoing): many discussions on the #oceania channel on the OSM Discord
- 2026: announcement on the forum that this tool is now available for other countries outside Oceania