Contents - Index


GMT - The Generic Mapping Tools

 

'GMT', aka 'The Generic Mapping Tools' - http://www.generic-mapping-tools.org/ (Link will open in your Browser), is an open source collection of software tools for processing and displaying xy and xyz datasets, including rasterisation, filtering and other image processing operations, and various kinds of map projections. The software stores 2-D grids as COARDS-compliant netCDF files and comes with a comprehensive collection of free GIS data, such as coast lines, rivers, political borders and coordinates of other geographic objects. Users may convert further data (like satellite imagery and digital elevation models) from other sources and import them. GMT stores the resulting maps and diagrams in PostScript (PS) or Encapsulated PostScript (EPS) format. GMT is developed and maintained by Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis and Florian Wobbe, with help from a global set of volunteers, and is supported by the National Science Foundation. It is released under the GNU Lesser General Public License version 3 or any later version.

 

GMT uses CPT files in a number of it's tools. Here are some of them:

grdimage 

(Link will open in your Browser), which reads one 2-D grid and produces a gray-shaded (or colored) map by plotting rectangles centered on each grid node and assigning them a gray-shade (or color) based on the z-value.

grdview 

(Link will open in your Browser), which reads a 2-D grid and produces a a 3-D perspective plot by drawing a mesh, painting a colored/grayshaded surface made up of polygons, or by scanline conversion of these polygons to a raster image. 

grdcontour 

(Link will open in your Browser), which reads a 2-D grid and produces a contour map by tracing each contour through the grid.

plot 

(Link will open in your Browser), which reads (x,y) pairs and plot lines, polygons, or symbols with different levels of decoration. 

plot3d 

(Link will open in your Browser), which reads (x,y,z) triplets from files [or standard input] and will plot lines, polygons, or symbols at those locations in 3-D.

 

 

As you are using this Windows program, it is likely that you are using the Windows version of GMT as well. 32 and 64 bit standalone installers for GMT can be downloaded from https://www.generic-mapping-tools.org/download/ (Link will open in your Browser). The installers come with GDAL, FFmpeg, and Ghostscript pre-installed.

 

Documentation is here: https://docs.generic-mapping-tools.org/latest/ (Link will open in your Browser).

 

Examples are here: https://docs.generic-mapping-tools.org/latest/gallery.html (Link will open in your Browser).

 

Datasets are here: http://gmt.soest.hawaii.edu/doc/latest/datasets.html (Link will open in your Browser).

 

The simplest way to use GMT with Windows is to use the commands in a .bat file. As an example, open a text file, copy the following commands into it, then save it as 'C:\gmt\user\wiki_world.bat'

 

psbasemap -R-180/180/-90/90 -JQ0/2048p -Bf10/f10wesn -K > wiki_world.ps

grdimage C:\gmt\ETOPO2\etopo2.grd -CC:\gmt\share\cpt\wiki-2.0.cpt -O -R -JQ >> wiki_world.ps

pause