Problem with route instructions when having same name for consecutive edges

29 views
Skip to first unread message

Tim Weyrer

unread,
May 15, 2013, 11:05:17 AM5/15/13
to opentrippl...@googlegroups.com
Hey all,

I´m facing the problem that I get less route instructions for my route than I would expect. I attached a screenshot to this post. In yellow you can see the consecutive edges that have the same name (4). The red nodes mark the positions where I do get route instructions. The blue nodes mark the places where I would expect route instructions in addition (but I don´t get them). Not having all the route instructions could lead to problems in way finding. 

At the beginning I got just one walk step for those edges. Then I commented out two if-statements "if (alternative.getName().equals(streetName())" in class PlanGenerator.java (around lines 840 and 870), so I got a second route instruction/walk step.

I tried to do further adaptations in class PlanGenerator.java to get the missing route instructions/walk steps, but nothing worked so far. 

Any ideas/hints?

Thanks,
Tim




problem_route_instructions.png

Laurent GRÉGOIRE

unread,
May 15, 2013, 11:47:21 AM5/15/13
to opentrippl...@googlegroups.com
Hi Tim,

Maybe you could try to add a condition based on the relative turn angle?
This angle should be available as it is computed for each intersection
to include in the directions. In the vein as:

if (previousName.equals(streetName)
and (abs(relativeTurnAngle) < threshold)) then
remove instruction


HTH,

--Laurent
> --
> You received this message because you are subscribed to the Google
> Groups "OpenTripPlanner Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to opentripplanner-...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


Tim Weyrer

unread,
May 15, 2013, 1:30:41 PM5/15/13
to opentrippl...@googlegroups.com
Hey,

I don´t think that it´s about adding an additional condition. Maybe you misunderstood my post. 

I literally deleted those two if statements, and through that I got one more route instruction. At the end of the day it should not check for the name of the edges, but still for the angle btw them. But I´m missing something...

Thanks,
Tim 

Tim Weyrer

unread,
May 16, 2013, 2:50:38 PM5/16/13
to opentrippl...@googlegroups.com
Hey,

I have the "missing" route instructions now. I took a closer look at the whole process and found the solution (hopefully).

There is one section in method getWalkSteps that handles U-turns within an if-else statement (around row 910). Actually, I deleted the "else-part" of the if-else statement, because there the steps are aggregated for some reason. Without the "else-part" it gives me all the expected route instructions.

Tim
Reply all
Reply to author
Forward
0 new messages