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(EllipsoidPoint pivotIn,
double azimuthIn,
boolean centeredIn,
boolean seriesIn)
Complete constructor.
|
| Modifier and Type | Method and Description |
|---|---|
EllipsoidPoint |
applyInverseTo(double x,
double y)
Inverse projection.
|
EllipsoidPoint |
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(EllipsoidPoint point)
Returns Easting value and Northing value in meters from the point coordinates.
|
boolean |
canMap(EllipsoidPoint 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)
Getter for the scale factor at a specific latitude.
|
EnumLineProperty |
getLineProperty()
Getter for the 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, getReferencepublic static final double MAX_LATITUDE
public Mercator(EllipsoidPoint pivotIn, double azimuthIn, boolean centeredIn, boolean seriesIn)
pivotIn - pivot point used for projection. It also contains reference ellipsoidazimuthIn - 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 methodIllegalArgumentException - if the pivot point's body shape isn't a OneAxisEllipsoidpublic Mercator(double centralMeridian,
EllipsoidBodyShape ref)
centralMeridian - central meridianref - reference shapepublic final boolean canMap(EllipsoidPoint coordinates)
coordinates - point to test if representablepublic Vector2D applyTo(EllipsoidPoint point) throws PatriusException
point - the point to transformPatriusException - if projection could not be computedpublic Vector2D applyTo(double lat, double lon) throws PatriusException
lat - latitude of the point to projectlon - longitude of the point to projectPatriusException - if projection could not be computedpublic EllipsoidPoint applyInverseTo(double x, double y, double alt) throws PatriusException
x - abscissa coordinatey - ordinate coordinatealt - altitude coordinatePatriusException - if inverse projection could not be computedpublic EllipsoidPoint applyInverseTo(double x, double y) throws PatriusException
x - abscissa coordinatey - ordinate coordinatePatriusException - 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 AbstractProjectionlat - latitudeCopyright © 2024 CNES. All rights reserved.