use of com.graphhopper.gtfs.GraphHopperGtfs in project graphhopper by graphhopper.
the class ExtendedRouteTypeIT method init.
@BeforeAll
public static void init() {
GraphHopperConfig ghConfig = new GraphHopperConfig();
ghConfig.putObject("graph.location", GRAPH_LOC);
ghConfig.putObject("gtfs.file", "files/another-sample-feed-extended-route-type.zip");
ghConfig.setProfiles(Arrays.asList(new Profile("foot").setVehicle("foot").setWeighting("fastest"), new Profile("car").setVehicle("car").setWeighting("fastest")));
Helper.removeDir(new File(GRAPH_LOC));
graphHopperGtfs = new GraphHopperGtfs(ghConfig);
graphHopperGtfs.init(ghConfig);
graphHopperGtfs.importOrLoad();
ptRouter = new PtRouterImpl.Factory(ghConfig, new TranslationMap().doImport(), graphHopperGtfs.getGraphHopperStorage(), graphHopperGtfs.getLocationIndex(), graphHopperGtfs.getGtfsStorage()).createWithoutRealtimeFeed();
}
use of com.graphhopper.gtfs.GraphHopperGtfs in project graphhopper by graphhopper.
the class RealtimeIT method init.
@BeforeAll
public static void init() {
GraphHopperConfig ghConfig = new GraphHopperConfig();
ghConfig.putObject("gtfs.file", "files/sample-feed");
ghConfig.putObject("graph.location", GRAPH_LOC);
ghConfig.setProfiles(Arrays.asList(new Profile("foot").setVehicle("foot").setWeighting("fastest"), new Profile("car").setVehicle("car").setWeighting("fastest")));
Helper.removeDir(new File(GRAPH_LOC));
graphHopperGtfs = new GraphHopperGtfs(ghConfig);
graphHopperGtfs.init(ghConfig);
graphHopperGtfs.importOrLoad();
graphHopperGtfs.close();
// Re-load read only
graphHopperGtfs = new GraphHopperGtfs(ghConfig);
graphHopperGtfs.init(ghConfig);
graphHopperGtfs.importOrLoad();
graphHopperFactory = new PtRouterImpl.Factory(ghConfig, new TranslationMap().doImport(), graphHopperGtfs.getGraphHopperStorage(), graphHopperGtfs.getLocationIndex(), graphHopperGtfs.getGtfsStorage());
}
Aggregations