openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.18k stars 914 forks source link

Ferry routing not in text in routing directions #1000

Open Stalfur opened 9 years ago

Stalfur commented 9 years ago

The text field should really say it is by ferry, the first 200 meters in step 10 in this route are by ferry but that is not indicated in the text field itself.

Perhaps it should be split up so "10. 200 meters by ferry" would be displayed. According to OSRM the value of "travel by ferry" or similar is returned, but the display side is not using it.

tomhughes commented 9 years ago

I see no evidence that OSRM is doing what you claim. The fact that the ferry crossing and the next segment of road are all being returned as a single entry pretty much rules it out, and the OSRM web site does exactly the same thing and doesn't mention ferries (see http://osrm.at/df1).

If OSRM does support ferries in the way you claim, then the tagging here is obviously not what it is expecting. In any case this is clearly not a problem with the OSM web site.

Stalfur commented 9 years ago

See https://github.com/Project-OSRM/osrm-backend/issues/283

emiltin commented 9 years ago

osrm returns the travel mode for each part of the route, encoded as an integer defined here: https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L147

emiltin commented 9 years ago

note that the travel mode codes are different for each profile

tomhughes commented 9 years ago

I'm not sure how the codes the profile returns to the engine help us? or do they propagate to the API in some way? In any case I'm now sure we would want to rely on some profile specific number that might change at any time.

None of that explains how come the route segment includes both the ferry and a chunk of road - what code exactly does that get?

TheMarex commented 9 years ago

@tomhughes well in cases like that it helps to have a look at the API documentation:

https://github.com/Project-OSRM/osrm-backend/wiki/Server-api#query-2

Last value of the instructions array mode. It is save to use the value from the default profile since we operate the demo server and don't intend to change it.

That said there seems to be a bug in the instructions generation that doesn't advertise a new instruction if there is no turn (regardless of whether the mode changes or not). Tracking that in osrm-backend. Regardless mode support is still missing from osm.org, so you should re-open this.

tomhughes commented 9 years ago

The problem is I didn't write any of this, and I know next to nothing about it, so I'm basically fumbling in the dark unless people can point me at the right documentation.

Thanks for your help in figuring out the issues. I'll reopen this, and hope somebody feels like fixing it ;-)

systemed commented 9 years ago

I'll take a look when I have a spare moment (not sure I currently have a working openstreetmap-website, but it should be a reasonably easy fix).

Stalfur commented 8 years ago

Looks fixed but missing a language file entry in default En-US English.

Clicking on link in topic starter gives a screen with a ferry icon for ferry route but an error message for text.

AntonKhorev commented 1 month ago

I only get ferry with Valhalla. OSRM still has unnamed road. Its output probably changed since https://github.com/openstreetmap/openstreetmap-website/pull/1068.

image