public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPointImpl ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n",ll.getLatitude(), ll.getLongitude()); assert closeEnough(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert closeEnough(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPointImpl ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n", ll.getLatitude(), ll.getLongitude()); assert Misc.closeEnough(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert Misc.closeEnough(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPoint ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n", ll.getLatitude(), ll.getLongitude()); assert Misc.closeEnough(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert Misc.closeEnough(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPoint ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n", ll.getLatitude(), ll.getLongitude()); assert Misc.nearlyEquals(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert Misc.nearlyEquals(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
LatLonPoint endL = proj.projToLatLon(p);
private void testProjectionUTM(double lat, double lon) { LatLonPointImpl startL = new LatLonPointImpl(); startL.setLatitude(lat); startL.setLongitude(lon); int zone = (int) ((lon + 183) / 6); UtmProjection proj = new UtmProjection(zone, lat >= 0.0); ProjectionPoint p = proj.latLonToProj(startL); LatLonPoint endL = proj.projToLatLon(p); if (show) { System.out.println("startL = " + startL); System.out.println("inter = " + p); System.out.println("endL = " + endL); } Assert.assertEquals(startL.toString(8), startL.getLatitude(), endL.getLatitude(), 1.3e-4); Assert.assertEquals(startL.toString(8), startL.getLongitude(), endL.getLongitude(), 1.3e-4); }