Package org.opentripplanner.routing.graph

Examples of org.opentripplanner.routing.graph.GraphIndex


public class GeocoderResource {

    private final LuceneIndex index;

    public GeocoderResource (@Context OTPServer otpServer, @PathParam("routerId") String routerId) {
        GraphIndex graphIndex = otpServer.graphService.getGraph(routerId).index;
        synchronized (graphIndex) {
            if (graphIndex.luceneIndex == null) {
                // Synchronously lazy-initialize the Lucene index
                graphIndex.luceneIndex = new LuceneIndex(graphIndex, false);
            }
View Full Code Here


        routingRequest.startingTransitTripId = agencyAndId;
        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(9);

        patternHop0.setGeometry(geometry);
        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);

        coordinates = new Coordinate[3];
        coordinates[0] = new Coordinate(3.5, 1.0);
        coordinates[1] = new Coordinate(5.0, 1.0);
        coordinates[2] = new Coordinate(5.0, 5.0);
View Full Code Here

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(10);
        when(graph.getVertex("Station_0")).thenReturn(station0);
        when(graph.getVertex("Station_1")).thenReturn(station1);

        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);

        Vertex vertex = onBoardDepartServiceImpl.setupDepartOnBoard(routingContext);

        assertEquals(coordinates[1].x, vertex.getX(), 0.0);
        assertEquals(coordinates[1].y, vertex.getY(), 0.0);
View Full Code Here

        when(graph.getVertex("Station_0")).thenReturn(station0);
        when(graph.getVertex("Station_1")).thenReturn(station1);
        when(graph.getVertex("Station_2")).thenReturn(station2);

        tripPattern.add(tripTimes);
        graph.index = new GraphIndex(graph);

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(0);
        assertEquals(station0, onBoardDepartServiceImpl.setupDepartOnBoard(routingContext));

        when(serviceDay.secondsSinceMidnight(anyInt())).thenReturn(20);
View Full Code Here

TOP

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

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.