Sample a TIN

Use the Grid and Image > Gridding > Tinning > Sample a TIN menu option (TINSAMP GX) to sample a Triangular Irregular Network (TIN) at locations in a database.

Sample a TIN dialog options

Input TIN file

The name of the serialized TIN file.

Script Parameter: TINSAMP.FILE

Output channel

Name of the channel to put the interpolated values.

Script Parameter: TINSAMP.CHAN

Interpolation method

Select one of:

  • Linear: the value is determined by fitting a plane to the triangle in which the point is located.
  • Nearest neighbour:  the value of the closest node in the TIN is returned for each input location.
  • Natural neighbour: see Application Notes below.

Script Parameter: TINSAMP.METHOD (0: Natural neighbour (default), 1: Linear interpolation, 2: Nearest neighbour.

Application Notes

The TIN must be Z-valued; that is each X,Y location must have a corresponding Z-value. The TINDB GX automatically creates a Z-valued TIN.

This GX is projection-aware, so a TIN created with one projection may be used with X and Y channels of another projection.

Locations outside the convex hull of the TIN will return a dummy value.

Each of the interpolation methods returns the nodal value at the nodal locations, so if this GX is used on the same database from which the TIN was created in the first place, you will get back the original Z-channel values (except in those cases with multiple samples at a single location).

The Natural Neighbour Method

The Natural Neighbour Algorithm is described in the following paper:

  • [1] Malcolm Sambridge, Jean Braun, Herbert McQueen, "Geophysical parametrization and interpolation of irregular data using natural neighbours", Geophysical Journal International , vol. 122, no. 3 (December 1995), pp. 837-857.
    DOI: https://doi.org/10.1111/j.1365-246X.1995.tb06841.x.