Package org.opentripplanner.routing.graph

Examples of org.opentripplanner.routing.graph.SimpleConcreteEdge


        options.walkSpeed = 1.0;

        StreetLocation fromLocation = new StreetLocation(_graph, "near_shilshole_22nd",
                new Coordinate(-122.385050, 47.666620), "near_shilshole_22nd");
        fromLocation.getExtra().add(
                new SimpleConcreteEdge(fromLocation, _graph.getVertex("shilshole_22nd")));

        StreetLocation toLocation = new StreetLocation(_graph, "near_56th_20th", new Coordinate(
                -122.382347, 47.669518), "near_56th_20th");
        toLocation.getExtra()
                .add(new SimpleConcreteEdge(_graph.getVertex("56th_20th"), toLocation));

        options.setRoutingContext(_graph, fromLocation, toLocation);
        ShortestPathTree tree = new GenericAStar().getShortestPathTree(options);

        GraphPath path = tree.getPath(toLocation, false);
View Full Code Here


        options.setArriveBy(true);

        StreetLocation fromLocation = new StreetLocation(_graph, "near_shilshole_22nd",
                new Coordinate(-122.385050, 47.666620), "near_shilshole_22nd");
        fromLocation.getExtra().add(
                new SimpleConcreteEdge(fromLocation, _graph.getVertex("shilshole_22nd")));

        StreetLocation toLocation = new StreetLocation(_graph, "near_56th_20th", new Coordinate(
                -122.382347, 47.669518), "near_56th_20th");
        toLocation.getExtra()
                .add(new SimpleConcreteEdge(_graph.getVertex("56th_20th"), toLocation));

        options.setRoutingContext(_graph, fromLocation, toLocation);
        ShortestPathTree tree = new GenericAStar().getShortestPathTree(options);

        GraphPath path = tree.getPath(fromLocation, false);
View Full Code Here

    private void edges(String... vLabels) {
        for (int i = 0; i < vLabels.length - 1; i++) {
            Vertex vA = _graph.getVertex(vLabels[i]);
            Vertex vB = _graph.getVertex(vLabels[i + 1]);

            new SimpleConcreteEdge(vA, vB);
            new SimpleConcreteEdge(vB, vA);
        }
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.graph.SimpleConcreteEdge

Copyright © 2018 www.massapicom. 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.