Chapter 13: Geographical Projections and Plotting Maps

This chapter presents different methods to project geographical coordinates onto a plane surface. Several base maps are stored in DISLIN for plotting maps.

13.1 Axis Systems and Secondary Axes

G R A F M P

The routine GRAFMP plots a geographical axis system.

The call is:
CALL GRAFMP (XA, XE, XOR, XSTP, YA, YE, YOR, YSTP)

XA, XE
are the lower and upper limits of the X-axis.
XOR, XSTP
are the first X-axis label and the step between labels.
YA, YE
are the lower and upper limits of the Y-axis.
YOR, YSTP
are the first Y-axis label and the step between labels.
Additional notes:
X A X M A P

The routine XAXMAP plots a secondary X-axis.

The call is:
CALL XAXMAP (A, B, OR, STEP, CSTR, NT, NY) - level 2

A, B
are the lower and upper limits of the X-axis.
OR, STEP
are the first label and the step between labels.
CSTR
is a character string containing the axis name.
NT
indicates how ticks, labels and the axis name are plotted. If NT = 0, they are plotted in a clockwise direction. If NT = 1, they are plotted in a counter-clockwise direction.
NY
defines the horizontal position of the X-axis. A secondary axis must be located inside the axis system.
Y A X M A P

The routine YAXMAP plots a secondary Y-axis.

The call is:
CALL YAXMAP (A, B, OR, STEP, CSTR, NT, NX) - level 2

A, B
are the lower and upper limits of the Y-axis.
OR, STEP
are the first label and the step between labels.
CSTR
is a character string containing the axis name.
NT
indicates how ticks, labels and the axis name are plotted. If NT = 0, they are plotted in a clockwise direction. If NT = 1, they are plotted in a counter-clockwise direction.
NX
defines the vertical position of the Y-axis. A secondary axis must be located inside the axis system.

13.2 Defining the Projection

Since a globe cannot be unfolded into a plane surface, many different methods have been developed to represent a globe on a plane surface. In cartography, there are 4 basic methods differentiated by attributes such as equal distance, area and angle.

The 4 basic methods are:

P R O J C T

The routine PROJCT selects the geographical projection.

The call is:
CALL PROJCT (CTYPE) - level 1

CTYPE
is a character string defining the projection.
= 'CYLI'
defines a cylindrical equidistant projection.
= 'MERC'
selects the Mercator projection.
= 'EQUA'
defines a cylindrical equal-area projection.
= 'HAMM'
defines the elliptical projection of Hammer.
= 'AITO'
defines the elliptical projection of Aitoff.
= 'WINK'
defines the elliptical projection of Winkel.
= 'SANS'
defines the elliptical Mercator-Sanson projection.
= 'CONI'
defines a conical equidistant projection.
= 'ALBE'
defines a conical equal-area projection (Albert).
= 'CONF'
defines a conical conformal projection.
= 'AZIM'
defines an azimuthal equidistant projection.
= 'LAMB'
defines an azimuthal equal-area projection.
= 'STER'
defines an azimuthal stereographic projection.
= 'ORTH'
defines an azimuthal orthographic projection.
Default: CTYPE = 'CYLI'.
Additional notes:

13.3 Plotting Maps

W O R L D

The routine WORLD plots coastlines and lakes.

The call is:
CALL WORLD - level 2
Additional note:
S H D M A P

The routine SHDMAP plots shaded continents.

The call is:
CALL SHDMAP (CMAP) - level 2

CMAP
is a character string defining the continent.
= 'AFRI'
means Africa.
= 'ANTA'
means the Antarctic.
= 'AUST'
means Australia.
= 'EURA'
means Europe and Asia.
= 'NORT'
means North America.
= 'SOUT'
means South America.
= 'LAKE'
means lakes.
= 'ALL'
means all continents and lakes.

Additional note:
Shading patterns can be selected with SHDPAT and MYPAT. Colours can be defined with COLOR and SETCLR.
S H D E U R

The routine SHDEUR plots shaded European countries.

The call is:
CALL SHDEUR (INRAY, IPRAY, ICRAY, N) - level 2

