Opened 8 years ago

Last modified 13 months ago

#604 new enhancement/feature request

Validation/correction of map data during conversion

Reported by: mvglasow (2) Owned by: KaZeR
Priority: minor Milestone: version 0.5.2
Component: tools Version: git master
Severity: Keywords: osm, map, tags
Cc:

Description

This ticket is a result of splitting #567 into one ticket per issue.

Some time ago I passed through the area at http://www.openstreetmap.org/?lat=45.83935&lon=9.03657&zoom=17&layers=B000FTF (errors in OSM data were fixed afterwards) on the highway, eastbound lane. Shortly before, I had set Navit (build 3134, WinCE) to a destination in Milan, just off the highway.

I was in a tailback in front of the border, thus moving slowly. As I passed the point just east of the border where a local road goes underneath the highway, Navit determined that my position was on that road, just in the middle between the two highway lanes, and instructed me to turn around if possible. Shortly after, Navit went into an undefined state: I got the Today screen of Windows CE, but the top bar kept showing the top portion of the Navit screen, and the PDA remained in that state.

A later analysis of OSM data revealed that neither the highway nor the local road had any layering information, thus making it look almost like a level crossing - except for the fact that the ways do not have any points in common.

(Note: the OSM data is now fixed.)

GPS augmentation (guessing which way I am likely to be on based on my previous positions) might have helped; this issue is discussed in ticket #603.

In the present case, the ambiguous OSM data presented a further problem: at a level crossing, all roads typically have identical tunnel/bridge/layer tagging (or lack thereof) but there is one point to which all ways connect; over-/underpasses are tagged with bridge/tunnel or a layer tag. To identify a spot as either one or the other would require some heuristics - for instance, if one of the roads is tagged as highway=motorway, then it is most likely not a level crossing as all roads reaching a motorway either begin or end there. (Except for the cases in which an access ramp and an exit ramp immediately following it are one single way, but these would be tagged as motorway_link and would thus be identifiable.)

As a conclusion of the above, it might be a good idea for conversion tools (osm2navit, planet extractor) to do some validation on the data and, where possible, fix obvious errors. In the case of the ambiguous crossing, a heuristic might have concluded that the section must be either an overpass or an underpass but not a level crossing, and re-tagged it accordingly in the output file. (It would only have eliminated the possibility of a level crossing, leaving the decision between overpass and underpass open, but I guess just assuming one of the two would not break that much. Or we could introduce a new point and tag it as something like "junction=no" to tell Navit just that there is no way to get from one road to the other.)

Afterthought: looking at some other tickets, some more room for validation/correction of data comes to mind: for instance, missing is_in or addr:* tags could be reconstructed (to an extent) by analyzing borders.

Hence, we might want to create a framework for such tasks which can then be fed a set of rules specifying what to fix and how.

Candidates for "what to fix" are:

  • invalid data (look at OSM validators such as KeepRight?, OSMInspector and the validation functions in JOSM for examples)
  • missing tags which Navit uses for navigation, especially for address search

The "how to fix" may be trickier. Operations may include:

  • Splitting a way
  • Adding/changing tags
  • Inserting new nodes

In addition, it may be needed to introduce tags internal to navit, used only by the Navit validator (such as the one saying "this is not a junction").

Change History (3)

comment:1 Changed 5 years ago by usul

  • Priority changed from major to minor

AFAIK Navit has a informal rule not to doing to much (properitary) magic on OSM tagging. What we can (maybe will) offer is a webbased report on bugs that our maptool reports during conversation and later on a osmbugs integration to let users report bugs to OSM (maybe with a prefiltering to avoid spamming a la mapdust).

So I will keep the bug open with a minor priority.

comment:2 Changed 5 years ago by usul

  • Keywords osm map tags added
  • Milestone set to version 0.5.1

I'm still not sure what this is about, but will schedule it for next hotfix anyway.

comment:3 Changed 13 months ago by http://wiki.navit-project.org/index.php/user:jkoan

  • Milestone changed from version 0.5.1 to version 0.5.2

This ticket was pushed back in order to bring 0.5.1 out soon.

Note: See TracTickets for help on using tickets.