use of org.onebusaway.geospatial.model.XYPoint in project onebusaway-application-modules by camsys.
the class ProjectedPointFactory method forward.
public static ProjectedPoint forward(CoordinatePoint latlon, int zone) {
UTMProjection projection = new UTMProjection(zone);
XYPoint point = projection.forward(latlon);
return new ProjectedPoint(latlon.getLat(), latlon.getLon(), point.getX(), point.getY(), zone);
}
use of org.onebusaway.geospatial.model.XYPoint in project onebusaway-application-modules by camsys.
the class ProjectedPointFactory method reverse.
public static ProjectedPoint reverse(double x, double y, int srid) {
UTMProjection projection = new UTMProjection(srid);
XYPoint p = new XYPoint(x, y);
CoordinatePoint latlon = projection.reverse(p);
return new ProjectedPoint(latlon.getLat(), latlon.getLon(), x, y, srid);
}
Aggregations