INRAY
is an integer array containing the countries to be shaded. INRAY can have the following values:
 1: Albania     13: Iceland        24: Portugal
 2: Andorra     14: Italy          25: Romania
 3: Belgium     15: Yugoslavia     26: Sweden
 4: Bulgaria    16: Liechtenstein  27: Switzerland
 5: Germany     17: Luxembourg     28: Spain
 6: Denmark     18: Malta          29: CSFR
 8: England/GB  19: Netherlands    30: Turkey
 9: Finland     20: North Ireland  31: USSR
10: France      21: Norway         32: Hungary
11: Greece      22: Austria
12: Ireland     23: Poland
IPRAY
is an integer array containing shading patterns.
ICRAY
is an integer array containing colour numbers.
N
is the number of countries to be shaded.

Additional note:
The plotting of outlines can be suppressed with CALL NOARLN.

13.4 Plotting Data Points

C U R V M P

The routine CURVMP plots curves through data points or marks them with symbols.

The call is:
CALL CURVMP (XRAY, YRAY, N) - level 2

XRAY, YRAY
are real arrays containing the data points.
N
is the number of data points.
Additional notes:

13.5 Parameter Setting Routines

M A P B A S

The routine MAPBAS defines the map data file used in the routine WORLD. A DISLIN map file and some external map files compiled by Paul Wessel can be used. The external map files can be copied via FTP anonymous from the sites

The external map files 'gshhs_l.b', 'gshhs_i.b', 'gshhs_h.b' and 'gshhs_f.b' must be copied to the map subdirectory of the DISLIN directory.
The call is:
CALL MAPBAS (COPT) - level 1, 2

COPT
is a character string defining the map data file.
= 'DISLIN'
defines the DISLIN base map.
= 'GSHL'
defines 'gshhs_l.b' as base map.
= 'GSHI'
defines 'gshhs_l.i' as base map.
= 'GSHH'
defines 'gshhs_l.h' as base map.
= 'GSHF'
defines 'gshhs_l.f' as base map.
Default: COPT = 'DISLIN'.
M A P L E V

The routine MAPLEV defines land or lake coordinates for WORLD if the external map files from Paul Wessel are used.

The call is:
CALL MAPLEV (COPT) - level 1, 2

COPT
is a character string that can have the values 'BOTH', 'LAND' and 'LAKE'.
Default: COPT = 'BOTH'.
M A P P O L

MAPPOL defines the map pole used for azimuthal projections.

The call is:
CALL MAPPOL (XPOL, YPOL) - level 1

XPOL, YPOL
are the longitude and latitude coordinates in degrees where:
            -180 <= XPOL <= 180 and
             -90 <= YPOL <=  90.
Default: (0., 0.)

Additional note:
For an azimuthal projection with YE - YA <= 90, the map pole will be set by GRAFMP to ((XA+XE)/2, (YA+YE)/2).
M A P S P H

For an azimuthal projection with YE - YA > 90, DISLIN automatically projects a hemisphere around the map pole onto a circle. The hemisphere can be reduced using MAPSPH.

The call is:
CALL MAPSPH (XRAD) - level 1

XRAD
defines the region around the map pole that will be projected onto a circle (0 < XRAD <= 90).
Default: XRAD = 90.
M A P R E F

The routine MAPREF defines, for conical projections, two latitudes where the cone intersects or touches the globe.

The call is:
CALL MAPREF (YLW, YUP) - level 1

YLW, YUP
are the lower and upper latitudes where:
                0 <= YLW <= YUP <= 90 or
             - 90 <= YLW <= YUP <=  0
Default: YLW = YA + 0.25 * (YE - YA), YUP = YA + 0.75 * (YE - YA)

Additional note:
YLW and YUP can have identical values and lie outside of the axis scaling.
M A P M O D

The routine MAPMOD determines how data points will be connected by CURVMP.

The call is:
CALL MAPMOD (CMODE) - level 1, 2

CMODE
is a character string defining the connection mode.
= 'STRAIGHT'
defines straight lines.
= 'INTER'
means that lines will be interpolated linearly.
Default: CMODE = 'INTER'.

13.6 Conversion of Coordinates

P O S 2 P T

The routine POS2PT converts map coordinates to plot coordinates.

The call is:
CALL POS2PT (XLONG, YLAT, XP, YP) - level 2

XLONG, YLAT
are the map coordinates in degrees.
XP, YP
are the plot coordinates calculated by POS2PT.
The corresponding functions are:

13.7 Examples


Next | Previous | Contents