WayCheck

From OpenStreetMap Wiki
(Redirected from Waycheck)
Jump to navigation Jump to search

WayCheck (now checkconn, checkcross and checktouch) was developed by Gary68 as a Quality Assurance tool to improve the quality of OSM data particularly for routing applications. It is a program which takes a definition, an OSM and an output file and checks the data in different modes. It checks for

  • connections (or better it checks for ways that are not connected at start or end)
  • crossings (where two ways on the same layer intersect without a common node)

Output is an HTML file which can be published or acted upon. In the file there are several useful links regarding the potential problem.

For each run you have to provide a definition file for the checks to be done. While running it shows status information. When ready the output file is provided at the given location.

What to do with the result

It is a good idea to follow the links to OSM and Openstreetbugs. Eventually open the data layer and look what the area looks like. It might be necessary to look at the data in JOSM to locate the "problem"! Now either correct the data if you are able or post the problem in Openstreetbugs using the given link.

False positives

Please beware of false positives! Each result line has to be evaluated carefully! A result might have several reasons:

  • There is a problem
  • There is a problem because data was truncated by excerpt area script
  • There is a problem because definition file maybe misses something
  • There was a problem at the time the data was extracted but meanwhile somebody else corrected the problem. See history!
  • I noticed that sometimes there are errors in the OSM file when comparing with the online data. So i.e. there is a missing node in a way leading to unconnected status.

Standard Checks

Because of the immense workload these checks produce data cannot be provided on a regular basis. But if needed Gary can provide reports upon request.
You can find several reports done on the German WayCheck page

Highway C1

This check takes the motorways and trunks and checks for crossings/intersections with other major roads (primary/secondary/tertiary).

Definition file

<XML>
  <k="mode" v="X">
  <k="dist" v="10">
  <k="check" v="highway:motorway">
  <k="check" v="highway:motorway_link">
  <k="check" v="highway:trunk">
  <k="check" v="highway:trunk_link">
  <k="against" v="highway:primary">
  <k="against" v="highway:primary_link">
  <k="against" v="highway:secondary">
  <k="against" v="highway:tertiary">
  <k="against" v="junction:roundabout">
</XML>


Highway ConnectionsC11

This check takes the motorways and trunks and their links and checks for connections with other roads. Attention false positives at the border of OSM files!!!


Definition file

<XML>
  <k="mode" v="AP">
  <k="dist" v="50">
  <k="check" v="highway:motorway">
  <k="check" v="highway:motorway_link">
  <k="check" v="highway:trunk">
  <k="check" v="highway:trunk_link">
  <k="against" v="highway:primary">
  <k="against" v="highway:primary_link">
  <k="against" v="highway:secondary">
  <k="against" v="highway:tertiary">
  <k="against" v="highway:service">
  <k="against" v="junction:roundabout">
  <k="against" v="highway:residential">
  <k="against" v="highway:unclassified">
  <k="against" v="amenity:parking">
</XML>

Highway touch check C13

This check looks for ways (motorways/trunks) which are nearly touched by another way and so maybe there is a connection missing. Definition file like C1.

Cycleway Check C2

This check looks for cycleways with starts and ends that are not connected with appropriate other ways.

Definition file

<XML>
  <k="mode" v="A">
  <k="dist" v="10">
  <k="check" v="highway:cycleway">
  <k="against" v="highway:cycleway">
  <k="against" v="highway:primary">
  <k="against" v="highway:primary_link">
  <k="against" v="highway:secondary">
  <k="against" v="highway:tertiary">
  <k="against" v="highway:unclassified">
  <k="against" v="highway:road">
  <k="against" v="highway:residential">
  <k="against" v="highway:living_street">
  <k="against" v="highway:service">
  <k="against" v="highway:track">
  <k="against" v="highway:path">
  <k="against" v="highway:footway">
  <k="against" v="highway:byway">
  <k="against" v="junction:roundabout">
  <k="against" v="route:ferry">
  <k="against" v="amenity:parking">
</XML>

Motorway check

Oneway problems on motorways: MotorwayCheck

Residential Check C3

This check only takes residentials and checks for crossings.

Definition file

<XML>
  <k="mode" v="X">
  <k="dist" v="2">
  <k="check" v="highway:residential">
  <k="against" v="highway:residential">
</XML>

Residential touch check C33

This check looks for ways (residentials) which are nearly touched by another residential and so maybe there is a connection missing. Definition file like C3.

Track Check C4

This check takes all tracks and checks for crossings with other appropriate ways.

Definition file

<XML>
  <k="mode" v="X">
  <k="dist" v="3">
  <k="check" v="highway:track">
  <k="against" v="highway:cycleway">
  <k="against" v="highway:residential">
  <k="against" v="highway:path">
  <k="against" v="highway:footway">
  <k="against" v="highway:byway">
  <k="against" v="amenity:parking">
</XML>

