use of org.opentripplanner.graph_builder.module.osm.DefaultWayPropertySetSource in project OpenTripPlanner by opentripplanner.
the class FakeGraph method buildGraphNoTransit.
/**
* Build a graph in Columbus, OH with no transit
*/
public static Graph buildGraphNoTransit() throws UnsupportedEncodingException {
Graph gg = new Graph();
OpenStreetMapModule loader = new OpenStreetMapModule();
loader.setDefaultWayPropertySetSource(new DefaultWayPropertySetSource());
AnyFileBasedOpenStreetMapProviderImpl provider = new AnyFileBasedOpenStreetMapProviderImpl();
File file = new File(URLDecoder.decode(FakeGraph.class.getResource("columbus.osm.pbf").getFile(), "UTF-8"));
provider.setPath(file);
loader.setProvider(provider);
loader.buildGraph(gg, new HashMap<Class<?>, Object>());
return gg;
}
Aggregations