use of org.opentripplanner.routing.edgetype.BikeParkEdge in project OpenTripPlanner by opentripplanner.
the class BikeParkModule method buildGraph.
@Override
public void buildGraph(Graph graph, HashMap<Class<?>, Object> extra) {
LOG.info("Building bike parks from static source...");
BikeRentalStationService service = graph.getService(BikeRentalStationService.class, true);
if (!dataSource.update()) {
LOG.warn("No bike parks found from the data source.");
return;
}
Collection<BikePark> bikeParks = dataSource.getBikeParks();
for (BikePark bikePark : bikeParks) {
service.addBikePark(bikePark);
BikeParkVertex bikeParkVertex = new BikeParkVertex(graph, bikePark);
new BikeParkEdge(bikeParkVertex);
}
LOG.info("Created " + bikeParks.size() + " bike parks.");
}
Aggregations