public class Mercator extends AbstractProj implements IScaleFactorProvider
This implementation handles both the 1 and 2 stardard parallel cases. For 1 SP (EPSG code 9804), the line of contact is the equator. For 2 SP (EPSG code 9805) lines of contact are symmetrical about the equator.
This class has been derived from the implementation of the Geotools project; git 8cbf52d, org.geotools.referencing.operation.projection.Mercator at the time of migration.
References:
Modifier and Type | Field and Description |
---|---|
private static double |
EPSILON
Maximum difference allowed when comparing real numbers.
|
protected double |
scaleFactor |
Constructor and Description |
---|
Mercator() |
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.
|
double |
getScaleFactor()
Get the scale factor.
|
void |
initialize(ProjParameters params)
Initialize the projection using the provided parameters.
|
double[] |
invproject(double x,
double y)
Convert east/north to lat/lon.
|
boolean |
lonIsLinearToEast()
Checks wether the result of projecting a lon coordinate only has a linear relation to the east coordinate and
is not related to lat/north at all.
|
double[] |
project(double y,
double x)
Convert lat/lon to east/north.
|
aasin, cphi2, invMlfn, isGeographic, mlfn, msfn, tsfn
private static final double EPSILON
protected double scaleFactor
public Mercator()
public java.lang.String getName()
Proj
public java.lang.String getProj4Id()
Proj
getProj4Id
in interface 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
public double[] invproject(double x, double y)
Proj
invproject
in interface 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 Bounds getAlgorithmBounds()
Proj
getAlgorithmBounds
in interface Proj
public double getScaleFactor()
IScaleFactorProvider
getScaleFactor
in interface IScaleFactorProvider
public boolean lonIsLinearToEast()
Proj
lonIsLinearToEast
in interface Proj
true
if lon has a linear relationship to east only.