public class Mercator extends AbstractProjection
The Mercator projection is a cylindrical map projection which became the standard map projection for nautical purposes because of its ability to represent lines of constant course, known loxodromes, as straight segments. While the linear scale is constant in all directions around any point, thus preserving the angles and the shapes of small objects (which makes the projection conformal), the Mercator projection distorts the size and shape of large objects, as the scale increases from the Equator to the poles, where it becomes infinite.
The mercator projection is defined by a point, called pivot. The longitude of this point is the center of X axis of projected point. The latitude of this point is used to compute the scaleFactor. The origin of Y axis is always the equator parallel. Default pivot is (lat=0,lon=0).
Is an azimuth is given to the Mercator projection, the (X,Y) frame will be rotated, as Y axis is folliwing the given cap. Default azimuth is 0.
The inverse computation can be done using series, or by an iterative way The series are two times faster, but the precision is 5e-5 meters instead of 1e-8 meters.
Modifier and Type | Field and Description |
---|---|
static double |
MAX_LATITUDE
Maximum latitude from which a Mercator transformation can be defined.
|
Constructor and Description |
---|
Mercator(double centralMeridian,
EllipsoidBodyShape ref)
Constructor with default values :
The latitude of pivot is 0
azimuth is null (no rotation)
centered is false.
|
Mercator(GeodeticPoint pivotIn,
EllipsoidBodyShape shape,
double azimuthIn,
boolean centeredIn,
boolean seriesIn)
Complete constructor.
|
Modifier and Type | Method and Description |
---|---|
GeodeticPoint |
applyInverseTo(double x,
double y)
Inverse projection.
|
GeodeticPoint |
applyInverseTo(double x,
double y,
double alt)
This is the Two standard parallel Mercator Projection model.
|
Vector2D |
applyTo(double lat,
double lon)
Returns Easting value and Northing value in meters from latitude and longitude coordinates.
|
Vector2D |
applyTo(GeodeticPoint geodeticPoint)
Returns Easting value and Northing value in meters from geodetic coordinates.
|
boolean |
canMap(GeodeticPoint coordinates)
Returns a boolean depending if the geodetic point can be map with the selected projection method.
|
double |
getAzimuth()
Get the azimuth of the projection (CLOCKWISE).
|
double |
getDistortionFactor(double lat)
Returns the scale factor at a specific latitude.
|
EnumLineProperty |
getLineProperty()
Getter for line property .
|
double |
getMaximumEastingValue()
Getter for the maximum value for X projected.
|
double |
getMaximumLatitude()
Getter for the maximum latitude that the projection can map.
|
double |
getMaximumNorthingValue()
Get the maximum northing value in meters.
|
double |
getScaleFactor(double lat)
Returns the scale factor at a specific latitude.
|
boolean |
isConformal()
Inform the user if the direct transformation is a conformal 's one (If yes, it preserves angles).
|
boolean |
isEquivalent()
Inform the user if the direct transformation is an equivalent 's one (If yes, it preserves surfaces).
|
applyInverseTo, applyInverseTo, applyTo, applyToAndDiscretize, discretize, discretizeAndApplyTo, discretizeCircleAndApplyTo, discretizeRhumbAndApplyTo, getPivotPoint, getReference
public static final double MAX_LATITUDE
public Mercator(GeodeticPoint pivotIn, EllipsoidBodyShape shape, double azimuthIn, boolean centeredIn, boolean seriesIn)
pivotIn
- pivot point used for projectionshape
- reference shape used for projectionazimuthIn
- is angle from the north direction to the current direction in CLOCKWISE sensecenteredIn
- if true, Y coordinates equal 0 in pivot point. The rotation if around pivot.seriesIn
- boolean indicating if the inverse projection uses a direct method with series,
or an iterative methodpublic Mercator(double centralMeridian, EllipsoidBodyShape ref)
centralMeridian
- central meridianref
- reference shapepublic final boolean canMap(GeodeticPoint coordinates)
coordinates
- geodetic point to test if representable.public Vector2D applyTo(GeodeticPoint geodeticPoint) throws PatriusException
geodeticPoint
- the geodetic point to transform.PatriusException
- thrown if projection could not be computedpublic Vector2D applyTo(double lat, double lon) throws PatriusException
lat
- latitude of the point to project.lon
- longitude of the point to project.PatriusException
- thrown if projection could not be computedpublic GeodeticPoint applyInverseTo(double x, double y, double alt) throws PatriusException
x
- abscissa coordinatey
- ordinate coordinatealt
- altitude coordinatePatriusException
- thrown if inverse projection could not be computedpublic GeodeticPoint applyInverseTo(double x, double y) throws PatriusException
x
- abscissa coordinatey
- ordinate coordinatePatriusException
- thrown if inverse projection could not be computedpublic boolean isConformal()
public boolean isEquivalent()
public EnumLineProperty getLineProperty()
public final double getMaximumLatitude()
public final double getMaximumEastingValue()
public double getAzimuth()
public final double getMaximumNorthingValue()
public final double getScaleFactor(double lat)
lat
- latitudepublic final double getDistortionFactor(double lat)
getDistortionFactor
in class AbstractProjection
lat
- latitudeCopyright © 2019 CNES. All rights reserved.