Class AlbersEqualArea

  • All Implemented Interfaces:
    Proj

    public class AlbersEqualArea
    extends AbstractProj
    Albers Equal Area Projection (EPSG code 9822). This is a conic projection with parallels being unequally spaced arcs of concentric circles, more closely spaced at north and south edges of the map. Meridians are equally spaced radii of the same circles and intersect parallels at right angles. As the name implies, this projection minimizes distortion in areas.

    The "standard_parallel_2" parameter is optional and will be given the same value as "standard_parallel_1" if not set (creating a 1 standard parallel projection).

    NOTE: formulae used below are from a port, to Java, of the proj4 package of the USGS survey. USGS work is acknowledged here.

    This class has been derived from the implementation of the Geotools project; git 8cbf52d, org.geotools.referencing.operation.projection.AlbersEqualArea at the time of migration.

    References:

    • Proj-4.4.7 available at www.remotesensing.org/proj
      Relevant files are: PJ_aea.c, pj_fwd.c and pj_inv.c
    • John P. Snyder (Map Projections - A Working Manual, U.S. Geological Survey Professional Paper 1395, 1987)
    • "Coordinate Conversions and Transformations including Formulas", EPSG Guidance Note Number 7, Version 19.
    Since:
    9419
    See Also:
    Albers Equal-Area Conic Projection on MathWorld, "Albers_Conic_Equal_Area" on RemoteSensing.org, British Columbia Albers Standard Projection
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double c
      Constants used by the spherical and elliptical Albers projection.
      private double ec
      An error condition indicating iteration will not converge for the inverse ellipse.
      private static double EPSILON
      Maximum difference allowed when comparing real numbers.
      private static double ITERATION_TOLERANCE
      Difference allowed in iterative computations.
      private static int MAXIMUM_ITERATIONS
      Maximum number of iterations for iterative computations.
      private double n
      Constants used by the spherical and elliptical Albers projection.
      private double n2
      Constants used by the spherical and elliptical Albers projection.
      private double rho0
      Constants used by the spherical and elliptical Albers projection.
    • Constructor Summary

      Constructors 
      Constructor Description
      AlbersEqualArea()  
    • Field Detail

      • n

        private double n
        Constants used by the spherical and elliptical Albers projection.
      • n2

        private double n2
        Constants used by the spherical and elliptical Albers projection.
      • c

        private double c
        Constants used by the spherical and elliptical Albers projection.
      • rho0

        private double rho0
        Constants used by the spherical and elliptical Albers projection.
      • ec

        private double ec
        An error condition indicating iteration will not converge for the inverse ellipse. See Snyder (14-20)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Proj
        Replies a human readable name of this projection.
        Returns:
        The projection name. must not be null.
      • getProj4Id

        public String getProj4Id()
        Description copied from interface: Proj
        Replies the Proj.4 identifier.
        Returns:
        The Proj.4 identifier (as reported by cs2cs -lp). If no id exists, return null.
      • project

        public double[] project​(double y,
                                double x)
        Description copied from interface: Proj
        Convert lat/lon to east/north.
        Parameters:
        y - the latitude in radians
        x - the longitude in radians
        Returns:
        array of length 2, containing east and north value in meters, divided by the semi major axis of the ellipsoid.
      • invproject

        public double[] invproject​(double x,
                                   double y)
        Description copied from interface: Proj
        Convert east/north to lat/lon.
        Parameters:
        x - east value in meters, divided by the semi major axis of the ellipsoid
        y - north value in meters, divided by the semi major axis of the ellipsoid
        Returns:
        array of length 2, containing lat and lon in radians.
      • phi1

        public double phi1​(double qs)
        Iteratively solves equation (3-16) from Snyder.
        Parameters:
        qs - arcsin(q/2), used in the first step of iteration
        Returns:
        the latitude
      • qsfn

        private double qsfn​(double sinphi)
        Calculates q, Snyder equation (3-12)
        Parameters:
        sinphi - sin of the latitude q is calculated for
        Returns:
        q from Snyder equation (3-12)
      • getAlgorithmBounds

        public Bounds getAlgorithmBounds()
        Description copied from interface: Proj
        Return the bounds where this projection is applicable. This is a fallback for when the projection bounds are not specified explicitly. In this area, the round trip lat/lon -> east/north -> lat/lon should return the starting value with small error. In addition, regions with extreme distortions should be excluded, if possible. It need not be the absolute maximum, but rather an area that is safe to display in JOSM and contain everything that one would expect to use.
        Returns:
        the bounds where this projection is applicable, null if unknown