Examples of GtfsGraphBuilderImpl


Examples of org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl

                    gtfsBundle.linkStopsToParentStations = true;
                }
                gtfsBundle.parentStationTransfers = params.parentStationTransfers;
                gtfsBundles.add(gtfsBundle);
            }
            GtfsGraphBuilderImpl gtfsBuilder = new GtfsGraphBuilderImpl(gtfsBundles);
            graphBuilder.addGraphBuilder(gtfsBuilder);
            // When using the long distance path service, or when there is no street data,
            // link stops to each other based on distance only, unless user has requested linking
            // based on transfers.txt or the street network (if available).
            if ((!hasOSM ) || params.longDistance) {
                if (!params.useTransfersTxt) {
                    if (!hasOSM || !params.useStreetsForLinking) {
                        graphBuilder.addGraphBuilder(new StreetlessStopLinker());
                    }
                }
            }
            if ( hasOSM ) {
                graphBuilder.addGraphBuilder(new TransitToTaggedStopsGraphBuilderImpl());
                graphBuilder.addGraphBuilder(new TransitToStreetNetworkGraphBuilderImpl());
                // The stops can be linked to each other once they have links to the street network.
                if (params.longDistance && params.useStreetsForLinking && !params.useTransfersTxt) {
                    graphBuilder.addGraphBuilder(new StreetfulStopLinker());
                }
            }
            gtfsBuilder.setFareServiceFactory(new DefaultFareServiceFactory());
        }
        if (configFile != null) {
            EmbeddedConfigGraphBuilderImpl embeddedConfigBuilder = new EmbeddedConfigGraphBuilderImpl();
            embeddedConfigBuilder.propertiesFile = configFile;
            graphBuilder.addGraphBuilder(embeddedConfigBuilder);
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl

        graph.timetableSnapshotSource = (timetableSnapshotSource);
    }

    private void initTransit() {
        GtfsGraphBuilderImpl gtfsBuilder = new GtfsGraphBuilderImpl();
        GtfsBundle bundle = new GtfsBundle();
        bundle.setPath(new File("src/test/resources/google_transit.zip"));

        ArrayList<GtfsBundle> bundleList = new ArrayList<GtfsBundle>();
        bundleList.add(bundle);
        GtfsBundles bundles = new GtfsBundles();
        bundles.setBundles(bundleList);
        gtfsBuilder.setGtfsBundles(bundles);

        HashMap<Class<?>, Object> extra = new HashMap<Class<?>, Object>();
        gtfsBuilder.buildGraph(graph, extra);

        TransitToStreetNetworkGraphBuilderImpl linker =
                new TransitToStreetNetworkGraphBuilderImpl();
        linker.buildGraph(graph, extra);
View Full Code Here

Examples of org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl

    protected void setUp() {
        File gtfs = new File("src/test/resources/" + getFeedName());
        File gtfsRealTime = new File("src/test/resources/" + getFeedName() + ".pb");
        GtfsBundle gtfsBundle = new GtfsBundle(gtfs);
        List<GtfsBundle> gtfsBundleList = Collections.singletonList(gtfsBundle);
        GtfsGraphBuilderImpl gtfsGraphBuilderImpl = new GtfsGraphBuilderImpl(gtfsBundleList);

        alertsUpdateHandler = new AlertsUpdateHandler();
        graph = new Graph();
        gtfsBundle.setTransfersTxtDefinesStationPaths(true);
        gtfsGraphBuilderImpl.buildGraph(graph, null);
        // Set the agency ID to be used for tests to the first one in the feed.
        agencyId = graph.getAgencyIds().iterator().next();
        System.out.printf("Set the agency ID for this test to %s\n", agencyId);
        graph.index(new DefaultStreetVertexIndexFactory());
        timetableSnapshotSource = new TimetableSnapshotSource(graph);
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.