@Test public void testLatitudeToMetersY() { assertTrue(java.lang.Math.abs(MercatorProjection.latitudeToMetersY(0)) < 0.01); assertTrue(java.lang.Math.abs(MercatorProjection.latitudeToMetersY(45) - 5621521.486192066) < 0.01); assertTrue(java.lang.Math.abs(MercatorProjection.latitudeToMetersY(85.0511) - 20037471.20513706) < 0.01); assertTrue(java.lang.Math.abs(MercatorProjection.latitudeToMetersY(8.946573850543412) - 1000000.0) < 0.01); }
public static double latitudeToMetersY(double latitude) { return WGS84.EQUATORIALRADIUS * java.lang.Math.log(java.lang.Math.tan(java.lang.Math.PI / 4 + 0.5 * java.lang.Math.toRadians(latitude))); }
MercatorProjection { public static double latitudeToMetersY(double latitude) { return WGS84.EQUATORIALRADIUS * java.lang.Math.log(java.lang.Math.tan(java.lang.Math.PI / 4 + 0.5 * java.lang.Math.toRadians(latitude))); } }
MercatorProjection { public static double latitudeToMetersY(double latitude) { return WGS84.EQUATORIALRADIUS * java.lang.Math.log(java.lang.Math.tan(java.lang.Math.PI / 4 + 0.5 * java.lang.Math.toRadians(latitude))); } private  MercatorProjection(); }
MercatorProjection { public static double latitudeToMetersY(double latitude) { return WGS84.EQUATORIALRADIUS * java.lang.Math.log(java.lang.Math.tan(java.lang.Math.PI / 4 + 0.5 * java.lang.Math.toRadians(latitude))); } private  MercatorProjection(); static double longitudeToMetersX(double longitude); static double metersXToLongitude(double x); static double metersYToLatitude(double y); static double latitudeToMetersY(double latitude); static double calculateGroundResolution(double latitude, byte zoom); static double latitudeToPixelY(double latitude, byte zoom); static long latitudeToTileY(double latitude, byte zoom); static double longitudeToPixelX(double longitude, byte zoom); static long longitudeToTileX(double longitude, byte zoom); static double pixelXToLongitude(double pixelX, byte zoom); static long pixelXToTileX(double pixelX, byte zoom); static double tileXToPixelX(long tileX); static double tileYToPixelY(long tileY); static double pixelYToLatitude(double pixelY, byte zoom); static long pixelYToTileY(double pixelY, byte zoom); static double tileXToLongitude(long tileX, byte zoom); static double tileYToLatitude(long tileY, byte zoom); static double deltaLat(double deltaPixel, double lat, byte zoom); }
MercatorProjection { public static double latitudeToMetersY(double latitude) { return WGS84.EQUATORIALRADIUS * java.lang.Math.log(java.lang.Math.tan(java.lang.Math.PI / 4 + 0.5 * java.lang.Math.toRadians(latitude))); } private  MercatorProjection(); static double longitudeToMetersX(double longitude); static double metersXToLongitude(double x); static double metersYToLatitude(double y); static double latitudeToMetersY(double latitude); static double calculateGroundResolution(double latitude, byte zoom); static double latitudeToPixelY(double latitude, byte zoom); static long latitudeToTileY(double latitude, byte zoom); static double longitudeToPixelX(double longitude, byte zoom); static long longitudeToTileX(double longitude, byte zoom); static double pixelXToLongitude(double pixelX, byte zoom); static long pixelXToTileX(double pixelX, byte zoom); static double tileXToPixelX(long tileX); static double tileYToPixelY(long tileY); static double pixelYToLatitude(double pixelY, byte zoom); static long pixelYToTileY(double pixelY, byte zoom); static double tileXToLongitude(long tileX, byte zoom); static double tileYToLatitude(long tileY, byte zoom); static double deltaLat(double deltaPixel, double lat, byte zoom);  }