Package org.opentripplanner.routing.core

Examples of org.opentripplanner.routing.core.GraphVertex


       ****/

      WalkToStopVertex walkToStopVertex = new WalkToStopVertex(context, stop);

      if (linker.determineIncomingEdgesForVertex(walkToStopVertex, true)) {
        GraphVertex gv = graph.getGraphVertex(walkToStopVertex.getLabel());
        WaitingBeginsAtStopEdge edge = new WaitingBeginsAtStopEdge(context,
            stop, false);
        edge.setFromVertex(walkToStopVertex);
        gv.addOutgoing(edge);
      } else {
        _log.warn("error linking stop: " + stop.getId() + " to street network");
      }

      /****
       * Add stop-to-street edges
       ****/

      WalkFromStopVertex walkFromStopVertex = new WalkFromStopVertex(context,
          stop);

      if (linker.determineOutgoingEdgesForVertex(walkFromStopVertex, true)) {
        GraphVertex gv = graph.getGraphVertex(walkFromStopVertex.getLabel());
        WaitingEndsAtStopEdge edge = new WaitingEndsAtStopEdge(context, stop,
            true);
        edge.setToVertex(walkFromStopVertex);
        gv.addIncoming(edge);
      } else {
        _log.warn("error linking stop: " + stop.getId() + " to street network");
      }
    }

View Full Code Here


      if (vertex instanceof HasEdges) {
        HasEdges hasEdges = (HasEdges) vertex;
        edges = hasEdges.getOutgoing();
      } else {
        Graph graph = _graphService.getGraph();
        GraphVertex gv = graph.getGraphVertex(vertex.getLabel());
        if (gv != null)
          edges = gv.getOutgoing();
      }

      if (edges != null) {

        VertexBean from = getVertexAsBean(beansByVertex, vertex);
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.core.GraphVertex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.