toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0) + falseNorthing;
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale
toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b) + falseEasting; toY = scale
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double lon = Math.toRadians(fromLon); double lat = Math.toRadians(fromLat); double dlon = lon - lon0; double b = Math.cos(lat) * Math.sin(dlon); if ((Math.abs(Math.abs(b) - 1.0)) < TOLERANCE) { // infinite projection toX = Double.POSITIVE_INFINITY; toY = Double.POSITIVE_INFINITY; } else { toX = scale * SpecialMathFunction.atanh(b); toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0); } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double lon = Math.toRadians(fromLon); double lat = Math.toRadians(fromLat); double dlon = lon - lon0; double b = Math.cos(lat) * Math.sin(dlon); // infinite projection if ((Math.abs(Math.abs(b) - 1.0)) < TOLERANCE) { toX = 0.0; toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b); toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0); } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double lon = Math.toRadians(fromLon); double lat = Math.toRadians(fromLat); double dlon = lon - lon0; double b = Math.cos(lat) * Math.sin(dlon); // infinite projection if ((Math.abs(Math.abs(b) - 1.0)) < TOLERANCE) { toX = 0.0; toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b); toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0); } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double lon = Math.toRadians(fromLon); double lat = Math.toRadians(fromLat); double dlon = lon - lon0; double b = Math.cos(lat) * Math.sin(dlon); // infinite projection if ((Math.abs(Math.abs(b) - 1.0)) < TOLERANCE) { toX = 0.0; toY = 0.0; } else { toX = scale * SpecialMathFunction.atanh(b); toY = scale * (Math.atan2(Math.tan(lat), Math.cos(dlon)) - lat0); } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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 */ @Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double fromLat_r = Math.toRadians(fromLat); // infinite projection if ((Math.abs(90.0 - Math.abs(fromLat))) < TOLERANCE) { toX = Double.POSITIVE_INFINITY; toY = Double.POSITIVE_INFINITY; } else { toX = A * Math.toRadians(LatLonPointImpl.range180(fromLon - this.lon0)); toY = A * SpecialMathFunction.atanh(Math.sin(fromLat_r)); // p 41 Snyder } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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 */ @Override public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double fromLat_r = Math.toRadians(fromLat); // infinite projection if ((Math.abs(90.0 - Math.abs(fromLat))) < TOLERANCE) { toX = Double.POSITIVE_INFINITY; toY = Double.POSITIVE_INFINITY; } else { toX = A * Math.toRadians(LatLonPointImpl.range180(fromLon - this.lon0)); toY = A * SpecialMathFunction.atanh(Math.sin(fromLat_r)); // p 41 Snyder } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double fromLat_r = Math.toRadians(fromLat); // infinite projection if ((Math.abs(90.0 - Math.abs(fromLat))) < TOLERANCE) { toX = Double.POSITIVE_INFINITY; toY = Double.POSITIVE_INFINITY; } else { toX = A * Math.toRadians(LatLonPointImpl.range180(fromLon - this.lon0)); toY = A * SpecialMathFunction.atanh(Math.sin(fromLat_r)); // p 41 Snyder } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }
/** * 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) { double toX, toY; double fromLat = latLon.getLatitude(); double fromLon = latLon.getLongitude(); double fromLat_r = Math.toRadians(fromLat); // infinite projection if ((Math.abs(90.0 - Math.abs(fromLat))) < TOLERANCE) { toX = Double.POSITIVE_INFINITY; toY = Double.POSITIVE_INFINITY; } else { toX = A * Math.toRadians(LatLonPointImpl.range180(fromLon - this.lon0)); toY = A * SpecialMathFunction.atanh(Math.sin(fromLat_r)); // p 41 Snyder } result.setLocation(toX + falseEasting, toY + falseNorthing); return result; }