Closed JohnMartin10000 closed 4 months ago
You need to align a few things:
data/driving_side.geojson
- pass it to osrm-extract --location-dependent-data data/driving_side.geojson ...
- this will ensure that all edges are properly marked with the correct driving side for each country.approach=curb
in your requests.You said:
I just have to set left or right side
but this does not make sense - there is no absolute "left" or "right" side of any road, it depends on the direction you are traveling along that road.
Point (3) above may be your main challenge - it will depend where you are getting your destination coordinates from - are you dropping markers on the map, or depending on a geocoding service to perform address-to-coordinate conversion?
We are building our own data on top of osrm. dumped geojson and converted with ogr2osm and osmosis to make it osrm friendly. set left_drive true in car.lua added drive_direction = left in database. still when build with osrm it is taking right hand driving. wanted to try location dependent data approach. downloaded india admistrative from overpass. throwing location out of index. what can i do more? where i could find driving_side.geojson?
@kabilsharma You need to provide some more detail, perhaps a screenshot showing examples?
The left-hand-driving flags in the processing files mostly only impact results when you use approaches=curb
- otherwise, most roads are singly digitized and allow travel in both directions, doubly-digitized roads should be marked as one-way, and roundabouts also should have the appropriate oneway flag set. For roads like motorways with assumed oneway=yes
flags, you must ensure the geometry/nodes are ordered in the direction of travel (or if they're not, supply oneway=-1
for reversed roads).
I think you probably need to step carefully through your GeoJSON->OSM data and ensure that you're generating the map you think you're generating.
There is a driving_side.geojson
file in the data
directory here: https://github.com/Project-OSRM/osrm-backend/tree/master/data - but it sounds like your issues may be more fundamental. Again, the driving-side flag mostly only impacts approaches=curb
.
Thanks Danpat for prompt reply. Yes it was a mistake at my end it was drawing left hand routes just oneway tags in data were yes and no instead of Yes or no ( roundabout a well) . It worked
You need to align a few things:
- When you process the data, make sure you use the file in
data/driving_side.geojson
- pass it toosrm-extract --location-dependent-data data/driving_side.geojson ...
- this will ensure that all edges are properly marked with the correct driving side for each country.- Use
approach=curb
in your requests.- Make sure your input coordinate is set slightly off to the side of the road geometry your destination is actually on.
You said:
I just have to set left or right side
but this does not make sense - there is no absolute "left" or "right" side of any road, it depends on the direction you are traveling along that road.
Point (3) above may be your main challenge - it will depend where you are getting your destination coordinates from - are you dropping markers on the map, or depending on a geocoding service to perform address-to-coordinate conversion?
Do we need to pass driving_side.geojson
only for osrm-extract or also for osrm-partition and osrm-customize?
Stale.
How I can set side of road for planned route?
I looked for any solution but I only see some mentions about approach=curb, but this is not what I wont, I just have to set left or right side.