Examples of Angle


Examples of org.apache.sis.measure.Angle

        final int dimension = getDimension();
        for (int i=0; i<dimension; i++) {
            final AxisDirection axis0 = getAxis(i).getDirection();
            for (int j=i; ++j<dimension;) {
                final AxisDirection axis1 = getAxis(j).getDirection();
                final Angle angle = CoordinateSystems.angle(axis0, axis1);
                /*
                 * The angle may be null for grid directions (COLUMN_POSITIVE, COLUMN_NEGATIVE,
                 * ROW_POSITIVE, ROW_NEGATIVE). We conservatively accept those directions even if
                 * they are not really for Cartesian CS because we do not know the grid geometry.
                 */
                if (angle != null && Math.abs(angle.degrees()) != 90) {
                    throw new IllegalArgumentException(Errors.format(
                            Errors.Keys.NonPerpendicularDirections_2, axis0, axis1));
                }
            }
        }
View Full Code Here

Examples of org.geotools.measure.Angle

            // Already checked for +-360 deg. above.
            if ((azimuth > -1.5*PI && azimuth < -0.5*PI) ||
                (azimuth >  0.5*PI && azimuth <  1.5*PI))
            {
                final String name = Provider.AZIMUTH.getName().getCode();
                final Angle value = new Angle(toDegrees(azimuth));
                throw new InvalidParameterValueException(Errors.format(
                        ErrorKeys.ILLEGAL_ARGUMENT_$2, name, value), name, value);
            }
            temp = doubleValue(expected, Provider.RECTIFIED_GRID_ANGLE, parameters);
            if (Double.isNaN(temp)) {
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.