@Test public void directRouteTest() { GHRequest ghRequest = new GHRequest(49.41281601436809, 8.686215877532959, 49.410163456220076, 8.687160015106201); GHResponse ghResponse = new ORSGraphHopper().constructFreeHandRoute(ghRequest); Assert.assertTrue(ghResponse.getHints().has("skipped_segment")); Assert.assertTrue(ghResponse.getHints().getBool("skipped_segment", false)); Assert.assertEquals(1, ghResponse.getAll().size()); PathWrapper directRouteWrapper = ghResponse.getAll().get(0); Assert.assertEquals(0, directRouteWrapper.getErrors().size()); Assert.assertEquals(0, directRouteWrapper.getDescription().size()); Assert.assertEquals(309.892f, directRouteWrapper.getDistance(), 3); Assert.assertEquals(0.0, directRouteWrapper.getAscend(), 0); Assert.assertEquals(0.0, directRouteWrapper.getDescend(), 0); Assert.assertEquals(0.0, directRouteWrapper.getRouteWeight(), 0); Assert.assertEquals(0, directRouteWrapper.getTime()); Assert.assertEquals("", directRouteWrapper.getDebugInfo()); Assert.assertEquals(2, directRouteWrapper.getInstructions().size()); Assert.assertEquals(1, directRouteWrapper.getInstructions().get(0).getPoints().size()); Assert.assertEquals(0, directRouteWrapper.getNumChanges()); Assert.assertEquals(0, directRouteWrapper.getLegs().size()); Assert.assertEquals(0, directRouteWrapper.getPathDetails().size()); Assert.assertNull(directRouteWrapper.getFare()); Assert.assertFalse(directRouteWrapper.isImpossible()); checkInstructions(directRouteWrapper.getInstructions()); checkPointList(directRouteWrapper.getWaypoints()); checkPointList(directRouteWrapper.getPoints()); }
public GHResponse constructFreeHandRoute(GHRequest request) { LineString directRouteGeometry = constructFreeHandRouteGeometry(request); PathWrapper directRoutePathWrapper = constructFreeHandRoutePathWrapper(directRouteGeometry); GHResponse directRouteResponse = new GHResponse(); directRouteResponse.add(directRoutePathWrapper); directRouteResponse.getHints().put("skipped_segment", "true"); return directRouteResponse; }
ORSGraphHopper extends GraphHopper { public GHResponse constructFreeHandRoute(GHRequest request) { LineString directRouteGeometry = constructFreeHandRouteGeometry(request); PathWrapper directRoutePathWrapper = constructFreeHandRoutePathWrapper(directRouteGeometry); GHResponse directRouteResponse = new GHResponse(); directRouteResponse.add(directRoutePathWrapper); directRouteResponse.getHints().put("skipped_segment", "true"); return directRouteResponse; } }
ORSGraphHopper extends GraphHopper { public GHResponse constructFreeHandRoute(GHRequest request) { LineString directRouteGeometry = constructFreeHandRouteGeometry(request); PathWrapper directRoutePathWrapper = constructFreeHandRoutePathWrapper(directRouteGeometry); GHResponse directRouteResponse = new GHResponse(); directRouteResponse.add(directRoutePathWrapper); directRouteResponse.getHints().put("skipped_segment", "true"); return directRouteResponse; } ORSGraphHopper(GraphProcessContext procCntx);  ORSGraphHopper(); }
ORSGraphHopper extends GraphHopper { public GHResponse constructFreeHandRoute(GHRequest request) { LineString directRouteGeometry = constructFreeHandRouteGeometry(request); PathWrapper directRoutePathWrapper = constructFreeHandRoutePathWrapper(directRouteGeometry); GHResponse directRouteResponse = new GHResponse(); directRouteResponse.add(directRoutePathWrapper); directRouteResponse.getHints().put("skipped_segment", "true"); return directRouteResponse; } ORSGraphHopper(GraphProcessContext procCntx);  ORSGraphHopper(); @Override GraphHopper init(CmdArgs args); @SuppressWarnings("unchecked") @Override GraphHopper importOrLoad(); @Override List<Path> calcPaths(GHRequest request, GHResponse ghRsp); RouteSegmentInfo getRouteSegment(double[] latitudes, double[] longitudes, String vehicle); GHResponse constructFreeHandRoute(GHRequest request); HashMap<Integer, Long> getTmcGraphEdges(); HashMap<Long, ArrayList<Integer>> getOsmId2EdgeIds(); @Override void postProcessing(); GraphHopper setCoreEnabled(boolean enable); final boolean isCoreEnabled(); void initCoreAlgoFactoryDecorator(); final CoreAlgoFactoryDecorator getCoreFactoryDecorator(); GraphHopper setCoreLMEnabled(boolean enable); final boolean isCoreLMEnabled(); void initCoreLMAlgoFactoryDecorator(); final boolean isCHAvailable(String weighting); final boolean isLMAvailable(String weighting); final boolean isCoreAvailable(String weighting); final boolean isFastIsochroneAvailable(RouteSearchContext searchContext, TravelRangeType travelRangeType); final FastIsochroneFactory getFastIsochroneFactory(); Eccentricity getEccentricity(); }
ORSGraphHopper extends GraphHopper { public GHResponse constructFreeHandRoute(GHRequest request) { LineString directRouteGeometry = constructFreeHandRouteGeometry(request); PathWrapper directRoutePathWrapper = constructFreeHandRoutePathWrapper(directRouteGeometry); GHResponse directRouteResponse = new GHResponse(); directRouteResponse.add(directRoutePathWrapper); directRouteResponse.getHints().put("skipped_segment", "true"); return directRouteResponse; } ORSGraphHopper(GraphProcessContext procCntx);  ORSGraphHopper(); @Override GraphHopper init(CmdArgs args); @SuppressWarnings("unchecked") @Override GraphHopper importOrLoad(); @Override List<Path> calcPaths(GHRequest request, GHResponse ghRsp); RouteSegmentInfo getRouteSegment(double[] latitudes, double[] longitudes, String vehicle); GHResponse constructFreeHandRoute(GHRequest request); HashMap<Integer, Long> getTmcGraphEdges(); HashMap<Long, ArrayList<Integer>> getOsmId2EdgeIds(); @Override void postProcessing(); GraphHopper setCoreEnabled(boolean enable); final boolean isCoreEnabled(); void initCoreAlgoFactoryDecorator(); final CoreAlgoFactoryDecorator getCoreFactoryDecorator(); GraphHopper setCoreLMEnabled(boolean enable); final boolean isCoreLMEnabled(); void initCoreLMAlgoFactoryDecorator(); final boolean isCHAvailable(String weighting); final boolean isLMAvailable(String weighting); final boolean isCoreAvailable(String weighting); final boolean isFastIsochroneAvailable(RouteSearchContext searchContext, TravelRangeType travelRangeType); final FastIsochroneFactory getFastIsochroneFactory(); Eccentricity getEccentricity();  }