From OpenStreetMap Wiki
(Redirected from User:Ppawel/OSMonitor)
Jump to: navigation, search

Poland (administrative, major roads, regional roads) / Serbia (major roads, regional roads) / Czech Republic (major roads)


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.

Road report


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.

Road component

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.

End node

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.


Report messages

Message Cause Description
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:

  • Fix the road if it has too many components - e.g. close any gaps by adding ways to the road relation or marking them with correct ref=*.
  • Or if the road does not need to be fixed, and OSMonitor has it wrong, set the correct number of components in the road relation osmonitor:road_components tag to let OSMonitor know what is the correct number. See also Tags section below.
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:

  • Check on the map if the road has proper end nodes for beginning and end.
  • Use the Failed paths feature to see where OSMonitor got stuck and make sure that there is a path between end nodes.
no relation

A relation cannot be found for the road.

OSMonitor uses the ref=* tag to find a relation for a road. Make sure that the road relation has proper ref=* value.

length difference is too large (X km)

Road length differs significantly from the reference length.

  • Check if the reference length is correct - OSMonitor uses road relation's distance=* tag to get reference length.
  • Check if end nodes are correct - length reported by OSMonitor is length between two most distant end nodes of the road.
  • Check if the road route is correct.
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:

  • DW102 in Poland is a reference number of a regional road (DW) and for regional roads network=* value should be pl:regional.
  • A4 in Poland is a reference number of a motorway (A) and for motorways network=* value should be pl:motorways.
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

Current reports

List of pages that the bot currently updates:

Development and other stuff