public class PathMerger extends Object
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.
Constructor and Description |
---|
PathMerger(Graph graph,
Weighting weighting) |
Modifier and Type | Method and Description |
---|---|
void |
doWork(ResponsePath responsePath,
List<Path> paths,
EncodedValueLookup evLookup,
Translation tr) |
PathMerger |
setCalcPoints(boolean calcPoints) |
PathMerger |
setDouglasPeucker(DouglasPeucker douglasPeucker) |
PathMerger |
setEnableInstructions(boolean enableInstructions) |
void |
setFavoredHeading(double favoredHeading) |
PathMerger |
setPathDetailsBuilders(PathDetailsBuilderFactory pathBuilderFactory,
List<String> requestedPathDetails) |
PathMerger |
setSimplifyResponse(boolean simplifyRes) |
public PathMerger setCalcPoints(boolean calcPoints)
public PathMerger setDouglasPeucker(DouglasPeucker douglasPeucker)
public PathMerger setPathDetailsBuilders(PathDetailsBuilderFactory pathBuilderFactory, List<String> requestedPathDetails)
public PathMerger setSimplifyResponse(boolean simplifyRes)
public PathMerger setEnableInstructions(boolean enableInstructions)
public void doWork(ResponsePath responsePath, List<Path> paths, EncodedValueLookup evLookup, Translation tr)
public void setFavoredHeading(double favoredHeading)
Copyright © 2012–2020. All rights reserved.