Mercator Projection

Author

Eric W. Weisstein
March 2, 2015

This notebook downloaded from http://mathworld.wolfram.com/notebooks/MapProjections/MercatorProjection.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/MercatorProjection.html.

©2015 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Modern Mathematica implementation by
Jose Martin-Garcia
February 28, 2015

Manipulate by
Gerli Jogeva
March 2, 2015

Figure

Projection

V5

Show[Graphics[ProjectionPlot[Projection[Mercator[]],GridSegments->100]],AspectRatio->Automatic]

V6

Graphics[MapProjectionPlot[MapProjection[Mercator[]],GridSegments->100]]

"Mercator Projection"->,

WorldPlot

?Mercator

WorldPlot[World,
WorldProjection->Mercator,WorldGridBehind->False,
WorldBorders->Red,WorldGridStyle->GrayLevel[.7]]

Derivs[{l-l0,Log[Tan[Pi/4+p/2]]},{l,p}]

V10

From Jose
Feb 28, 2015

Parameters of the Earth’s ellipsoid:

a=QuantityMagnitude[GeodesyData["ITRF00","SemimajorAxis"],"Meters"];
b=QuantityMagnitude[GeodesyData["ITRF00","SemiminorAxis"],"Meters"];

First, construct the globe:

bordersLatLon=First@CountryData["World","Polygon"];
bordersXYZ=First@GeoPositionXYZ[bordersLatLon];

parallelsLatLon=GeoPosition[Outer[List,Range[-75,75,15],Range[-180,180,3]]];
parallelsXYZ=First@GeoPositionXYZ[parallelsLatLon];

meridiansLatLon=GeoPosition[Outer[List,Range[-75,75,3],Range[-180,180,30]]];
meridiansXYZ=First@GeoPositionXYZ[meridiansLatLon];

globe=Graphics3D[{Ellipsoid[{0,0,0},{a,b,b}],Line[bordersXYZ],GrayLevel[0.7],Line[parallelsXYZ],Line[Transpose[meridiansXYZ]]},Boxed->False,Lighting->"Neutral",Method->{"ShrinkWrap"->True}]

This projects on a cylinder of radius r:

OnCylinder[ens_?MatrixQ,r_]:=With[{p=Transpose[ens]},
Transpose[{r Cos[p[[1]]/r],r Sin[p[[1]]/r],p[[2]]}]
];
OnCylinder[ens_List,r_]:=OnCylinder[#,r]&/@ens;

The “Mercator” projection:

proj={"Mercator","ReferenceModel"->a};

bordersMap=First@GeoGridPosition[bordersLatLon,proj];
meridiansMap=First@GeoGridPosition[meridiansLatLon,proj];
parallelsMap=First@GeoGridPosition[parallelsLatLon,proj];

Graphics[{Red,Line[bordersMap],Opacity[0.2],Line[parallelsMap],Line[Transpose[meridiansMap]]}]

bordersCyl=OnCylinder[bordersMap,a];
parallelsCyl=OnCylinder[parallelsMap,a];
meridiansCyl=OnCylinder[meridiansMap,a];

Graphics3D[{
Ellipsoid[{0,0,0},{a,b,b}],
Line[bordersXYZ],
GrayLevel[0.7],Line[parallelsXYZ],Line[Transpose[meridiansXYZ]],
Red,Line[bordersCyl],
Opacity[0.2],Line[parallelsCyl],Line[Transpose[meridiansCyl]]
},Boxed->False,Lighting->"Neutral",PlotRange->2a{{-1,1},{-1,1},{-1,1}},Method->{"ShrinkWrap"->True},ImageSize->200]