/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(Point2D pt) { setLocation(pt.getX(), pt.getY()); }
/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(Point2D pt) { setLocation(pt.getX(), pt.getY()); }
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl xy) { double lam = Math.toRadians( latlon.getLongitude() - lon0); double phi = Math.toRadians( latlon.getLatitude()); if (earth.isSpherical()) { xy.setLocation(scaleFactor * lam, Math.sin(phi) / scaleFactor); } else { xy.setLocation(scaleFactor * lam, .5 * MapMath.qsfn(Math.sin(phi), e, one_es) / scaleFactor); } xy.setLocation(totalScale * xy.getX() + falseEasting, totalScale * xy.getY() + falseNorthing); return xy; }
public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl xy) { double lam = Math.toRadians( latlon.getLongitude() - lon0); double phi = Math.toRadians( latlon.getLatitude()); if (earth.isSpherical()) { xy.setLocation(scaleFactor * lam, Math.sin(phi) / scaleFactor); } else { xy.setLocation(scaleFactor * lam, .5 * MapMath.qsfn(Math.sin(phi), e, one_es) / scaleFactor); } xy.setLocation(totalScale * xy.getX() + falseEasting, totalScale * xy.getY() + falseNorthing); return xy; }
/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(ProjectionPoint pt) { setLocation(pt.getX(), pt.getY()); }
/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(ProjectionPoint pt) { setLocation(pt.getX(), pt.getY()); }
/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(ProjectionPoint pt) { setLocation(pt.getX(), pt.getY()); }
/** * set x,y location from pt * * @param pt point to use for values */ public void setLocation(ProjectionPoint pt) { setLocation(pt.getX(), pt.getY()); }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = Math.toRadians(latLon.getLongitude()); if (projectionLongitude != 0) { theta = MapMath.normalizeLongitude(theta-projectionLongitude); } Point2D.Double res = project(theta, fromLat, new Point2D.Double()); destPoint.setLocation(totalScale * res.x + falseEasting, totalScale * res.y + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = Math.toRadians(latLon.getLongitude()); if (projectionLongitude != 0) { theta = MapMath.normalizeLongitude(theta - projectionLongitude); } Point2D.Double res = project(theta, fromLat, new Point2D.Double()); destPoint.setLocation(totalScale * res.x + falseEasting, totalScale * res.y + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = computeTheta(latLon.getLongitude()); //System.err.println(Math.toDegrees(theta) + " " + Math.toDegrees(fromLat)); Point2D.Double res = project(theta, fromLat, new Point2D.Double()); destPoint.setLocation(totalScale * res.x + falseEasting, totalScale * res.y + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = computeTheta(latLon.getLongitude()); Point2D.Double res = project(theta, fromLat, new Point2D.Double()); destPoint.setLocation(totalScale * res.x + falseEasting, totalScale * res.y + falseNorthing); return destPoint; }
/** * Convert a LatLonPoint to projection coordinates * * @param latlon convert from these lat, lon coordinates * @param result the object to write to * @return the given result */ public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl result) { result.setLocation(LatLonPointImpl.lonNormal(latlon.getLongitude(), centerLon), latlon.getLatitude()); return result; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) { double[] satCoords = navigation.earthToSat(latlon.getLongitude(), latlon.getLatitude()); double x = satCoords[0]; double y = satCoords[1]; // scale back to required units of x, y (we need them in radians) if (isGeoCoordinateScaled) x = x * geoCoordinateScaleFactor; destPoint.setLocation(satCoords[0], satCoords[1]); return destPoint; }
/** * Convert a LatLonPoint to projection coordinates * * @param latlon convert from these lat, lon coordinates * @param result the object to write to * @return the given result */ public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl result) { result.setLocation(LatLonPointImpl.lonNormal(latlon.getLongitude(), centerLon), latlon.getLatitude()); return result; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl destPoint) { double[] satCoords = navigation.earthToSat(latlon.getLongitude(), latlon.getLatitude()); destPoint.setLocation(satCoords[0], satCoords[1]); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = Math.toRadians(latLon.getLongitude()); if (projectionLongitude != 0) { theta = MapMath.normalizeLongitude(theta - projectionLongitude); } ProjectionPoint res = project(theta, fromLat, new ProjectionPointImpl()); destPoint.setLocation(totalScale * res.getX() + falseEasting, totalScale * res.getY() + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = Math.toRadians(latLon.getLongitude()); if (projectionLongitude != 0) { theta = MapMath.normalizeLongitude(theta - projectionLongitude); } ProjectionPoint res = project(theta, fromLat, new ProjectionPointImpl()); destPoint.setLocation(totalScale * res.getX() + falseEasting, totalScale * res.getY() + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = computeTheta(latLon.getLongitude()); //System.err.println(Math.toDegrees(theta) + " " + Math.toDegrees(fromLat)); ProjectionPoint res = project(theta, fromLat, new ProjectionPointImpl()); destPoint.setLocation(totalScale * res.getX() + falseEasting, totalScale * res.getY() + falseNorthing); return destPoint; }
@Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl destPoint) { double fromLat = Math.toRadians(latLon.getLatitude()); double theta = computeTheta(latLon.getLongitude()); //System.err.println(Math.toDegrees(theta) + " " + Math.toDegrees(fromLat)); ProjectionPoint res = project(theta, fromLat, new ProjectionPointImpl()); destPoint.setLocation(totalScale * res.getX() + falseEasting, totalScale * res.getY() + falseNorthing); return destPoint; }