Introduction to GMT (Generic Mapping Tools)

Lab 9
Introduction to GMT
(Generic Mapping Tools)
1
What is GMT?
• A mapping tool commonly used by geophysicists for
manipulating and visualizing data
• Free!
• Has a steep learning curve, but worth the climb …
• Available from http://gmt.soest.hawaii.edu in a number of flavors
• There are other programs that will do the same sort of thing,
but none have the same flexibility
2
GMT Example Maps
3
4
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
5
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-JA0/20/2.5i
Lambert Azimuthal projection
Center Longitude = 0
Width = 2.5 (or 5) inches
Center Latitude = 20
6
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-R0/360/-90/90
Min. Longitude
Max. Longitude
Min. latitude
Max. latitude
7
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-Bg30/g15:.”Global Map”:
grid spacing (longitude)
grid spacing (latitude)
Map title
8
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-Dl
“l” = low resolution data
9
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-G187/142/46
Red
Green
Blue
10
RGB Colors
Range from 0 (little) - 255 (lot)
11
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
-S109/202/255
Red
Green
Blue
12
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-N1
1 = national boundaries
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
1 = National boundaries
2 = State boundaries within the Americas
3 = Marine boundaries
a = All boundaries (1-3)
13
Map projection
Map region
Basemap info (boundaries, grids spacing, title)
pscoast -JA0/20/2.5i -R0/360/-90/90 -Bg30/g15:.”Global Map”:
-Dl -G187/142/46
Data
resolution
Land color
-S109/202/255
Water color
-N1 -P > simple_globe.ps
National
Portrait layout
Boundaries
Map file
name
14
Lab 9 Part 1: Annotated Map
15
Map region
Map projection
pscoast
-Jb-154/50/55/65/1:21000000
-R172/230/51/72
-B10g5/5g5 -W1p/0/0/0 -P -Ia/2p/0/192/255 -G220/220/220
-S0/192/255 -L210/54/54/1000 -N1/1p/0/0/0 > alaska_map.ps
Basemap
Water color
National
Boundaries
Land
color
16
17
18
19
20
21
pscoast
-Jb-154/50/55/65/1:21000000
-R172/230/51/72
-B10g5/5g5 -W1p/0/0/0 -P -Ia/2p/0/192/255 -G220/220/220
-S0/192/255 -L210/54/54/1000 -N1/1p/0/0/0 > alaska_map.ps
Draw coastlines
-W1p/0/0/0
RGB color (black)
Pen width = 1point
22
pscoast
-Jb-154/50/55/65/1:21000000
-R172/230/51/72
-B10g5/5g5 -W1p/0/0/0 -P -Ia/2p/0/192/255 -G220/220/220
-S0/192/255 -L210/54/54/1000 -N1/1p/0/0/0 > alaska_map.ps
Draw rivers
-Ia/2p/0/192/255
23
RGB color (blue)
draw all rivers
Pen width = 1point
pscoast
-Jb-154/50/55/65/1:21000000
-R172/230/51/72
-B10g5/5g5 -W1p/0/0/0 -P -Ia/2p/0/192/255 -G220/220/220
-S0/192/255 -L210/54/54/1000 -N1/1p/0/0/0 > alaska_map.ps
Draw a map scale
Scale Bar (-L)
A scale bar can easily be added to the map using the -L
switch. To create the scale bar we need the latitude and
longitude of the point where we want to place it. Since
scale varies as we move further from the equator, we
also specify the latitude at which we want the scale
calculated. Lastly we indicate the length the scale bar
should span. The default is kilometers but you can
append m for miles or n for nautical miles. Putting it all
together we have -L210/54/54/1000 which gives a
1,000 km scale bar calculated at 54 degrees north
latitude and originating at 210 degrees longitude and 54
degrees latitude.
-L210/54/54/1000
Origin long.
24
Origin lat.
Length
(km)
Calculation
(lat.) location