Package com.graphhopper.routing
Class HeadingResolver
java.lang.Object
com.graphhopper.routing.HeadingResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.carrotsearch.hppc.IntArrayList
getEdgesWithDifferentHeading
(int baseNode, double heading) Returns a list of edge IDs of edges adjacent to the given base node that do *not* have the same or a similar heading as the given heading.setTolerance
(double tolerance) Sets the tolerance forgetEdgesWithDifferentHeading(int, double)
in degrees.
-
Constructor Details
-
HeadingResolver
-
-
Method Details
-
getEdgesWithDifferentHeading
public com.carrotsearch.hppc.IntArrayList getEdgesWithDifferentHeading(int baseNode, double heading) Returns a list of edge IDs of edges adjacent to the given base node that do *not* have the same or a similar heading as the given heading. If for example the tolerance is 45 degrees this method returns all edges for which the absolute difference to the given heading is greater than 45 degrees. The heading of an edge is defined as the direction of the first segment of an edge (adjacent and facing away from the base node).- Parameters:
heading
- north based azimuth, between 0 and 360 degrees- See Also:
-
setTolerance
Sets the tolerance forgetEdgesWithDifferentHeading(int, double)
in degrees.
-