public class AlbersEqualArea extends AbstractProj
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:
Modifier and Type | Field and 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 and Description |
---|
AlbersEqualArea() |
Modifier and Type | Method and Description |
---|---|
Bounds |
getAlgorithmBounds()
Return the bounds where this projection is applicable.
|
java.lang.String |
getName()
Replies a human readable name of this projection.
|
java.lang.String |
getProj4Id()
Replies the Proj.4 identifier.
|
void |
initialize(ProjParameters params)
Initialize the projection using the provided parameters.
|
double[] |
invproject(double x,
double y)
Convert east/north to lat/lon.
|
double |
phi1(double qs)
Iteratively solves equation (3-16) from Snyder.
|
double[] |
project(double y,
double x)
Convert lat/lon to east/north.
|
private double |
qsfn(double sinphi)
Calculates q, Snyder equation (3-12)
|
aasin, cphi2, invMlfn, isGeographic, mlfn, msfn, tsfn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lonIsLinearToEast
private static final int MAXIMUM_ITERATIONS
private static final double ITERATION_TOLERANCE
private static final double EPSILON
private double n
private double n2
private double c
private double rho0
private double ec
public AlbersEqualArea()
public java.lang.String getName()
Proj
public java.lang.String getProj4Id()
Proj
null
.public void initialize(ProjParameters params) throws ProjectionConfigurationException
Proj
initialize
in interface Proj
initialize
in class AbstractProj
params
- The projection parametersProjectionConfigurationException
- in case parameters are not suitablepublic double[] project(double y, double x)
Proj
y
- the latitude in radiansx
- the longitude in radianspublic double[] invproject(double x, double y)
Proj
x
- east value in meters, divided by the semi major axis of the ellipsoidy
- north value in meters, divided by the semi major axis of the ellipsoidpublic double phi1(double qs)
qs
- arcsin(q/2), used in the first step of iterationprivate double qsfn(double sinphi)
sinphi
- sin of the latitude q is calculated forpublic Bounds getAlgorithmBounds()
Proj