Background
I use osm2po in an application that needs to calculate distances, times and path between locations.
In short, I take data from Geofabrik as input to osm2po to output a directed graph with OSM Nodes as the graph nodes, and OSM Ways as the graph edges.
Later, to calculate distance, time, and path between two locations, I use this graph to locale the nearest nodes, then use one of the osm2po router to build a route between those two nodes.
This is working fine most of the time.
And when a routing can not be done, it is usually because the data from OSM (particularly OSM ways) contains error or is absent.
More to the point
Through debugging a particular case, I located two nodes that cannot be routed from one to the other.
As you can see, the only way those two nodes can ever be routed together (using a car) is somehow exiting their local streets and going through this way.
After more debugging, I see that osm2po never use this way, I guess it does not see it as a valid segment.
My questions
- Looking at the OSM data, how can I know (understand) why this way is not valid for routing ?
- Related to my first question: how can I fix (submit modifications to) OSM to allow routing using this way ?
EDIT:
I forgot to say that if I try to route from one node to an other node that are part of this same way, the routing is obviously working fine.
Answer
Indeed, the default.config is very strict and to be honest it's too strict for my taste. I stumbled across a similar question weeks ago and modified the osm2po release notes for 5.1.0 to report this issue.
Your solution above is correct. But I think there are not so many more positive tags, It would be shorter to modify the deny-option instead to sth. like this:
wtr.deny.motor[_vehicle|car].no = car
No comments:
Post a Comment