Esempio n. 1
0
  @Override
  public EdgeIteratorState getEdgeProps(int edgeId, int adjNode) {
    if (lg.isShortcut(edgeId))
      throw new IllegalStateException(
          "Do not fetch shortcuts from BaseGraph use the LevelGraph instead");

    return lg.getEdgeProps(edgeId, adjNode);
  }
Esempio n. 2
0
  @Override
  public EdgeExplorer createEdgeExplorer(final EdgeFilter filter) {
    if (filter == EdgeFilter.ALL_EDGES) return createEdgeExplorer();

    return lg.createEdgeExplorer(
        new EdgeFilter() {
          @Override
          public boolean accept(EdgeIteratorState edgeIterState) {
            if (((EdgeSkipIterator) edgeIterState).isShortcut()) return false;

            return filter.accept(edgeIterState);
          }
        });
  }
Esempio n. 3
0
  @Override
  public AllEdgesIterator getAllEdges() {
    final AllEdgesSkipIterator tmpIter = lg.getAllEdges();
    return new AllEdgesIterator() {
      @Override
      public int getCount() {
        return tmpIter.getCount();
      }

      @Override
      public boolean next() {
        while (tmpIter.next()) {
          if (!tmpIter.isShortcut()) {
            return true;
          }
        }
        return false;
      }

      @Override
      public int getEdge() {
        return tmpIter.getEdge();
      }

      @Override
      public int getBaseNode() {
        return tmpIter.getBaseNode();
      }

      @Override
      public int getAdjNode() {
        return tmpIter.getAdjNode();
      }

      @Override
      public PointList fetchWayGeometry(int type) {
        return tmpIter.fetchWayGeometry(type);
      }

      @Override
      public EdgeIteratorState setWayGeometry(PointList list) {
        return tmpIter.setWayGeometry(list);
      }

      @Override
      public double getDistance() {
        return tmpIter.getDistance();
      }

      @Override
      public EdgeIteratorState setDistance(double dist) {
        return tmpIter.setDistance(dist);
      }

      @Override
      public long getFlags() {
        return tmpIter.getFlags();
      }

      @Override
      public EdgeIteratorState setFlags(long flags) {
        return tmpIter.setFlags(flags);
      }

      @Override
      public String getName() {
        return tmpIter.getName();
      }

      @Override
      public EdgeIteratorState setName(String name) {
        return tmpIter.setName(name);
      }

      @Override
      public boolean getBoolean(int key, boolean reverse, boolean _default) {
        return tmpIter.getBoolean(key, reverse, _default);
      }

      @Override
      public int getAdditionalField() {
        return tmpIter.getAdditionalField();
      }

      @Override
      public EdgeIteratorState setAdditionalField(int value) {
        return tmpIter.setAdditionalField(value);
      }

      @Override
      public EdgeIteratorState copyPropertiesTo(EdgeIteratorState edge) {
        return tmpIter.copyPropertiesTo(edge);
      }

      @Override
      public EdgeIteratorState detach(boolean reverse) {
        return tmpIter.detach(reverse);
      }
    };
  }
Esempio n. 4
0
 @Override
 public EdgeIteratorState edge(int a, int b, double distance, boolean bothDirections) {
   return lg.edge(a, b, distance, bothDirections);
 }
Esempio n. 5
0
 @Override
 public EdgeIteratorState edge(int a, int b) {
   return lg.edge(a, b);
 }
Esempio n. 6
0
 @Override
 public BBox getBounds() {
   return lg.getBounds();
 }
Esempio n. 7
0
 @Override
 public NodeAccess getNodeAccess() {
   return lg.getNodeAccess();
 }
Esempio n. 8
0
 @Override
 public int getNodes() {
   return lg.getNodes();
 }
Esempio n. 9
0
 @Override
 public GraphExtension getExtension() {
   return lg.getExtension();
 }
Esempio n. 10
0
 @Override
 public EdgeExplorer createEdgeExplorer() {
   return lg.createEdgeExplorer(NO_SHORTCUTS);
 }