Primary/Secondary/Tertiary Check Crossing C5

This check takes primary, secondary and tertiary roads and checks against other roads for crossings.


Definition file

<XML>
  <k="mode" v="X">
  <k="dist" v="10">
  <k="check" v="highway:primary">
  <k="check" v="highway:primary_link">
  <k="check" v="highway:secondary">
  <k="check" v="highway:tertiary">
  <k="against" v="highway:motorway">
  <k="against" v="highway:motorway_link">
  <k="against" v="highway:trunk">
  <k="against" v="highway:trunk_link">
  <k="against" v="highway:unclassified">
  <k="against" v="highway:road">
  <k="against" v="highway:residential">
  <k="against" v="junction:roundabout">
  <k="against" v="amenity:parking">
</XML>

Primary/Secondary Connection Check C51

This check takes primary and secondary roads and checks against other roads for connections at beginning and end. CHANGE: checkways now without tertiary!

Definition file

<XML>
  <k="mode" v="AP">
  <k="dist" v="10">
  <k="check" v="highway:primary">
  <k="check" v="highway:primary_link">
  <k="check" v="highway:secondary">
  <k="against" v="highway:tertiary">
  <k="against" v="highway:motorway">
  <k="against" v="highway:motorway_link">
  <k="against" v="highway:trunk">
  <k="against" v="highway:trunk_link">
  <k="against" v="highway:unclassified">
  <k="against" v="highway:road">
  <k="against" v="highway:service">
  <k="against" v="highway:residential">
  <k="against" v="junction:roundabout">
  <k="against" v="route:ferry">
  <k="against" v="amenity:parking">
</XML>

Primary/Secondary touch check C53

This check looks for ways (primary/secondary) which are nearly touched by other ways and so maybe there is a connection missing. Definition file like C5.

Waterway Check C6

This one checks waterways against roads for crossings.

Definition file

<XML>
  <k="mode" v="X">
  <k="dist" v="3">
  <k="check" v="waterway:river">
  <k="check" v="waterway:riverbank">
  <k="check" v="waterway:canal">
  <k="check" v="waterway:stream">
  <k="check" v="waterway:drain">
  <k="against" v="highway:motorway">
  <k="against" v="highway:motorway_link">
  <k="against" v="highway:trunk">
  <k="against" v="highway:trunk_link">
  <k="against" v="highway:primary">
  <k="against" v="highway:primary_link">
  <k="against" v="highway:secondary">
  <k="against" v="highway:tertiary">
  <k="against" v="highway:unclassified">
  <k="against" v="highway:road">
  <k="against" v="highway:residential">
  <k="against" v="junction:roundabout">
</XML>

Way dupe check C60

This one checks for duplicate ways.

FerryCheck C61

This check verifies the connection of ferries and streets or piers. This should improve the routing including ferries. One problem of wrong results could be, that the node is at the end of the data-file. The connecting node of route=ferry and highway=* should be next to coastline. The connection between route=ferry an man_made=pier should be at the position of the stop of the ferry.


Modes

There currently are three modes:

  • End check for ways with one open end
  • End check for two open ends
  • Crossing check (if two ways intersect on the same layer but don’t share a common node.

Output fields

Mode A/B

Heading Meaning
Way Way type of checked way
Name/Ref Name and Ref, if given
ID The ID of the way
Issues Found „problems“
Position Longitude and Latitude for orientation
Start Link to OSM, OSB and JOSM (local with remote plugin running) - begin of way
End Link to OSM, OSB and JOSM (local with remote plugin running)- end of way
History Link to history

Mode X

Heading Meaning
Line Line count
Way1 ID of first way with link to history
Way2 ID of second way with link to history
Type1 Type first way
Type2 Type second way
Name1 Name/Ref first way
Name2 Name/Ref second way
Seg1 Segment first way
Seg2 Segment second way
Pos Longitude and Latitude for orientation
Lay1 Layer way one
Lay2 Layer way two
Tun1 Tunnel value way 1, if given
Tun2 Tunnel value way 2, if given
Bri1 Bridge value 1st way, if given
Bri2 Bridge value 2nd way, if given
OSM Link to Openstreetmap
OSB Link to Openstreetbugs
Josm Link to JOSM (load and zoom) - JOSM has to be running and plugin "remote" must be installed

Source code

2nd generation code

Old versions

Wishes next program version

  • JOSM local link (done)
  • Maplint like display? Or show post code in table? (Ich kann es nicht als Layer darstellen. Es sind auch nicht alles Bugs. Man muss erst draufsehen! Ort mit angeben steht ja schon weiter oben. Das kommt irgendwann... Gary68w) - Mir ging es darum, primär die Fehler in meiner Gegend anzusehen, also im näheren Umkreis meiner Stadt. Hadhuey
  • on column headers, please add a description (on mouse over) of what the abbreviation means. --Simone 17:19, 12 September 2008 (UTC)