Class RestrictionTopology

java.lang.Object
com.graphhopper.reader.osm.RestrictionTopology

public class RestrictionTopology extends Object
Basically an OSM restriction, but in 'graph-representation', i.e. it is expressed in terms of graph node/edge IDs instead of OSM way IDs. There can be via-node-restrictions (with a single via-node) and via-way/edge-restrictions (with one or more via-edges). There can also be multiple from- or to-edges to represent OSM restrictions like no_entry or no_exit that use multiple from- or to-members.

We store a list of via-nodes even for via-way restrictions. It stores the nodes connecting the via-ways, see WayToEdgeConverter.EdgeResult. For via-node restrictions the list simply contains the single via node.

This class only contains the 'topology' of the restriction. The RestrictionType is handled separately, because opposite to the type the topology does not depend on the vehicle type.

  • Method Details

    • node

      public static RestrictionTopology node(int fromEdge, int viaNode, int toEdge)
    • node

      public static RestrictionTopology node(com.carrotsearch.hppc.IntArrayList fromEdges, int viaNode, com.carrotsearch.hppc.IntArrayList toEdges)
    • way

      public static RestrictionTopology way(int fromEdge, int viaEdge, int toEdge, com.carrotsearch.hppc.IntArrayList viaNodes)
    • way

      public static RestrictionTopology way(int fromEdge, com.carrotsearch.hppc.IntArrayList viaEdges, int toEdge, com.carrotsearch.hppc.IntArrayList viaNodes)
    • way

      public static RestrictionTopology way(com.carrotsearch.hppc.IntArrayList fromEdges, com.carrotsearch.hppc.IntArrayList viaEdges, com.carrotsearch.hppc.IntArrayList toEdges, com.carrotsearch.hppc.IntArrayList viaNodes)
    • isViaWayRestriction

      public boolean isViaWayRestriction()
    • getViaNodes

      public com.carrotsearch.hppc.IntArrayList getViaNodes()
    • getFromEdges

      public com.carrotsearch.hppc.IntArrayList getFromEdges()
    • getViaEdges

      public com.carrotsearch.hppc.IntArrayList getViaEdges()
    • getToEdges

      public com.carrotsearch.hppc.IntArrayList getToEdges()