Package org.onebusaway.transit_data_federation.services.tripplanner

Examples of org.onebusaway.transit_data_federation.services.tripplanner.StopTransfer


    StopEntry to = getToStop();

    if (from == to)
      return 0;

    StopTransfer transfer = _reverse ? findForwardTransfer(to, from)
        : findForwardTransfer(from, to);

    /**
     * No transfer found, even though we expected one
     */
 
View Full Code Here


  public static void addTransfer(StopEntryImpl from, StopEntryImpl to) {

    double distance = SphericalGeometryLibrary.distance(from.getStopLocation(),
        to.getStopLocation());
    StopTransfer transfer = new StopTransfer(to, 0, distance);

    List<StopTransfer> transfers = new ArrayList<StopTransfer>();
    StopTransfers existing = from.getTransfers();
    if (existing != null && existing.getTransfersFromStop() != null)
      transfers.addAll(existing.getTransfersFromStop());
View Full Code Here

    stops = new StopEntry[n];
    minTravelTimes = new int[n];
    distances = new double[n];

    for (int i = 0; i < n; i++) {
      StopTransfer stopTransfer = stopTransfers.get(i);
      stops[i] = stopTransfer.getStop();
      minTravelTimes[i] = stopTransfer.getMinTransferTime();
      distances[i] = stopTransfer.getDistance();
    }
  }
View Full Code Here

  @Override
  public StopTransfer get(int index) {
    StopEntry stop = stops[index];
    int minTravelTime = minTravelTimes[index];
    double distance = distances[index];
    return new StopTransfer(stop, minTravelTime, distance);
  }
View Full Code Here

      StopEntry targetStop = _transitGraphDao.getStopEntryForId(targetStopId);
      if (targetStop == null) {
        _log.warn("unkown stop: " + targetStopId);
        continue;
      }
      StopTransfer transfer = new StopTransfer(targetStop,
          data.getMinTransferTime(), data.getDistance());

      transfers.add(transfer);
    }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.tripplanner.StopTransfer

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.