Package org.openstreetmap.josm.data.coor

Examples of org.openstreetmap.josm.data.coor.EastNorth.north()


            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
            if (debug) {
                System.out.println(en.east() - en2.east());
            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Grinson", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Grinson", Math.abs(en.north() - en2.north()) < 0.002);
        }
View Full Code Here


            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Grinson", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Grinson", Math.abs(en.north() - en2.north()) < 0.002);
        }

        {
            EastNorth en = new EastNorth(600000.0, 200000.0);
            LatLon ll = Main.getProjection().eastNorth2latlon(en);
View Full Code Here

            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
            if (debug) {
                System.out.println(en.east() - en2.east());
            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Berne", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Berne", Math.abs(en.north() - en2.north()) < 0.002);
        }
View Full Code Here

            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Berne", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Berne", Math.abs(en.north() - en2.north()) < 0.002);
        }

        {
            EastNorth en = new EastNorth(700000.0, 100000.0);
            LatLon ll = Main.getProjection().eastNorth2latlon(en);
View Full Code Here

            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
            if (debug) {
                System.out.println(en.east() - en2.east());
            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Ref", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Ref", Math.abs(en.north() - en2.north()) < 0.002);
        }
    }
View Full Code Here

            }
            if (debug) {
                System.out.println(en.north() - en2.north());
            }
            assertTrue("Ref", Math.abs(en.east() - en2.east()) < 0.002);
            assertTrue("Ref", Math.abs(en.north() - en2.north()) < 0.002);
        }
    }
}
View Full Code Here

                    lat = b.getMin().lat() + rand.nextDouble() * (b.getMax().lat() - b.getMin().lat());
                    lon = b.getMin().lon() + rand.nextDouble() * (b.getMax().lon() - b.getMin().lon());
                }
                EastNorth en = proj.latlon2eastNorth(new LatLon(lat, lon));
                LatLon ll2 = proj.eastNorth2latlon(en);
                out.write(String.format("%s%n  ll  %s %s%n  en  %s %s%n  ll2 %s %s%n", proj.toCode(), lat, lon, en.east(), en.north(), ll2.lat(), ll2.lon()));
            }
        }
    }

    private static List<TestData> readData() throws IOException, FileNotFoundException {
View Full Code Here

            EastNorth en = proj.latlon2eastNorth(data.ll);
            if (!en.equals(data.en)) {
                String error = String.format("%s (%s): Projecting latlon(%s,%s):%n" +
                        "        expected: eastnorth(%s,%s),%n" +
                        "        but got:  eastnorth(%s,%s)!%n",
                        proj.toString(), data.code, data.ll.lat(), data.ll.lon(), data.en.east(), data.en.north(), en.east(), en.north());
                fail.append(error);
            }
            LatLon ll2 = proj.eastNorth2latlon(data.en);
            if (!ll2.equals(data.ll2)) {
                String error = String.format("%s (%s): Inverse projecting eastnorth(%s,%s):%n" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.