Package org.onebusaway.uk.network_rail.gtfs_realtime.model

Examples of org.onebusaway.uk.network_rail.gtfs_realtime.model.StationLocation


    double xTotal = 0;
    double yTotal = 0;
    int count = 0;

    for (String tiploc : getTiplocsForStanox(stanox)) {
      StationLocation stationLocation = getStationLocationForTiploc(tiploc);
      if (stationLocation != null) {
        xTotal += stationLocation.getX();
        yTotal += stationLocation.getY();
        count++;
        continue;
      }
      StationElement stationElement = getStationForTiploc(tiploc);
      if (stationElement != null) {
View Full Code Here


    BufferedReader reader = new BufferedReader(new FileReader(path));
    CsvEntityReader csvEntityReader = new CsvEntityReader();
    csvEntityReader.addEntityHandler(new EntityHandler() {
      @Override
      public void handleEntity(Object bean) {
        StationLocation stationLocation = (StationLocation) bean;
        Point2D.Double xy = ProjectionSupport.convertFromLatLon(
            stationLocation.getLat(), stationLocation.getLon());
        stationLocation.setX(xy.x);
        stationLocation.setY(xy.y);
        _stationLocationsByTiploc.put(stationLocation.getTiploc(),
            stationLocation);
      }
    });
    csvEntityReader.readEntities(StationLocation.class, reader);
    reader.close();
View Full Code Here

TOP

Related Classes of org.onebusaway.uk.network_rail.gtfs_realtime.model.StationLocation

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.