graphhopper / graphhopper-ios

iOS Port of the GraphHopper road routing engine
https://www.graphhopper.com/open-source/
Apache License 2.0
69 stars 28 forks source link

Directions are not calculated properly after 'barrier' #24

Closed kuchmiyalex closed 7 years ago

kuchmiyalex commented 7 years ago

Not sure where the issue is, my guess is that 'import' phase should include service/parking_aisle roads. But as a result not able to build route inside of parking lot, see screenshots. Can someone point me to correct direction or this is known limitation? Thank you very much.

screen shot 2017-08-28 at 11 19 49 am screen shot 2017-08-28 at 11 18 32 am

clns commented 7 years ago

CC'ing @karussell as this might be related to GraphHopper itself, not the iOS port. We'll keep this open for now.

kuchmiyalex commented 7 years ago

@clns Further investigation shows that actual issue is due to 'barrier' gates and there's already optional parameter https://github.com/graphhopper/graphhopper/issues/754 Can you clarify how this param should be used from iOS code?

clns commented 7 years ago

I don't have access to a Mac right now. I can take a look at this in about 5-6 hrs, in case you can't figure it out by then.

karussell commented 7 years ago

@kuchmiyalex Can you link to the location or route via GraphHopper Maps?

kuchmiyalex commented 7 years ago

@karussell No it doesn't show route either:

https://graphhopper.com/maps/?point=48.121299%2C16.562893&point=48.12035%2C16.563295&locale=en-US&vehicle=car&weighting=fastest&elevation=true&use_miles=false&layer=Omniscale

karussell commented 7 years ago

The reason is access=private at the lift barrier https://www.openstreetmap.org/node/4861930265

kuchmiyalex commented 7 years ago

@karussell it's on different road, there's just barrier=lift_gate on correct road, without private tag.

karussell commented 7 years ago

The current defaults are that if no access tag allows access then a lift_gate is considered as blocking

The Java code in CarFlagEncoder is like:

restrictions.addAll(Arrays.asList("motorcar", "motor_vehicle", "vehicle", "access"));
...
potentialBarriers.add("lift_gate");
kuchmiyalex commented 7 years ago

@karussell thanks, also discovered this by checking sources. But in general is it a good decision? For example mapbox/google/apple allows routing to this particular destination.

karussell commented 7 years ago

But in general is it a good decision?

It is a conservative/safe approach and when we introduce a more flexible query mechanism this will be customizable per request.

For example mapbox/google/apple allows routing to this particular destination.

We take other routing providers just as indication how it could be ;)

kuchmiyalex commented 7 years ago

@karussell thanks for your time and clarification!