Package org.geotools.referencing.datum

Examples of org.geotools.referencing.datum.DefaultEllipsoid.orthodromicDistance()


        for (int i=0; i<100; i++) {
            final double y1 =  -90 + 180*random.nextDouble();
            final double y2 =  -90 + 180*random.nextDouble();
            final double x1 = -180 + 360*random.nextDouble();
            final double x2 = -180 + 360*random.nextDouble();
            final double distance = s.orthodromicDistance(x1, y1, x2, y2);
            assertTrue("Range of legal values", distance>=0 && distance<=circumference);
        }
    }

    /**
 
View Full Code Here


                final double altitude = Math.max(array0[base+2], array0[base+5]);
                final DefaultEllipsoid ellip = DefaultEllipsoid.createFlattenedSphere("Temporary",
                                               ellipsoid.getSemiMajorAxis()+altitude,
                                               ellipsoid.getInverseFlattening(),
                                               ellipsoid.getAxisUnit());
                double orthodromic = ellip.orthodromicDistance(array0[base+0], array0[base+1],
                                                               array0[base+3], array0[base+4]);
                orthodromic = Math.hypot(orthodromic, array0[base+2] - array0[base+5]);
                if (i < orthodromicDistance.length) {
                    assertEquals("Orthodromic distance["+i+']', orthodromicDistance[i], orthodromic, 0.1);
                }
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.