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 whether 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, tsfnprivate static final double EPSILON
protected double scaleFactor
public Mercator()
public java.lang.String getName()
Projpublic java.lang.String getProj4Id()
ProjgetProj4Id in interface Projnull.public void initialize(ProjParameters params) throws ProjectionConfigurationException
Projinitialize in interface Projinitialize in class AbstractProjparams - The projection parametersProjectionConfigurationException - in case parameters are not suitablepublic double[] project(double y, double x)
Projpublic double[] invproject(double x, double y)
Projinvproject in interface Projx - 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()
ProjgetAlgorithmBounds in interface Projpublic double getScaleFactor()
IScaleFactorProvidergetScaleFactor in interface IScaleFactorProviderpublic boolean lonIsLinearToEast()
ProjlonIsLinearToEast in interface Projtrue if lon has a linear relationship to east only.