Examples of TurnRestriction


Examples of org.opentripplanner.common.TurnRestriction

    }

    private void DisallowTurn(StreetEdge from, StreetEdge to) {
        TurnRestrictionType rType = TurnRestrictionType.NO_TURN;
        TraverseModeSet restrictedModes = new TraverseModeSet(TraverseMode.CAR, TraverseMode.CUSTOM_MOTOR_VEHICLE);
        TurnRestriction restrict = new TurnRestriction(from, to, rType, restrictedModes);
        _graph.addTurnRestriction(from, restrict);
    }
View Full Code Here

Examples of org.opentripplanner.common.TurnRestriction

        StreetEdge e0 = edge(v0, v1, 50.0, StreetTraversalPermission.ALL);
        StreetEdge e1 = edge(v1, v2, 18.4, StreetTraversalPermission.ALL);
        State state = new State(v2, 0, proto.clone());

        state.getOptions().setArriveBy(true);
        _graph.addTurnRestriction(e1, new TurnRestriction(e1, e0, null, TraverseModeSet.allModes()));

        assertNotNull(e0.traverse(e1.traverse(state)));
    }
View Full Code Here

Examples of org.opentripplanner.common.TurnRestriction

    }

    private void DisallowTurn(StreetEdge from, StreetEdge to) {
        TurnRestrictionType rType = TurnRestrictionType.NO_TURN;
        TraverseModeSet restrictedModes = new TraverseModeSet(TraverseMode.CAR, TraverseMode.CUSTOM_MOTOR_VEHICLE);
        TurnRestriction restrict = new TurnRestriction(from, to, rType, restrictedModes);
        _graph.addTurnRestriction(from, restrict);
    }
View Full Code Here

Examples of org.opentripplanner.common.TurnRestriction

                            case STRAIGHT:
                                if (angleDiff >= 30 && angleDiff < 330)
                                    continue; // not straight
                                break;
                            }
                            TurnRestriction restriction = new TurnRestriction();
                            restriction.from = from;
                            restriction.to = to;
                            restriction.type = restrictionTag.type;
                            restriction.modes = restrictionTag.modes;
                            restriction.time = restrictionTag.time;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.