Ignore:
Timestamp:
2015-12-31T16:37:24+01:00 (8 years ago)
Author:
Don-vip
Message:

fix javadoc errors/warnings

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r9227 r9230  
    437437    /**
    438438     * Sets whether not to set header {@code Connection=close}
    439      * <p/>
     439     * <p>
    440440     * This might fix #7640, see
    441441     * <a href='https://web.archive.org/web/20140118201501/http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive'>here</a>.
  • trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java

    r9062 r9230  
    1212import org.openstreetmap.josm.data.Bounds;
    1313import org.openstreetmap.josm.data.coor.LatLon;
     14import org.openstreetmap.josm.data.projection.Ellipsoid;
    1415
    1516public final class OsmUrlToBounds {
     
    188189    }
    189190
    190     /** radius of the earth */
    191     public static final double R = 6378137.0;
    192 
    193191    public static Bounds positionToBounds(final double lat, final double lon, final int zoom) {
    194192        int tileSizeInPixels = 256;
     
    207205            width = 640;
    208206        }
    209         double scale = (1 << zoom) * tileSizeInPixels / (2 * Math.PI * R);
     207        double scale = (1 << zoom) * tileSizeInPixels / (2 * Math.PI * Ellipsoid.WGS84.a);
    210208        double deltaX = width / 2.0 / scale;
    211209        double deltaY = height / 2.0 / scale;
    212         double x = Math.toRadians(lon) * R;
     210        double x = Math.toRadians(lon) * Ellipsoid.WGS84.a;
    213211        double y = mercatorY(lat);
    214         return new Bounds(invMercatorY(y - deltaY), Math.toDegrees(x - deltaX) / R, invMercatorY(y + deltaY), Math.toDegrees(x + deltaX) / R);
     212        return new Bounds(
     213                invMercatorY(y - deltaY), Math.toDegrees(x - deltaX) / Ellipsoid.WGS84.a,
     214                invMercatorY(y + deltaY), Math.toDegrees(x + deltaX) / Ellipsoid.WGS84.a);
    215215    }
    216216
    217217    public static double mercatorY(double lat) {
    218         return Math.log(Math.tan(Math.PI/4 + Math.toRadians(lat)/2)) * R;
     218        return Math.log(Math.tan(Math.PI/4 + Math.toRadians(lat)/2)) * Ellipsoid.WGS84.a;
    219219    }
    220220
    221221    public static double invMercatorY(double north) {
    222         return Math.toDegrees(Math.atan(Math.sinh(north / R)));
     222        return Math.toDegrees(Math.atan(Math.sinh(north / Ellipsoid.WGS84.a)));
    223223    }
    224224
Note: See TracChangeset for help on using the changeset viewer.