Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route found on low zoom level and limited network #1038

Closed
emmexx opened this issue May 25, 2014 · 16 comments
Closed

No route found on low zoom level and limited network #1038

emmexx opened this issue May 25, 2014 · 16 comments

Comments

@emmexx
Copy link

emmexx commented May 25, 2014

I tried to configure an instance of an old osrm version for a test using a very limited number of ways (national cycle routes in an area approximately 100 km x 100 km. In the osm file there are no more than 2-300 ways)
I found out a very odd behaviour: at low and medium zoom levels I always get a "No route found" message. Routes are found only at zoom levels near the maximum.
At low zoom levels even if I put the marker within pixel from a way, no route is found.
Is that behaviour by design or is my setup beyond the purposes and limitations of the algo used by osrm?
Thank you
maxx

@emiltin
Copy link
Contributor

emiltin commented May 25, 2014

at low zoom, isolated islands are filtered away. try setting z=18, or see the wiki for more info.
if you filter anything but bike routes away, you might have problems with unconnected ways.

@emmexx
Copy link
Author

emmexx commented May 25, 2014

The problem is present even for same cycleway/route. I tried to use cycleways that I'm sure are connected.
maxx

@emiltin
Copy link
Contributor

emiltin commented May 25, 2014

maybe you're filtering away the way, even though you didn't intent to? btw, how did you filter on bike routes? osrm doesn't yet support parsing relations: #482.

@emmexx
Copy link
Author

emmexx commented May 26, 2014

I used overpass to download a limited set of data with the following query:
type=route and route=bicycle and network=ncn
I checked the osm file in josm and the routes are there.
The data is correct because at zoom 16, 17 and 18 (not sure of the numbers) everything works fine.
I temporarily enabled a test site so you can check it.
I included the ncn cycling route BI16 in the osm file :
http://www.openstreetmap.org/?mlat=45.0524&mlon=10.6828#map=15/45.0524/10.6828&layers=C
To test the routing goto http://www.milanobicimap.it/oldd/
You have to go by hand to a point 15 km SW of Mantova (Mantua). Mantova is about 120 km E-SE of Milan (where the map is centered).
If you zoom to sp56 (the way E-W north of river Po where the river has a 90 degrees right turn) you can test the odd behaviour.
You can start from the maximum zoom level: click on the way or around it and put the start and finish markers on the map. A route is found. You can drag the markers and the route is updated.
Zoom out one, two or three levels and everything works fine.
Zoom out another level and the "No rout found" behaviour starts, even if you put the markers on the way.
Thank you
Maxx

osrm1
osrm2

@emiltin
Copy link
Contributor

emiltin commented May 26, 2014

It sounds a lot like it's the isolated island filtering, which kicks in around z<=14. Your data set is unussual since you're only using a fraction of the OSM data. Maybe this causes odd behaviour in the identification of isloated ways?

In any case, routing only on bike routes might make users frustated? I think they will expect to be able to route anywhere you can actually bike.

For http://www.ibikecph.dk, we include all ways where you can bike or push a bike, but prioritize bike routes. We're running a custom branch of OSRM that allows parsing routes in the LUA script: https://github.com/ibikecph/Project-OSRM/tree/edge.

@DennisOSRM
Copy link
Collaborator

I tried to configure an instance of an old osrm version for a test using a very limited number of ways (national cycle routes in an area approximately 100 km x 100 km.

Please upgrade to the latest version.

@emmexx
Copy link
Author

emmexx commented May 26, 2014

Please upgrade to the latest version.

I tried :-) On a rhel6.5 instance on EC2 there's some problem because of the requirements of osrm. Many rhel packages are outdated. I'll try again...

@emmexx
Copy link
Author

emmexx commented May 26, 2014

Maybe this causes odd behaviour in the identification of isloated ways?

I don't know, it could be.

In any case, routing only on bike routes might make users frustated? I think they will expect to be able to route anywhere you can actually bike.

I know but first I'd like to be able to route along the national cycleways and extend the service to the whole network of ways later.
What I have to accomplish is a little bit difficult to explain...

@emmexx
Copy link
Author

emmexx commented Jun 4, 2014

I recompiled and tried both master and develop latest versions.
Same problem at low zoom level.
Any other suggestion?
Thank you

@emiltin
Copy link
Contributor

emiltin commented Jun 5, 2014

you should try high z, like z=18, not low. what you describe above, with routes not being found at low z, is the expected behaviour since isolated ways are filtered away at low z.

if you have very few ways, it's possible that everything is filtered away at low z, but in that case you can just use a high z.

@emmexx
Copy link
Author

emmexx commented Jun 5, 2014

you should try high z, like z=18, not low.

That would be against the purpose of my project. I'm working with national routes.
I tried a rather isolated way (sort of) on http://map.project-osrm.org/ and it seems to work as expected.
Search for Alpe di Lenno. You can place the start and end markers up to 5 km from that way at zoom level 10 or less and a route is found. What's the difference with my routes?
I suspect the problem is linked to the fact that my routes are made of "short" ways and at low zoom osrm filters them away, making the route unroutable. Am I correct?

@emiltin
Copy link
Contributor

emiltin commented Jun 5, 2014

if you run your own server, the z parameter can be set as you like, it doesn't have to match the zoom level of the map users are viewing. so even if a user is viewing all of europe, you can still pass z=18 when querying for routes.

@emiltin
Copy link
Contributor

emiltin commented Jun 5, 2014

i should add that z also controls how much the route geometry is simplified. at z=18, the route geometry will not be simplified at all, which can be a problem if the route is long, since the geometry might be very big and be slow to draw on your map. in other words, you might be in a dilamma about what z to use.

for this reason, i think it would be better if OSRM would allow you to specificy way filtering and geometry compression separately when querying routes.

@emmexx
Copy link
Author

emmexx commented Jun 5, 2014

Ok, now I understand. I forced z=18 in OSRM.Routing.js and now routing works at greater zoom levels.
There's still a little problem, I suppose it is related to osrm-web.
I place the start and end markers on the map, the markers are moved to the nearest points on the way but no route is shown.
In firebug there's the following error:
TypeError: the_response.alternative_geometries is undefined
the_response.alternative_geometries.unshift( response.route_geometry ); OSRM.RoutingAlternatives.js (line 42)
If I move one of the markers a little bit the route appears on the map, and the route description too.
This behaviour happens with "standard" osm data so I suppose it is related to the latest osrm-web version or to my misconfiguration of OSRM.config.js. If it isn't, I can open a ticket on this issue.

for this reason, i think it would be better if OSRM would allow you to specificy way filtering and geometry compression separately when querying routes.

Is that a question for Dennis? :)

@emiltin
Copy link
Contributor

emiltin commented Jun 5, 2014

yes, it sounds like an issue with how the js frontend handles routes

@DennisOSRM
Copy link
Collaborator

for this reason, i think it would be better if OSRM would allow you to specificy way filtering and geometry compression separately when querying routes.

Will come with the implementation #930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants