No routing on lines with multi modalities? (railway + highway flag)

I found a short line which has the flags railway=narrow_gauge and highway=primary at the same time, access flags are not set .
(Third method how to map tracks embedded in street http://wiki.openstreetmap.org/wiki/Trams#Differences_to_other_railways)

As you can see GraphHopper routes all the way around and avoids this line.
https://graphhopper.com/maps/?point=46.235127%2C10.140005&point=46.235554%2C10.140059&locale=en-US&vehicle=car&weighting=fastest&elevation=true&layer=Omniscale

(Did not look into the code. I assume it is an early abort once the railway flag is found.)

We currently only accept a certain subsets of embedded railway tags like tram, but not narrow_gauge. As we want to really make sure ‘pure’ railways are not used for road routing. In this case one could easily separately map the two ways, IMO they are two ways :). Another way would be to add narrow_gauge although we reduce the strict behaviour a bit more then …

Thank you for your answer. After thinking about it for nearly two days I still think you are wrong with your approach.
Here my reasoning: A highway is open to traffic according its type/class and additional access modifier flags. An additional railway flag should not affect standard routing.

Nevertheless, the railway plus highway combination has some use in routing. For example if one would organize a cycle competition, or roller blade ride out, one would like to avoid such situations where the tracks are part of the pavement. Also reason why the 2010 Giro d’Itialia :bike: Etappe #20 ending on the Forcola di Livigno started in Poschiavo and not in Tirano.

I will look how easy it is to fix the bridge, to follow one of the other guidelines. It has the disadvantage to lose the meta information. But it seems to be the more common approach, and any other stretch on the Bernina line is uses allways two seperate ways.

A note for train enthusiast: A long stretch where the train runs on a street can be found in Michigan City, IN.

In theory you are right, but in practise there were some incorrectly tagged ways where we would then allow routing on rails (at least this was the case in the past). But maybe we should relax here more and trust the OSM community to find these tagging issues & fix those? Probably the more future proof solution. Feel free to open an issue at github for this, I’ll then link the older issues related to that

roller blade ride out, one would like to avoid such situations where the tracks are part of the pavement.

This is what we are doing for bike already: allow riding near trams, but put a bigger penalty on these roads.

A long stretch where the train runs on a street can be found in Michigan City, IN.

Do you have a link to this road and does GH allow routing on it?

Here:
https://graphhopper.com/maps/?point=41.706433%2C-86.921854&point=41.712985%2C-86.886814&locale=de&vehicle=car&weighting=fastest&elevation=true&layer=TF%20Transport

Yes, routing is allowed. And the bike routing feature can be clearly seen :+1:

There is the principle that one should not map for the routing tool (or renderer). A little bit adapted: one should not route for the mapping fool. :wink: Just like you correctly do not route through a barrier with no access tags. Found a few of those, thanks to graphhopper.

As I now have also stumbled over the non-routing over fords (Discussion here: https://github.com/graphhopper/graphhopper/issues/236) (My example here: https://graphhopper.com/maps/?point=46.989149%2C9.849168&point=46.989226%2C9.84927&locale=en-US&vehicle=car&weighting=fastest&elevation=true&layer=Omniscale) it was time to adapt and write my own FlagEncoder.
It also allowed me to remove the conditional access restrictions.

I do not care about closed alpine :snowflake: passes. When summer comes they will be open :smile: :motorbike:

it was time to adapt and write my own FlagEncoder

If you explicitely tag as allowed for car etc then this will be already considered. But we are conservative here for the default settings. Furthermore you can just change the setting to allow passing fords regardless of the access tagging, no need here for an own FlagEncoder.

What do you mean here? We do currently not parse summer or winter as this depends on the country and so conditional access should include only the really important ones like closed roads for several days etc

An example is the Susten, Which has a Nov-May restriction.
https://graphhopper.com/maps/?point=46.738743%2C8.453722&point=46.729213%2C8.446727&locale=en-US&vehicle=car&weighting=fastest&elevation=true&layer=Omniscale

Then there is the Pragel, partially closed Sa-Su.
https://graphhopper.com/maps/?point=46.974513%2C8.777046&point=47.049072%2C9.041748&locale=en-US&vehicle=car&weighting=fastest&elevation=true&layer=Omniscale
Surprisingly, you route over it although it is Sunday today.

More challenging (TODO #374) is the Hongrin which is not only closed Nov-May, but also closed Mo-Fr.
https://graphhopper.com/maps/?point=46.328439%2C6.963959&point=46.367187%2C6.957607&point=46.461039%2C7.075882&locale=en-US&vehicle=car&weighting=fastest&elevation=true&layer=Omniscale

As I want to have a route which includes Pragel (plus some other roads closed on Sa-Su) and Hongrin, I thought it was safer to switch it off.

In future, I would also disallow any ferry/car_shuttle save a few explicitly allowed, for ex. Lötschberg. For now I disallow all of them.

Finally, I wanted to use the motorcycle through the web API :grin: plus with the cherry on the top which is made of pure curiosity :smirk_cat: .

1 Like

This topic was automatically closed after 12 days. New replies are no longer allowed.