use of org.opentripplanner.routing.edgetype.factory.TransferGraphLinker in project OpenTripPlanner by opentripplanner.
the class ConstantsForTests method setupPortland.
private void setupPortland() {
try {
portlandContext = GtfsLibrary.readGtfs(new File(ConstantsForTests.PORTLAND_GTFS));
portlandGraph = new Graph();
GTFSPatternHopFactory factory = new GTFSPatternHopFactory(portlandContext);
factory.run(portlandGraph);
TransferGraphLinker linker = new TransferGraphLinker(portlandGraph);
linker.run();
// TODO: eliminate GTFSContext
// this is now making a duplicate calendarservicedata but it's oh so practical
portlandGraph.putService(CalendarServiceData.class, GtfsLibrary.createCalendarServiceData(portlandContext.getDao()));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
StreetLinkerModule ttsnm = new StreetLinkerModule();
ttsnm.buildGraph(portlandGraph, new HashMap<Class<?>, Object>());
}
Aggregations