Cylindrical Projections
The simple equirectangular projection needs no coordinate system to be defined but it serves to illustrate the use of
mapcoords
:
>
mapcoords(Equirectangular,
input = [lambda,phi],
coords = [[lambda,phi]],
params = [r],
view = [-180..180,-80..85,13,7,-180..180,-80..85]);
The arguments to
mapcoords
are the name of the new coordinate system and a sequence of equations of the form
keyword
= something
. The keyword
input
is a list of the names used for the longitude and latitude in the equations to follow. The keyword
coords
is a list of lists specifying the operations used to create the new map coordinates. In this projection no change to the original coordinates are required so the
coords
option simply echoes the input list. The keyword
params
identifies constants that will be passed as arguments to the function created by
mapcoords
.
view
specifies default information used by
coordplot
; it is the same as the optional argument
dlist
in
addcoords
.
mapcoords
creates a procedure that can be seen using the print statement.
>
print(`Maps/Equirectangular`);
The procedure can also be used with the
changecoords
commands or with the
coords
option in calls to the Maple plot function. It cannot, however, be used with the
DEtools
package.
Mercator Projection
Probably the best known of all projections is that of Mercator which has been very popular in large scale wall maps and in atlases. It was originally created to provide for easy navigation since it possesses a crucial property: a straight line drawn on a flat Mercator map corresponds to a path on the sphere having a fixed angle with all meridians (longitudes). So, an old-time navigator could draw a line from one point to another on the map, measure the angle the line made with longitudes and then use his compass to keep the ship pointed at that angle throughout the voyage. This method did not produce a path of shortest length, but, in the days when calculating longitude was an unsolved (and frequently catastrophic) problem, the sheer convenience of the idea outweighed this deficiency. While the Mercator projection is very good at preserving angles (as we shall see below), it does not preserve area, so some regions of the Earth are distorted in size. This has led to some controversy in recent years. The Mercator projection can be added to our collection of map projection coordinates as follows
>
mapcoords(Mercator,
input = [lambda,phi],
coords = [[lambda,r*ln(sec(phi)+tan(phi))]],
params = [r],
view = [-180..180,-80..85,13,7,-180..180,-80..85]);
For this example the code is as follows:
>
print(`Maps/Mercator`);
We cannot use the grid used in the simple equirectangular projection since the Mercator projection becomes infinite as the poles are approached. We must make a new grid using the
graticule
command.
To create the grid we define the
x
and
y
values marking the end points of each grid line.
>
xvalues:=[seq(k*30,k=-6..6)]: yvalues:=[-80,seq(k*30,k=-2..2),85]:
>
mercgrid:=graticule(xvalues,yvalues):
The Mercator coordinates can now be plotted using the changecoords function.
>
mgrid:=changecoords(mercgrid,Mercator):
>
>
plots[display]({mgrid,changecoords(world[ng,1866],Mercator)});
Osborne Maitland Miller modified the Mercator projection to avoid the problem of infinitely far poles.
>
mapcoords(Miller,
input = [lambda,phi],
coords = [[r*lambda,r*ln(tan(Pi/4+0.4*phi))/0.8]],
params = [r],
view = [-180..180,-90..90,13,7,-180..180,-90..90]);
>
changecoords(world[50],Miller);
Cylindrical Equal Area Projection
The cylindrical equal area projection is given by the following coordinate transformations:
where
is the latitude of the standard parallel (that with no distortion). The projection may be created as follows:.
>
mapcoords( `Cylindrical Equal Area`,
input = [lambda,phi],
coords = [sp = '`if`(type(_sp,name),0,_sp)',
[r*lambda*cos(sp/180*Pi),r*sin(phi)/cos(sp/180*Pi)]],
params = [r,_sp],
view = [-180..180,-90..90,13,7,-180..180,-90..90]);
>
print(`Maps/Cylindrical Equal Area`);
Note the if statement to set the standard parallel as an optional argument of the function. In this case the standard parallel must be specified in degrees since the conversion to radians is included in the coordinate transformation. No automatic conversion is done on the optional argument since
mapcoords
considers parameters to be inert. The default value of the standard parallel is the equator. To force the coordinate system to use any value other than the default we must invoke the procedure with 2 arguments as shown below.
If we take
then we have the original cylindrical equal area projection of the French mathematician J.H. Lambert. A standard parallel of 30 degrees will give the equal area projection of Walter Behrmann proposed in 1930. We illustrate with
, the orthographic projection of Scottish clergyman James Gall (who, in the 1860s, also created two other cylindrical projections).
>
coordplot(`Cylindrical Equal Area`(1,45),scaling=constrained);
>
changecoords(world[50],`Cylindrical Equal Area`(1,45));
The Gall orthographic projection was re-created around 1970 by German historian Arno Peters which received considerable popular attention including being the sole projection used in The Peters World Atlas), while coming in for a good deal of negative criticism from professional cartographers, mainly because many of the claims made for the projection by Peters, including that of originality, were disputed (see Snyder (1993) for details).
Gall's stereographic projection was used in a number of atlases and is obtained with the following command.
>
mapcoords( `Gall/Stereographic`,
input = [lambda,phi],
coords = [sp = '`if`(type(_sp,name),0,_sp)',
[r*cos(sp/180*Pi)*lambda,r*(sqrt(2)+2)/2*tan(phi/2)]],
params = [r,_sp],
view = [-180..180,-90..90,13,7,-180..180,-90..90]);
>
changecoords(world[50],`Gall/Stereographic`);
>