Class HeadingResolver

java.lang.Object
com.graphhopper.routing.HeadingResolver

public class HeadingResolver extends Object
  • Constructor Details

    • HeadingResolver

      public HeadingResolver(Graph graph)
  • 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

      public HeadingResolver setTolerance(double tolerance)
      Sets the tolerance for getEdgesWithDifferentHeading(int, double) in degrees.