Examples of StopSequence


Examples of org.onebusaway.transit_data_federation.model.StopSequence

   *
   * @param stopSequences
   */
  private void pruneEmptyStopSequences(List<StopSequence> stopSequences) {
    for (Iterator<StopSequence> it = stopSequences.iterator(); it.hasNext();) {
      StopSequence st = it.next();
      if (st.getStops().isEmpty())
        it.remove();
    }
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.model.StopSequence

        BlockTripEntry prevTrip = trip.getPreviousTrip();

        if (prevTrip == null)
          continue;

        StopSequence prevSequence = stopSequencesByTrip.get(prevTrip);

        // No continuations if incoming is not part of the sequence collection
        if (prevSequence == null)
          continue;

        // No continuation if it's the same stop sequence
        if (prevSequence.equals(sequence))
          continue;

        // No contination if the the block group ids don't match
        String prevGroupId = stopSequenceGroupIds.get(prevSequence);
        if (!groupId.equals(prevGroupId))
          continue;

        StopEntry prevStop = prevSequence.getStops().get(
            prevSequence.getStops().size() - 1);
        StopEntry nextStop = sequence.getStops().get(0);
        double d = SphericalGeometryLibrary.distance(prevStop.getStopLat(),
            prevStop.getStopLon(), nextStop.getStopLat(), nextStop.getStopLon());
        if (d < 5280 / 4) {
          /*
 
View Full Code Here

Examples of org.onebusaway.transit_data_federation.model.StopSequence

    List<StopSequence> sequences = new ArrayList<StopSequence>();

    for (Map.Entry<StopSequenceKey, List<BlockTripEntry>> entry : tripsByStopSequenceKey.entrySet()) {
      StopSequenceKey key = entry.getKey();
      StopSequence ss = new StopSequence();
      ss.setId(sequences.size());
      ss.setRoute(null);
      ss.setStops(key.getStops());
      if (!key.getDirectionId().equals(NO_DIRECTION_ID))
        ss.setDirectionId(key.getDirectionId());
      if (!key.getShapeId().equals(NO_SHAPE_ID))
        ss.setShapeId(key.getShapeId());
      ss.setTrips(entry.getValue());
      ss.setTripCount(entry.getValue().size());
      sequences.add(ss);
    }

    return sequences;
  }
View Full Code Here

Examples of utils.StopSequence

            BigInteger stopId = stopIdMap.get(gtfsStopTime.getStop().getId().toString());
            BigInteger tripId = tripIdMap.get(gtfsStopTime.getTrip().getId().toString());
           
            BigInteger stopTimeId = StopTime.nativeInsert(snapshotMerge.em(), gtfsStopTime, tripId, stopId);
           
            StopSequence stopSequence = new StopSequence(stopId, gtfsStopTime.getStopSequence());
           
            if(!tripStopTimeMap.containsKey(tripId))
              tripStopTimeMap.put(tripId, new ArrayList<StopSequence>());
           
            tripStopTimeMap.get(tripId).add(stopSequence);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.