pscoast - Plot continents, shorelines, rivers, and borders on maps
pscoast -Jparameters -Rregion [ -Aarea ] [ -B[p|s]parameters ] [ -C[l|r/]fill ] [ -Dresolution[+] ] [ -Edcw ] [ -Fbox ] [ -Gfill|c ] [ -Iriver[/pen] ] [ -Jz|Zparameters ] [ -K ] [ -Lruler ] [ -M ] [ -Nborder[/pen] ] [ -O ] [ -P ] [ -Q ] [ -Sfill|c ] [ -Trose ] [ -Tmag_rose ] [ -U[stamp] ] [ -V[level] ] [ -W[level/]pen ] [ -Xx_offset ] [ -Yy_offset ] [ -bobinary ] [ -ccopies ] [ -pflags ] [ -ttransp ]
Note: No space is allowed between the option flag and the associated arguments.
pscoast plots grayshaded, colored, or textured land-masses [or water-masses] on maps and [optionally] draws coastlines, rivers, and political boundaries. Alternatively, it can (1) issue clip paths that will contain all land or all water areas, or (2) dump the data to an ASCII table. The data files come in 5 different resolutions: (f)ull, (h)igh, (i)ntermediate, (l)ow, and (c)rude. The full resolution files amount to more than 55 Mb of data and provide great detail; for maps of larger geographical extent it is more economical to use one of the other resolutions. If the user selects to paint the land-areas and does not specify fill of water-areas then the latter will be transparent (i.e., earlier graphics drawn in those areas will not be overwritten). Likewise, if the water-areas are painted and no land fill is set then the land-areas will be transparent. A map projection must be supplied. The PostScript code is written to standard output.
For perspective view p, optionally append /zmin/zmax. (more ...)
Draw rivers. Specify the type of rivers and [optionally] append pen attributes [Default pen: width = default, color = black, style = solid].
Choose from the list of river types below; repeat option -I as often as necessary.
0 = Double-lined rivers (river-lakes)
1 = Permanent major rivers
2 = Additional major rivers
3 = Additional rivers
4 = Minor rivers
5 = Intermittent rivers - major
6 = Intermittent rivers - additional
7 = Intermittent rivers - minor
8 = Major canals
9 = Minor canals
10 = Irrigation canals
You can also choose from several preconfigured river groups:
a = All rivers and canals (0-10)
A = All rivers and canals except river-lakes (1-10)
r = All permanent rivers (0-4)
R = All permanent rivers except river-lakes (1-4)
i = All intermittent rivers (5-7)
c = All canals (8-10)
Draw political boundaries. Specify the type of boundary and [optionally] append pen attributes [Default pen: width = default, color = black, style = solid].
Choose from the list of boundaries below. Repeat option -N as often as necessary.
1 = National boundaries
2 = State boundaries within the Americas
3 = Marine boundaries
a = All boundaries (1-3)
-Tm[g|j|J|n|x]refpoint+wwidth[+ddec[/dlabel]]][+ipen][+jjustify][+lw,e,s,n][+ppen][+tints][+odx[/dy]]
-Tm draws a map magnetic rose on the map at the location defined by the reference and anchor points: Give the reference point on the map for the rose using one of four coordinate systems: (1) Use g for map (user) coordinates, (2) use j for setting refpoint via a 2-char justification code that refers to the (invisible) map domain rectangle, (3) use n for normalized (0-1) coordinates, or (4) use x for plot coordinates (inches, cm, etc.) [Default]. You can offset the reference point by dx/dy in the direction implied by justify. By default, the anchor point on the scale is assumed to be the center of the rose (MC), but this can be changed by appending +j followed by a 2-char justification code justify (see pstext). Note: If -Dj is used then justify defaults to the same as refpoint, if -DJ is used then justify defaults to the mirror opposite of refpoint. Add +o to offset the color scale by dx/dy away from the refpoint point in the direction implied by justify (or the direction implied by -Dj or -DJ). Append +wwidthto set the width of the rose in plot coordinates (inches, cm, etc.). Use +d to assign the magnetic declination and set dlabel, which is a label for the magnetic compass needle (Leave empty to format a label from dec, or give - to bypass labeling). With +d, both directions to geographic and magnetic north are plotted [Default is geographic only]. If the north label is * then a north star is plotted instead of the north label. Annotation and two levels of tick intervals for both geographic and magnetic directions are 30/5/1 degrees; override these settings by appending +tints, and append six intervals to set both the geographic and magnetic intervals. Label the cardinal points W,E,S,N by adding +l and append your own four comma-separated strings to override the default. Number GMT default parameters control pens, fonts, and color; see the Placing magnetic map roses section in the Cookbook. See -F on how to place a panel behind the scale.
-X[a|c|f|r][x-shift[u]]
To plot a green Africa with white outline on blue background, with permanent major rivers in thick blue pen, additional major rivers in thin blue pen, and national borders as dashed lines on a Mercator map at scale 0.1 inch/degree, use
gmt pscoast -R-30/30/-40/40 -Jm0.1i -B5 -I1/1p,blue -N1/0.25p,- \ -I2/0.25p,blue -W0.25p,white -Ggreen -Sblue -P > africa.ps
To plot Iceland using the lava pattern (# 28) at 100 dots per inch, on a Mercator map at scale 1 cm/degree, run
gmt pscoast -R-30/-10/60/65 -Jm1c -B5 -Gp100/28 > iceland.ps
To initiate a clip path for Africa so that the subsequent colorimage of gridded topography is only seen over land, using a Mercator map at scale 0.1 inch/degree, use
gmt pscoast -R-30/30/-40/40 -Jm0.1i -B5 -Gc -P -K > africa.ps gmt grdimage -Jm0.1i etopo5.nc -Ccolors.cpt -O -K >> africa.ps gmt pscoast -Q -O >> africa.ps
To plot Great Britain, Italy, and France in blue with a red outline and Spain, Portugal and Greece in yellow (no outline), and pick up the plot domain form the extents of these countries, use
gmt pscoast -JM6i -P -Baf -EGB,IT,FR+gblue+p0.25p,red+r -EES,PT,GR+gyellow > map.ps
To extract a high-resolution coastline data table for Iceland to be used in your analysis, try
gmt pscoast -R-26/-12/62/68 -Dh -W -M > iceland.txt
pscoast will first look for coastline files in directory $GMT_SHAREDIR/coast If the desired file is not found, it will look for the file $GMT_SHAREDIR/coastline.conf. This file may contain any number of records that each holds the full pathname of an alternative directory. Comment lines (#) and blank lines are allowed. The desired file is then sought for in the alternate directories.
The coastline database is GSHHG (formerly GSHHS) which is compiled from three sources: World Vector Shorelines (WVS), CIA World Data Bank II (WDBII), and Atlas of the Cryosphere (AC, for Antarctica only). Apart from Antarctica, all level-1 polygons (ocean-land boundary) are derived from the more accurate WVS while all higher level polygons (level 2-4, representing land/lake, lake/island-in-lake, and island-in-lake/lake-in-island-in-lake boundaries) are taken from WDBII. The Antarctica coastlines come in two flavors: ice-front or grounding line, selectable via the -A option. Much processing has taken place to convert WVS, WDBII, and AC data into usable form for GMT: assembling closed polygons from line segments, checking for duplicates, and correcting for crossings between polygons. The area of each polygon has been determined so that the user may choose not to draw features smaller than a minimum area (see -A); one may also limit the highest hierarchical level of polygons to be included (4 is the maximum). The 4 lower-resolution databases were derived from the full resolution database using the Douglas-Peucker line-simplification algorithm. The classification of rivers and borders follow that of the WDBII. See the GMT Cookbook and Technical Reference Appendix K for further details.
The options to fill (-C -G -S) may not always work if the Azimuthal equidistant projection is chosen (-Je|E). If the antipole of the projection is in the oceans it will most likely work. If not, try to avoid using projection center coordinates that are even multiples of the coastline bin size (1, 2, 5, 10, and 20 degrees for f, h, i, l, c, respectively). This projection is not supported for clipping.
The political borders are for the most part 1970s-style but have been updated to reflect more recent border rearrangements in Europe and elsewhere. Let us know if you find something out of date.
The full-resolution coastlines are also from a digitizing effort in the 1970-80s and it is difficult to assess the accuracy. Users who zoom in close enough may find that the GSHHG coastline is not matching other data, e.g., satellite images, more recent coastline data, etc. We are aware of such mismatches but cannot undertake band-aid solutions each time this occurs.
Some users of pscoast will not be satisfied with what they find for the Antarctic shoreline. In Antarctica, the boundary between ice and ocean varies seasonally and inter-annually. There are some areas of permanent shelf ice. In addition to these time-varying ice-ocean boundaries, there are also shelf ice grounding lines where ice goes from floating on the sea to sitting on land, and lines delimiting areas of rock outcrop. For consistency’s sake, we have used the World Vector Shoreline throughout the world in pscoast, as described in the GMT Cookbook Appendix K. Users who need specific boundaries in Antarctica should get the Antarctic Digital Database, prepared by the British Antarctic Survey, Scott Polar Research Institute, World Conservation Monitoring Centre, under the auspices of the Scientific Committee on Antarctic Research. This data base contains various kinds of limiting lines for Antarctica and is available on CD-ROM. It is published by the Scientific Committee on Antarctic Research, Scott Polar Research Institute, Lensfield Road, Cambridge CB2 1ER, United Kingdom.