I’m using a local Graphhopper server, bathymetry data and a custom PostGIS reader for boat navigation. It worked with 2.4, but now in 3.2 and 4.0-pre2 it does not find the route.
I get “ConnectionNotFoundException: Connection between locations not found”. I confirmed with the debugger that the starting and ending points get snapped correctly.
I also visualized the graph and it looks fine. There are connecting edges between the starting and ending point.
I experimented with different values for prepare.min_network_size and index.high_resolution, but it did not solve the problem.
I am suspecting that there is an issue with edge flags or the profile. Edge flags are quite confusing for a newbie like me.
GraphHopper hopper = new GraphHopperPostGIS(dataSource); GraphHopperConfig graphHopperConfig = new GraphHopperConfig(); graphHopperConfig.putObject("graph.flag_encoders", "boat"); graphHopperConfig.putObject("prepare.min_network_size", 0); graphHopperConfig.putObject("index.high_resolution", 2000); graphHopperConfig.putObject("graph.location", workPath); graphHopperConfig.setProfiles(List.of( new Profile("my_boat") .setVehicle("boat").setWeighting("fastest"))); hopper.setFlagEncoderFactory(new BoatFlagEncoderFactory()); hopper.init(graphHopperConfig); hopper.clean(); hopper.importOrLoad();