JOSM/Plugins/Validator

From OpenStreetMap

Jump to: navigation, search
Validator plugin in action, showing various problems
Validator plugin in action, showing various problems

Validator is a plugin for JOSM that checks and fixes invalid data.

Contents

Installation

  • In JOSM, go to Edit menu -> Preferences -> Plugins tab
  • If necessary click 'Download list' to get the latest plugins *
  • Tick to enable the 'Validator' plugin
  • Restart JOSM.

(*) If the automatic plugin listing/installing system is not working for you, you can put the jar in place as follows:

The file should be named "validator.jar" (IE7 may rename it to "validator.zip" or other name, just rename it back to "validator.jar").
  • Install the jar file in the JOSM preferences directory ("%APPDATA%/JOSM/plugins" in windows, "~/.josm/plugins/" in Unix/MacOS.)
  • Start JOSM, open the preferences settings, and activate the plugin in the plugins tab. Restart JOSM.

Usage

  • Click on the new tick icon in the vertical toolbar to show the validator panel on the right.
  • Select the data you want to validate (or deselect to validate everything)
  • Click on the "Validate" button at the bottom of the validator panel

This will check the data and display all errors, categorized as "Errors", "Warnings", and "Other", depending on the severity of the error.

While some of the errors must be manually fixed, most of them can be automatically fixed. Just select the error or errors and click the "Fix" button to automatically fix them. You can select multiple errors, and all of them will be fixed.

Other usage tips:

  • In preference settings, you can activate only the tests you need. By default, all tests are active.
  • In preference settings, in the toolbar panel, you can include a validation icon in the horizontal toolbar at the top of the window (does the same as the 'Validate' button on the right hand panel)
  • The screenshot shows the validator panel 'undocked', in a separate window. Do this with a the little pin icon if you need more space to see the errors tree.


Validations

These are the validations performed by the plugin:

ValidationDescriptionFix
Duplicated nodesChecks that there are no nodes in the very same locationMerge the nodes into only one, adding the properties from all nodes to the merged one
Check property keysChecks misspelled property keys. See the User:JLS/speller page for information about misspelled property keysReplace wrong key with right one
Check property valuesChecks misspelled property values. Uses the annotation presets file for checkingNONE
Check for FIXMESChecks for any property with the word "FIXME" insideNONE
Empty propertiesChecks for properties with empty valuesRemove the empty properties
Untagged nodesChecks for untagged nodes that are not part of any segmentDelete the nodes
Untagged waysChecks for untagged waysNONE
Crossing roadsChecks for ways (with highway/railway/waterway tags) that crosses in same layer with no crossing nodeNONE
Unordered waysChecks that all segments in a way are properly orderedReorder the way
Similar named waysChecks for ways with very similar names, possibly a typoNONE
Unclosed waysChecks that way types, which should be closed really are closedNONE

Wish list

  • Report restaurants, cafes, fast food without a name
  • highway=motorway and nat_ref not set.
  • Report if way had name tag, but no highway tag
  • Report a level crossing of a highway and a railway with a common node, fix by adding railway=level_crossing to the node. Report all nodes with railway=level_crossing with ways tagged in a way where no level crossing is possible (different layer, tunnel, bridge tags).
  • Report layer=+1 etc., an often seen typo; report unknown layer, tunnel, and bridge values.
  • Detect relations without type (error). Robx 19:31, 10 March 2008 (UTC)
  • Check for combinations of tags that are wrong or may lead to undesired results. Examples: natural=water and waterway=river, highway=* and waterway=*, highway=* and natural=* etc. Probably needs some tables with combinations to report and their severity. Bomm 18:08, 30 June 2008 (UTC)
All of the above can be done by new TagChecker capability.


  • Report Shops, Car Parks which are not connected by a highway
  • detect when highway=motorway_link ways don't have a terminating node on either another motorway_link or a motorway. The fix would be to convert them to highway=primary_link or whatever is appropriate.
  • It would be nice to automatically fix overlapping ways.
  • Detect when highway=motorway ways intersect with non-motorway_link ways. They should not generally have intersections. The same goes for two intersecting motorways. They should not share nodes unless that node is at the terminus of the way and the two ways share a name. Even at the end of interstates in the US, if the ending interstate runs into another interstate, there is a motorway_link connecting them, _not_ an actual intersection of the two highway=motorway's.
  • Detect sharp angles on motorway and motorway_link intersections. The direction on these matter.
    • Detect and fix missing "oneway" tags on motorways and motorway_links.
  • In preferences, allow to turn off testing for "Unnamed ways" (for most ways I am unable to figure out the name anyway, so I'd like to turn this test off)
  • Detect nodes of ways that are extremely close (like <5m) to an other way, but not connected. -- Fröstel 23:31, 23 October 2007 (BST)
  • Validator falsely reports "unknown property values" for nodes with a highway key, which value is: gate, traffic_signals, stop, incline, mini_roundabout. And I guess there are some more that I didn't came across. Toralf 10:58, 20 January 2008 (UTC)
  • For nodes with same name, report only if they are of "different type" (or add option for this). It is common for railway station (railway=station or railway=halt) to have same name as town in which it resides (place=town, place=city, place=village .. ), also bus and tram station close to each other (where you can change from bus to tram) often have same names too. Two same-named railway stations or alike are usually a mistake, though ... :) --Bilbo 18:09, 19 February 2008 (UTC)
  • Detect multipolygon relations with less than two members (fix: delete relation), or with member nodes (fix: remove nodes from relation). Robx 19:31, 10 March 2008 (UTC)
  • Detect multipolygon relations with unclosed ways. Robx 19:31, 10 March 2008 (UTC)
  • Detect multipolygon relations with no or more than one way of role=outer.. Robx 08:58, 12 March 2008 (UTC)
  • Dont complain about unnamed way on highway=* junction=roundabout Flohoff 10:09, 2 July 2008 (UTC)
  • I'd like to have an Ignore-Tagg for OSM, so I can tagg things I don't want to have tested, for example ways with similar name, that are named right.

See also

Personal tools
recent changes