Package com.graphhopper.util
Class PathMerger
java.lang.Object
com.graphhopper.util.PathMerger
This class merges multiple
Path
objects into one continuous object that
can be used in the ResponsePath
. There will be a Path between every waypoint.
So for two waypoints there will be only one Path object. For three waypoints there will be
two Path objects.
The instructions are generated per Path object and are merged into one continuous InstructionList. The PointList per Path object are merged and optionally simplified.
- Author:
- Peter Karich, ratrun, Robin Boldt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoWork
(PointList waypoints, List<Path> paths, EncodedValueLookup evLookup, Translation tr) setCalcPoints
(boolean calcPoints) setEnableInstructions
(boolean enableInstructions) void
setFavoredHeading
(double favoredHeading) setPathDetailsBuilders
(PathDetailsBuilderFactory pathBuilderFactory, List<String> requestedPathDetails) setRamerDouglasPeucker
(RamerDouglasPeucker ramerDouglasPeucker) setSimplifyResponse
(boolean simplifyRes)
-
Constructor Details
-
PathMerger
-
-
Method Details
-
setCalcPoints
-
setRamerDouglasPeucker
-
setPathDetailsBuilders
public PathMerger setPathDetailsBuilders(PathDetailsBuilderFactory pathBuilderFactory, List<String> requestedPathDetails) -
setSimplifyResponse
-
setEnableInstructions
-
doWork
public ResponsePath doWork(PointList waypoints, List<Path> paths, EncodedValueLookup evLookup, Translation tr) -
setFavoredHeading
public void setFavoredHeading(double favoredHeading)
-