Examples of StopEntryImpl


Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    for (int i = 0; i < stopTimePoints.length; i++) {
      PointAndIndex pindex = bestAssignment.get(i);
      if (pindex.distanceAlongShape > maxDistanceTraveled) {
        int index = projectedShapePoints.size() - 1;
        XYPoint point = projectedShapePoints.get(index);
        StopEntryImpl stop = stopTimes.get(i).getStop();
        XYPoint stopPoint = projection.forward(stop.getStopLocation());
        double d = stopPoint.getDistance(point);
        pindex = new PointAndIndex(point, index, d, maxDistanceTraveled);
      }
      stopTimePoints[i] = pindex;
    }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    List<List<PointAndIndex>> possibleAssignments = new ArrayList<List<PointAndIndex>>();

    for (StopTimeEntryImpl stopTime : stopTimes) {

      StopEntryImpl stop = stopTime.getStop();
      XYPoint stopPoint = projection.forward(stop.getStopLocation());

      List<PointAndIndex> assignments = _shapePointsLibrary.computePotentialAssignments(
          projectedShapePoints, shapePointDistance, stopPoint, 0,
          projectedShapePoints.size());
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

        _log.warn("snapping first stop time id=" + firstStopTime.getId()
            + " to start of shape");

        XYPoint point = projectedShapePoints.get(0);

        StopEntryImpl stop = firstStopTime.getStop();
        XYPoint stopPoint = projection.forward(stop.getStopLocation());

        double d = stopPoint.getDistance(point);

        possibleAssignments.get(0).add(new PointAndIndex(point, 0, d, 0.0));
      }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    double prevMaxDistanceAlongShape = Double.NEGATIVE_INFINITY;

    for (List<PointAndIndex> possible : possibleAssignments) {
      StopTimeEntryImpl stopTime = stopTimes.get(index);
      StopEntryImpl stop = stopTime.getStop();
      b.append(stop.getStopLat());
      b.append(' ');
      b.append(stop.getStopLon());
      b.append(' ');
      b.append(index);
      b.append(' ');
      b.append(stop.getId());
      b.append('\n');

      double maxDistanceAlongShape = Double.NEGATIVE_INFINITY;
      double minDistanceAlongShape = Double.POSITIVE_INFINITY;
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

  }

  @Test
  public void testWithShapeInfo() {

    StopEntryImpl stopA = stop("a", 47.5, -122.5);
    StopEntryImpl stopB = stop("b", 47.6, -122.4);
    StopEntryImpl stopC = stop("c", 47.5, -122.3);

    BlockEntryImpl block = block("block");

    TripEntryImpl tripA = trip("tripA", "serviceId");
    TripEntryImpl tripB = trip("tripB", "serviceId");
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

  }

  @Test
  public void test04() {

    StopEntryImpl fromStop = stop("stopA", 47.0, -122.0);
    StopEntryImpl toStop = stop("stopB", 47.0, -122.0);

    TripEntryImpl trip1A = trip("1A", "sA");
    TripEntryImpl trip1B = trip("1B", "sA");
    TripEntryImpl trip1C = trip("1C", "sA");
    TripEntryImpl trip1D = trip("1D", "sA");
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    ServiceIdActivation ids_A_not_B = serviceIds(lsids("sidA"), lsids("sidB"));
    ServiceIdActivation ids_B_not_A = serviceIds(lsids("sidB"), lsids("sidA"));
    ServiceIdActivation ids_A_and_B = serviceIds(lsids("sidA", "sidB"), lsids());

    StopEntryImpl stopA = stop("stopA", 0.0, 0.0);
    StopEntryImpl stopB = stop("stopB", 0.0, 0.0);

    BlockEntryImpl blockA = block("blockA");
    TripEntryImpl tripA = trip("tripA", "sidA");
    TripEntryImpl tripB = trip("tripB", "sidB");
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    for (StopEntry stop : _transitGraphDao.getAllStops()) {

      List<StopHop> hopsFromStop = allHopsFromStop.get(stop);
      List<StopHop> hopsToStop = allHopsToStop.get(stop);

      StopEntryImpl stopEntry = (StopEntryImpl) stop;
      stopEntry.setHops(new StopHops(hopsFromStop, hopsToStop));
    }
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    return minTravelTimes;
  }

  @Override
  public List<StopHop> getHopsFromStop(StopEntry stop) {
    StopEntryImpl impl = (StopEntryImpl) stop;
    StopHops hops = impl.getHops();
    if (hops == null || hops.getHopsFromStop() == null)
      return EMPTY_HOPS;
    return hops.getHopsFromStop();
  }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.impl.transit_graph.StopEntryImpl

    return hops.getHopsFromStop();
  }

  @Override
  public List<StopHop> getHopsToStop(StopEntry stop) {
    StopEntryImpl impl = (StopEntryImpl) stop;
    StopHops hops = impl.getHops();
    if (hops == null || hops.getHopsToStop() == null)
      return EMPTY_HOPS;
    return hops.getHopsToStop();
  }
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.