Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.43k stars 3.4k forks source link

indicate ferry parts of route #283

Closed emiltin closed 7 years ago

emiltin commented 12 years ago

just like pushing of bikes should be indicated with a different color on the route, it might be useful to indicate ferries and trains on the route?

rodo commented 12 years ago

It's related to https://github.com/DennisOSRM/Project-OSRM/issues/282 by now there is no information in the JSON output

emiltin commented 11 years ago

also related to indicating stretches where you push a bike

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.

emiltin commented 9 years ago

The travel mode is already send to the front end. On www.ibikecph.dk we use this to tell the user where the bike should be pushed, and when you're going with a ferrry.

Stalfur commented 9 years ago

So this is a problem on OSM.org with display?

Stalfur commented 9 years ago

According to https://github.com/openstreetmap/openstreetmap-website/issues/1000 then OSRM itself doesn't publish ferry details?

TheMarex commented 9 years ago

It is published:

curl http://router.project-osrm.org/viaroute?z=14&output=json&geometry=false&instructions=true&loc=-19.9861,23.4224&hint=tiRGDAiJvwwAAAAADwAAADUAAAB-AAAAQAAAAC3bugMAAAAAfwnP_otlZQEEABEA&loc=-18.8167,22.4209&hint=S1zhCcU7wgwAAAAAewAAAAUBAACIBAEArYcAAOk8hAYAAAAAj-fg_pQiVgG2ABEA&checksum=2214934300
{
    "found_alternative": false,
    "hint_data": {
        "checksum": 2214934300,
        "locations": [
            "tiRGDAiJvwwAAAAADwAAADUAAAB-AAAAQAAAAC3bugMAAAAAfwnP_otlZQEEABEA",
            "S1zhCcU7wgwAAAAAewAAAAUBAACIBAEArYcAAOk8hAYAAAAAj-fg_pQiVgG2ABEA"
        ]
    },
    "route_instructions": [
        [
            "10",
            "",
            123,
            0,
            26,
            "122m",
            "SW",
            225,
            1
        ],
        [
            "7",
            "",
            111,
            2,
            13,
            "110m",
            "E",
            103,
            1
        ],
        [
            "1",
            "",
            77,
            3,
            9,
            "77m",
            "SE",
            115,
            1
        ],
        [
            "3",
            "Pulane Rd",
            49,
            4,
            6,
            "49m",
            "SW",
            219,
            1
        ],
        [
            "7",
            "Tsaro Street",
            232,
            5,
            27,
            "231m",
            "SE",
            134,
            1
        ],
        [
            "3",
            "Tsheko Tsheko Rd (A3)",
            5999,
            9,
            274,
            "5999m",
            "SW",
            225,
            1
        ],
        [
            "1",
            "A3",
            90908,
            44,
            4142,
            "90907m",
            "SW",
            239,
            1
        ],
        [
            "3",
            "A35",
            291960,
            332,
            13674,
            "291959m",
            "NW",
            330,
            1
        ],
        [
            "1",
            "",
            464,
            1090,
            39,
            "464m",
            "N",
            2,
            1
        ],
        [
            "1",
            "",
            6004,
            1095,
            624,
            "6004m",
            "N",
            352,
            2
        ],
        [
            "1",
            "",
            73,
            1122,
            6,
            "72m",
            "SE",
            114,
            1
        ],
        [
            "1",
            "",
            345,
            1123,
            29,
            "345m",
            "SE",
            114,
            1
        ],
        [
            "1",
            "",
            95,
            1125,
            8,
            "95m",
            "SE",
            124,
            1
        ],
        [
            "1",
            "",
            147,
            1126,
            12,
            "146m",
            "SE",
            124,
            1
        ],
        [
            "1",
            "",
            2989,
            1127,
            250,
            "2988m",
            "SE",
            124,
            1
        ],
        [
            "1",
            "",
            203,
            1132,
            17,
            "203m",
            "SE",
            133,
            1
        ],
        [
            "1",
            "",
            6198,
            1133,
            519,
            "6198m",
            "SE",
            133,
            1
        ],
        [
            "1",
            "",
            79813,
            1144,
            12,
            "79812m",
            "E",
            106,
            1
        ],
        [
            "15",
            "",
            0,
            1327,
            0,
            "0m",
            "N",
            0
        ]
    ],
    "route_name": [
        "A3",
        "A35"
    ],
    "route_summary": {
        "end_point": "",
        "start_point": "",
        "total_distance": 485789,
        "total_time": 26344
    },
    "status": 0,
    "status_message": "Found route between points",
    "via_indices": [
        0,
        1328
    ],
    "via_points": [
        [
            -19.986048,
            23.422348
        ],
        [
            -18.815088,
            22.422165
        ]
    ]
}

The problem is that the instruction gets merged with a longer segment after it because there is no turn and the street name is the same.

daniel-j-h commented 7 years ago

Update as of v5.5:

http 'http://router.project-osrm.org/route/v1/driving/23.4224,-19.9861;22.4209,-18.8167?steps=true'

The ferry is both in the request as well as the frontend:

http://map.project-osrm.org/?z=15&center=-18.276363%2C21.788034&loc=-19.987781%2C23.422769&loc=-18.816679%2C22.420885&hl=en&alt=0

Here's the ferry in OSM: http://www.openstreetmap.org/way/26829633#map=15/-18.2743/21.7889

ferry

(Also check the satellite imagery there, it's beautiful)

Closing here as resolved.

Stalfur commented 7 years ago

(Also check the satellite imagery there, it's beautiful)

The Okavango Delta is one of the Seven Natural Wonders of Africa

emiltin commented 7 years ago

does ferries have a destination? e.g. "take the DFDS Line towards Oslo"

daniel-j-h commented 7 years ago

@emiltin at least not on the way http://taginfo.openstreetmap.org/tags/route=ferry#combinations some people seem to code it into the name as in

Ferry XA  A <-> B