WORK IN PROGRESS
Please note that documentation and the software itself is in experimental phase and documentation is not always up-to-date.
OSMonitor (short for OpenStreetMap Monitor) is a piece of software that analyzes OSM data and produces reports based on that data. It functions as a bot, meaning that it performs actions automatically.
The idea is to provide a tool that gives insight into the ocean of data that is OSM database. The criteria for reports are as follows:
- Report data has to be semantically relevant - the priority for OSMonitor is not e.g. finding duplicated nodes/ways or wrong tag key/value pairs; there are already good tools for that.
- Building on the first criteria - report data has to be connected with real world data (also referred to as reference data); for example: a list of roads in a country taken from an official (e.g. government-published) source would be a good reference data to compare OSM data to.
- Report data has to be up-to-date - otherwise the tool loses a lot of value; this is partly for motivational reasons - there is nothing like correcting a road in OSM and then seeing it as "green" on the report ;-) Also with up-to-date reports it is easy to measure progress and set realistic goals.
This section describes some basic concepts and terminology used in OSMonitor.
OSMonitor brings together two worlds with the road concept:
- On one hand, a road is something typically specified by government regulations: a road has a reference number and an official route, sometimes together with markings on the side of the road.
- On the other hand, a road in OpenStreetMap terms is (at least in the OSMonitor context) a collection of ways with a proper ref=*. Those ways can also be grouped in a relation.
A road is composed of road components. A road component is a set of ways that are connected together (similar term from graph theory: connected components). Most of the roads have just one component. However, there are some roads that have more than one component: consider a road that is in construction - parts of it have been built in different areas so ways from two constructed components are not connected. Example of such a road: S1 road in Poland.
OSMonitor breaks down a road into components to check if it has the correct number of components. Mapping mistakes such as missing or mislabeled ways can easily be detected - there are "holes" in the road which means there are more components than intended.
An end node is a node at which a road begins or ends. OSMonitor detects end nodes for a road automatically and uses this information to calculate road length.
|road is disconnected (X)||
The road has an incorrect number of road components.
Check what is the correct number of components for the road and either:
|road is not navigable||
OSMonitor cannot find a roundtrip for the road.
To determine if a road is navigable, OSMonitor tries to navigate the road from beginning to end and back. If the report says that a road is not navigable, here is what you can do:
A relation cannot be found for the road.
|length difference is too large (X km)||
Road length differs significantly from the reference length.
|relation has wrong network=* value (is X, should be Y)||
network=* value is incorrect for the type of the road.
Different road types (networks) are tagged using network=* tag in OSM. OSMonitor matches these values with preconfigured road type, for example:
|no input length||
Road length verification is not possible - no input/reference length given.
Add reference (official) road length to road relation's distance=* tag.
OSMonitor can use additional information for reporting if certain tags are present on road's relation:
- osmonitor:road_components - for roads that are not connected as one component, this tag can contain a number of components that OSMonitor will use as the correct number; by default (if this tag is not present), OSMonitor assumes that the road should have 1 component
- distance=* - if it is present on the relation then OSMonitor will use its value (always in kilometers, unit=* is not supported for now) to verify road length; if osmonitor:road_components has value greater than 1, then distance value will be applied to a sum of distance of all components
- osmonitor:component_distances - if osmonitor:road_components has value greater than 1, this tag should contain distances of all components separated by ";", for example: value "10;130" means that one component has distance of 10 kilometers and another has distance of 130 kilometers
- osmonitor:noreport - if this tag is present (with any value), then OSMonitor will ignore the road and not generate any report for that road
- note - user notes about the information (like source of the data or additional comments about the road) - will be shown on the report
List of pages that the bot currently updates:
Development and other stuff
- Source code: https://github.com/ppawel/osmonitor
- Issue tracking (bugs, feature requests): https://github.com/ppawel/osmonitor/issues
- Bot wiki account: https://wiki.openstreetmap.org/wiki/User:Osmonitor
- If you are interested in running your own instance of the bot, contact me (User:Ppawel)