Hi, I’m using offline java GH with my own custom profile for bus, with u-turn restriction (…setTurnCosts(true)). There’s a dead-end road in .osm tagged highway=tertiary, and adjacent object tagged highway=turning_circle. Both are accessible for my custom profile (i.e. defaultSpeedMap.put(“turning_circle”, 5)) and I expected that my “bus” would be able to visit this section, turn round and leave, but it doesn’t work. The questions are, is this intended to work this way? Can it be fixed somehow in my code (allowing U-turns is not an option)? If not, what object (tag) can be used to fix it via OSM edit (I’m using local offline OSM data so this is not a problem)?
Thanks in advance!
The reason why
defaultSpeedMap.put("turning_circle", 5) does not work is that these speeds are only meant to be used for OSM ways (not nodes) using the
highway tag. You can try the branch recommended by @otbutz and you are more than welcome to tell us if it worked With this branch the route should include a ‘u-turn’ at the
turning_circle node, but it won’t add anything to the time or distance of the path and this turn won’t show up in instructions, yet. Otherwise it should work. Don’t forget to delete the graph-cache folder and run a new import.
In terms of editing your local OSM file the best you can do is replace the
turning_circle node with a little loop way that uses the same tags as the adjacent road.
Thanks a lot, understood! Sorry, I’m not skilled enough yet to use unmerged PR, so I’ll wait till it (hopefully) appears in master, or, even better, on maven repo, and meanwhile edit my local .osm
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.