Class RestrictionSetter

java.lang.Object
com.graphhopper.routing.util.parsers.RestrictionSetter

public class RestrictionSetter extends Object
Used to add via-node and via-edge restrictions to a given graph. Via-edge restrictions are realized by augmenting the graph with artificial edges. For proper handling of overlapping turn restrictions (turn restrictions that share the same via-edges) and turn restrictions for different encoded values it is important to add all restrictions with a single call.
  • Constructor Details

  • Method Details

    • createViaNodeRestriction

      public static RestrictionSetter.Restriction createViaNodeRestriction(int fromEdge, int viaNode, int toEdge)
    • createViaEdgeRestriction

      public static RestrictionSetter.Restriction createViaEdgeRestriction(com.carrotsearch.hppc.IntArrayList edges)
    • setRestrictions

      public void setRestrictions(List<RestrictionSetter.Restriction> restrictions, List<com.carrotsearch.hppc.BitSet> encBits)
    • copyEncBits

      public static com.carrotsearch.hppc.BitSet copyEncBits(com.carrotsearch.hppc.BitSet encBits)