Package org.onebusaway.geospatial.model

Examples of org.onebusaway.geospatial.model.CoordinatePoint


      Date time, boolean isOrigin) {

    double initialRadius = Math.min(_walkSearchInitialRadius,
        options.maxWalkDistance);

    CoordinatePoint location = new CoordinatePoint(v.getY(), v.getX());

    for (double radius = initialRadius; radius < _walkSearchMaxRadius; radius += _walkSearchStep) {

      CoordinateBounds bounds = SphericalGeometryLibrary.bounds(location,
          radius);
View Full Code Here


    ShapePointsLibrary spl = new ShapePointsLibrary();
    List<XYPoint> projectedShapePoints = spl.getProjectedShapePoints(
        shapePoints, projection);

    XYPoint stopPoint = projection.forward(new CoordinatePoint(
        47.664922340500475, -122.29066873484038));

    double[] distanceAlongShape = {0.0, 405.7, 814.0};
    List<PointAndIndex> assignments = spl.computePotentialAssignments(
        projectedShapePoints, distanceAlongShape, stopPoint, 0, 3);
View Full Code Here

    bean.setServiceDate(serviceDate);
    bean.setTotalDistanceAlongBlock(block.getTotalBlockDistance());

    bean.setInService(blockLocation.isInService());

    CoordinatePoint location = blockLocation.getLocation();
    bean.setLocation(location);

    bean.setScheduledDistanceAlongBlock(blockLocation.getScheduledDistanceAlongBlock());
    bean.setDistanceAlongBlock(blockLocation.getDistanceAlongBlock());
   
View Full Code Here

    if (bean.getPhase() != null)
      r.setPhase(EVehiclePhase.valueOf(bean.getPhase().toUpperCase()));
    r.setStatus(bean.getStatus());

    CoordinatePoint p = bean.getCurrentLocation();
    if (p != null) {
      r.setCurrentLocationLat(p.getLat());
      r.setCurrentLocationLon(p.getLon());
    }

    if (bean.isCurrentOrientationSet())
      r.setCurrentOrientation(bean.getCurrentOrientation());
    if (bean.isDistanceAlongBlockSet())
View Full Code Here

      bean.setPhase(phase.toLabel());

    bean.setStatus(record.getStatus());

    if (record.isCurrentLocationSet())
      bean.setLocation(new CoordinatePoint(record.getCurrentLocationLat(),
          record.getCurrentLocationLon()));

    bean.setVehicleId(AgencyAndIdLibrary.convertToString(record.getVehicleId()));

    TripDetailsBean details = _tripDetailsBeanService.getTripForVehicle(
View Full Code Here

    if (record.getPhase() != null)
      bean.setPhase(record.getPhase().toLabel());

    if (record.isCurrentLocationSet()) {
      CoordinatePoint location = new CoordinatePoint(
          record.getCurrentLocationLat(), record.getCurrentLocationLon());
      bean.setCurrentLocation(location);
    }
    if (record.isCurrentOrientationSet())
      bean.setCurrentOrientation(record.getCurrentOrientation());
View Full Code Here

    VehicleLocationRecordBean bean = new VehicleLocationRecordBean();
    bean.setBlockId(AgencyAndIdLibrary.convertToString(record.getBlockId()));
    if (record.getPhase() != null)
      bean.setPhase(record.getPhase().toLabel());
    CoordinatePoint location = record.getLocation();
    if (location != null)
      bean.setCurrentLocation(location);
    if (record.getOrientation() != null)
      bean.setCurrentOrientation(record.getOrientation());
    if (record.getDistanceAlongBlock() != null)
View Full Code Here

      BlockLocation record) {
    VehicleLocationRecordBean bean = new VehicleLocationRecordBean();
    bean.setBlockId(AgencyAndIdLibrary.convertToString(record.getBlockInstance().getBlock().getBlock().getId()));
    if (record.getPhase() != null)
      bean.setPhase(record.getPhase().toLabel());
    CoordinatePoint location = record.getLocation();
    if (location != null)
      bean.setCurrentLocation(location);

    if (record.isOrientationSet())
      bean.setCurrentOrientation(record.getOrientation());
View Full Code Here

    return m.getMinElement();
  }

  @Override
  public CoordinatePoint getPoint(ShapePoints points) {
    return new CoordinatePoint(_lat, _lon);
  }
View Full Code Here

    double[] lats = points.getLats();
    double[] lons = points.getLons();
    double[] dist = points.getDistTraveled();

    if (index == 0)
      return new CoordinatePoint(lats[0], lons[0]);
    if (index == n)
      return new CoordinatePoint(lats[n - 1], lons[n - 1]);

    if (dist[index] == dist[index - 1])
      return new CoordinatePoint(lats[n - 1], lons[n - 1]);

    double ratio = (_shapeDistanceTraveled - dist[index - 1])
        / (dist[index] - dist[index - 1]);
    double lat = ratio * (lats[index] - lats[index - 1]) + lats[index - 1];
    double lon = ratio * (lons[index] - lons[index - 1]) + lons[index - 1];
    return new CoordinatePoint(lat, lon);
  }
View Full Code Here

TOP

Related Classes of org.onebusaway.geospatial.model.CoordinatePoint

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.