Repository navigation
Conversation
# Conflicts: # reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java
|
Users know only their heading in degrees (e.g. via GPS bearing) and can pass that conveniently to all routing engines in order to ask for a directed start during route calculation.
Is it an extra feature or the heading will be deprecated in the future? |
Ok I see for a user with GPS it is convenient to pass on the heading in degrees. But for route planning (looking at a map) isn't it also convenient to be able to specify on which side of the road some location is ?
These features can co-exist. In the long run it would be nice to implement heading similarly to curb-side (specifying some heading (in degrees), extracting the relevant edge-ids and initializing the routing algorithm with these edges). For node-based routing I think the current implementation of heading would still be required. |
Indeed it depends on the use conditions: If do route planning with a map on screen, can place waypoints on road sides and look at map to inspect and then set left/right directions. But working with code, all that is available in clients are waypoints in coordinates and their headings in degrees. Low level parameters or conversions are not known in apps which are unaware of graph internals.
👍
That seems a convenient approach from user's side. |
This depends on the kind of code/application/client as well (?). For example using |
That seems related more to via points and destination? |
Yes, you can use |
More meant that cannot see it as usable in place of start's heading. |
Ok |
|
I'm more concerned if heading feature will be removed from GraphHopper in the future.
Vehicles on the road don't see map to know left/right, navigator does the (re)routing. |
Ok thanks for your explanations and reminder what heading is used for. Of course it will not be removed, and if it will be re-implemented we have to make sure it can be used as before (but I do not think anyone is planning to change anything about the heading feature atm). |
# Conflicts: # core/src/main/java/com/graphhopper/GraphHopper.java # reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java
|
Ok, the only thing that I am not sure of here is what should happen when a
For 1) and 2) it would be nice to know which curb_side constraint could not be fulfilled, maybe this information needs to be added to the response ? This is still missing. |
|
Ok, to make progress I decided to add a new parameter that controls the behavior: |
# Conflicts: # core/files/changelog.txt
|
I think option 3 is the best - the question is now, which of 1+2 should be default :) ? As we are in other matter rather strict it would be consistent to choose 1, but I have really no preference. BTW: can or shall we rename |
|
Ok then I'll go with |




This PR adds a new
curb_sideparameter to the/routeendpoint. Thecurb_sidespecifies on which side a query point should be relative to the driver when she leaves/arrives at a start/target/via point. This feature is similar toheading, but does not suffer from (all) the drawbacks mentioned in #1647, importantly it works with speed-mode/CH. However, using this parameter requires usingedge_based=true(so for example to use this with speed-mode/CH one needs to setup the graph preparation accordingly).Update: The parameter was renamed to
curbside=right/left/anyTake this example of a road going from West to East with some location x south of the road and another location y north of the road:
The new parameter then has the following meaning:
You need to either specify the
curb_sidefor all points of the routing query or for none of them.curb_side=eithercan be used to not specify the direction of arriving/leaving a point (in this case the routing engine will choose the shortest path considering all options).Note that this definition of
curb_sideis independent of right/left-hand traffic in different countries,curb_side=rightalways means the location will be on the right of the driver (in driving direction), no matter whether she is sitting on the right/left of the vehicle and/or driving on the right/left lane.There are some corner cases where the
curb_sideparameter will be ignored, for example when the query point lies on a junction, seeDirectionResolverTest.javafor more details.Fixes #1647, fixes #680.
Current todo:
curb_side=eitherin case the requested curb side is not possible (e.g. in one-way streets), or make this configurable. this is now configurable.