Next: 3.2.1 Nearest neighbor gridding Up: 3. SESSION THREE Previous: 3.1.1 Exercises Contents Index

# 3.2 Gridding of arbitrarily spaced data

Except in the situation above when a grid file is available, we must convert our data to the right format readable by GMT before we can make contour plots and color-coded images. We distinguish between two scenarios:

1. The (x, y, z) data are available on a regular lattice grid.

2. The (x, y, z) data are distributed unevenly in the plane.

The former situation may require a simple reformatting (using xyz2grd), while the latter must be interpolated onto a regular lattice; this process is known as gridding. GMT supports three different approaches to gridding; here, we will briefly discuss the two most common techniques.

All GMT gridding programs have in common the requirement that the user must specify the grid domain and output filename:

-R xmin/xmax/ymin/ymax | The desired grid extent
-I xinc[mc][/yinc[mc]] | The grid spacing (append m or c for minutes or seconds of arc)
-G gridfile | The output grid filename

Subsections

- 3.2.1 Nearest neighbor gridding
  - 3.2.1.1 Exercises
- 3.2.2 Gridding with Splines in Tension
- 3.2.3 Preprocessing

Next: 3.2.1 Nearest neighbor gridding Up: 3. SESSION THREE Previous: 3.1.1 Exercises Contents Index