Class AbstractProj

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static double C00
      Constants used to calculate en0, en1, en2, en3, en4.
      private static double C02  
      private static double C04  
      private static double C06  
      private static double C08  
      private static double C22  
      private static double C44  
      private static double C46  
      private static double C48  
      private static double C66  
      private static double C68  
      private static double C88  
      protected double e
      Ellipsoid excentricity, equals to sqrt(excentricity squared).
      protected double e2
      The square of excentricity: e² = (a²-b²)/a² where e is the excentricity, a is the semi major axis length and b is the semi minor axis length.
      protected double en0
      Constant needed for the mlfn method.
      protected double en1
      Constant needed for the mlfn method.
      protected double en2
      Constant needed for the mlfn method.
      protected double en3
      Constant needed for the mlfn method.
      protected double en4
      Constant needed for the mlfn method.
      private static double ITERATION_TOLERANCE
      Difference allowed in iterative computations.
      private static int MAXIMUM_ITERATIONS
      Maximum number of iterations for iterative computations.
      private static double MLFN_TOL
      Relative iteration precision used in the mlfn method
      protected boolean spherical
      is ellipsoid spherical?
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractProj()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double aasin​(double v)
      Tolerant asin that will just return the limits of its output range if the input is out of range
      (package private) double cphi2​(double ts)  
      void initialize​(ProjParameters params)
      Initialize the projection using the provided parameters.
      protected double invMlfn​(double arg)
      Calculates the latitude (phi) from a meridian distance.
      boolean isGeographic()
      Return true, if a geographic coordinate reference system is represented.
      protected double mlfn​(double phi, double sphi, double cphi)
      Calculates the meridian distance.
      (package private) double msfn​(double s, double c)
      Computes function f(s,c,e²) = c/sqrt(1 - s²×e²) needed for the true scale latitude (Snyder 14-15), where s and c are the sine and cosine of the true scale latitude, and is the eccentricity squared.
      (package private) double tsfn​(double lat, double sinlat)
      Computes function (15-9) and (9-13) from Snyder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isGeographic

        public boolean isGeographic()
        Description copied from interface: Proj
        Return true, if a geographic coordinate reference system is represented. I.e. if it returns latitude/longitude values rather than Cartesian east/north coordinates on a flat surface.
        Specified by:
        isGeographic in interface Proj
        Returns:
        true, if it is geographic
      • mlfn

        protected final double mlfn​(double phi,
                                    double sphi,
                                    double cphi)
        Calculates the meridian distance. This is the distance along the central meridian from the equator to phi. Accurate to < 1e-5 meters when used in conjunction with typical major axis values.
        Parameters:
        phi - latitude to calculate meridian distance for.
        sphi - sin(phi).
        cphi - cos(phi).
        Returns:
        meridian distance for the given latitude.
      • invMlfn

        protected final double invMlfn​(double arg)
        Calculates the latitude (phi) from a meridian distance. Determines phi to TOL (1e-11) radians, about 1e-6 seconds.
        Parameters:
        arg - meridian distance to calculate latitude for.
        Returns:
        the latitude of the meridian distance.
        Throws:
        java.lang.RuntimeException - if the itteration does not converge.
      • aasin

        protected final double aasin​(double v)
        Tolerant asin that will just return the limits of its output range if the input is out of range
        Parameters:
        v - the value whose arc sine is to be returned.
        Returns:
        the arc sine of the argument.
      • cphi2

        final double cphi2​(double ts)
      • msfn

        final double msfn​(double s,
                          double c)
        Computes function f(s,c,e²) = c/sqrt(1 - s²×e²) needed for the true scale latitude (Snyder 14-15), where s and c are the sine and cosine of the true scale latitude, and is the eccentricity squared.
        Parameters:
        s - sine of the true scale latitude
        c - cosine of the true scale latitude
        Returns:
        c/sqrt(1 - s²×e²)
      • tsfn

        final double tsfn​(double lat,
                          double sinlat)
        Computes function (15-9) and (9-13) from Snyder. Equivalent to negative of function (7-7).
        Parameters:
        lat - the latitude
        sinlat - sine of the latitude
        Returns:
        auxiliary value computed from lat and sinlat