Package org.onebusaway.geospatial.model

Examples of org.onebusaway.geospatial.model.CoordinatePoint


  }

  public CoordinatePoint reversePoint(CoordinatePointV2Bean bean) {
    if (bean == null)
      return null;
    return new CoordinatePoint(bean.getLat(), bean.getLon());
  }
View Full Code Here


      }

      VehicleDescriptor.Builder vehicleDesc = vehiclePosition.getVehicleBuilder();
      vehicleDesc.setId(normalizeId(vehicle.getVehicleId()));

      CoordinatePoint location = vehicle.getLocation();
      if (location != null) {
        Position.Builder position = vehiclePosition.getPositionBuilder();
        position.setLatitude((float) location.getLat());
        position.setLongitude((float) location.getLon());
      }

      vehiclePosition.setTimestamp(vehicle.getLastUpdateTime() / 1000);
    }
  }
View Full Code Here

      double lon, double latSpan, double lonSpan) {
    return boundsFromLatLonOffset(lat, lon, latSpan / 2, lonSpan / 2);
  }

  public static CoordinatePoint getCenterOfBounds(CoordinateBounds b) {
    return new CoordinatePoint((b.getMinLat() + b.getMaxLat()) / 2,
        (b.getMinLon() + b.getMaxLon()) / 2);
  }
View Full Code Here

        segmentStart.getLat());
    XYPoint pSegmentEnd = new XYPoint(segmentEnd.getLon(), segmentEnd.getLat());

    XYPoint pResult = GeometryLibrary.projectPointToSegment(pPoint,
        pSegmentStart, pSegmentEnd);
    return new CoordinatePoint(pResult.getY(), pResult.getX());
  }
View Full Code Here

  public CoordinatePoint reverse(XYPoint point) {
    Point2D.Double from = new Point2D.Double(point.getX(), point.getY());
    Point2D.Double result = new Point2D.Double();
    _projection.inverseTransform(from, result);
    return new CoordinatePoint(result.y, result.x);
  }
View Full Code Here

    _stateEvents.fireModelChange(new StateEvent(new TripPlansState()));

    WebappServiceAsync service = WebappServiceAsync.SERVICE;

    LatLng fromPoint = getQueryLocation();
    CoordinatePoint from = new CoordinatePoint(fromPoint.getLatitude(),
        fromPoint.getLongitude());
    CoordinatePoint to = new CoordinatePoint(place.getLat(), place.getLon());
    long time = getQueryTime();
    TransitShedConstraintsBean constraints = getQueryConstraints();

    service.getTripsBetween(from, to, time, constraints.getConstraints(),
        new TripPlanHandler());
View Full Code Here

    @Override
    public void onSuccess(ListBean<TripDetailsBean> result) {

      for (final TripDetailsBean bean : result.getList()) {
        TripStatusBean status = bean.getStatus();
        CoordinatePoint position = status.getLocation();
        final LatLng point = LatLng.newInstance(position.getLat(),
            position.getLon());
        Marker marker = new Marker(point);

        _overlayManager.addOverlay(marker);

        marker.addMarkerClickHandler(new MarkerClickHandler() {
View Full Code Here

        ConstraintsBean c = constraints.getConstraints();
        WebappServiceAsync service = WebappServiceAsync.SERVICE;

        int timeSegmentSize = (c.getMaxTripDuration() 600);

        CoordinatePoint p = new CoordinatePoint(location.getLatitude(),
            location.getLongitude());
        service.getMinTravelTimeToStopsFrom(p, time, constraints,
            timeSegmentSize, _minTransitTimeResultHandler);
      }
    }
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.