Package org.onebusaway.transit_data_federation.services.transit_graph

Examples of org.onebusaway.transit_data_federation.services.transit_graph.StopEntry


        distanceTraveledSet = true;
      } catch (StopIsTooFarFromShapeException ex) {
        StopTimeEntry stopTime = ex.getStopTime();
        TripEntry trip = stopTime.getTrip();
        StopEntry stop = stopTime.getStop();
        AgencyAndId shapeId = trip.getShapeId();
        CoordinatePoint point = ex.getPoint();
        PointAndIndex pindex = ex.getPointAndIndex();

        _log.warn("Stop is too far from shape: trip=" + trip.getId() + " stop="
            + stop.getId() + " stopLat=" + stop.getStopLat() + " stopLon="
            + stop.getStopLon() + " shapeId=" + shapeId + " shapePoint="
            + point + " index=" + pindex.index + " distance="
            + pindex.distanceFromTarget);
      } catch (DistanceAlongShapeException ex) {
        _invalidStopToShapeMappingExceptionCount++;
      }
View Full Code Here


  @RequestMapping()
  public ModelAndView index(@RequestParam() String stopId) {

    AgencyAndId id = AgencyAndIdLibrary.convertFromString(stopId);
   
    StopEntry stop = _graphDao.getStopEntryForId(id);
    List<StopTransfer> transfers = _stopTransferService.getTransfersFromStop(stop);

    ModelAndView mv = new ModelAndView("transfers-for-stop.jspx");
    mv.addObject("transfers", transfers);
    return mv;
View Full Code Here

  private void printTransfers(
      Map<AgencyAndId, List<StopTransferData>> stopTransfers) {
    for (Map.Entry<AgencyAndId, List<StopTransferData>> entry : stopTransfers.entrySet()) {
      AgencyAndId stopFromId = entry.getKey();
      StopEntry stopFrom = _transitGraphDao.getStopEntryForId(stopFromId);
      List<StopTransferData> datas = entry.getValue();
      for (StopTransferData stopTransfer : datas) {
        AgencyAndId toStopId = stopTransfer.getStopId();
        StopEntry stopTo = _transitGraphDao.getStopEntryForId(toStopId);
        System.out.println(stopFrom.getStopLat() + "," + stopFrom.getStopLon()
            + "," + stopTo.getStopLat() + "," + stopTo.getStopLon());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.transit_graph.StopEntry

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.