Package org.onebusaway.geospatial.model

Examples of org.onebusaway.geospatial.model.XYPoint


   */
  public static CoordinatePoint projectPointToSegmentAppropximate(
      CoordinatePoint point, CoordinatePoint segmentStart,
      CoordinatePoint segmentEnd) {

    XYPoint pPoint = new XYPoint(point.getLon(), point.getLat());
    XYPoint pSegmentStart = new XYPoint(segmentStart.getLon(),
        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 XYPoint forward(CoordinatePoint point) {
    Point2D.Double from = new Point2D.Double(point.getLon(), point.getLat());
    Point2D.Double result = new Point2D.Double();
    result = _projection.transform(from, result);
    return new XYPoint(result.x, result.y);
  }
View Full Code Here

TOP

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

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.