Sample a Grid

Use the Sample a Grid option (geogxnet.dll(Geosoft.GX.GridUtils.SampleAGrid;Run)*) to sample a grid along the designated X, Y locations of the current database and create a new channel containing the sampled grid data.

The option is available from the following locations:

  • Grid and Image > Utilities menu
  • Tie Line Levelling > Levelling Utilities menu with the Geophysics Levelling extension

Sample a Grid dialog options

Input grid

Select the grid to sample.

Script Parameter: GRIDSAMP.GRID

Sampling method

Select the sampling method to use:

  • Linear (default) - standard straight-line technique that interpolates a value linearly between the four surrounding grid nodes.
  • Nearest - the digitized point is assigned the value of the grid cell it falls within (which may be “dummy” value) or a “dummy” value if it falls outside of the grid.

Script Parameter: GRIDSAMP.INTERP_METHOD (L: Linear (default), N: Nearest)

Grid sampled channel

Specify the output channel for the sampled grid. By default, the channel will have the same name as the input grid.

Script Parameter: GRIDSAMP.Z

Application Notes

*The GX.NET tools are embedded in the geogxnet.dll file located in the "...\Geosoft\Desktop Applications \bin" folder. If running this GX interactively, bypassing the menu, first change the folder to point to the "bin" directory, then supply the GX.NET tool in the specified format. See the topic Run GX for more details on running a GX.NET interactively.

Sampling Methods

The Linear method uses the four adjacent grid values (irrespective of the cell sizes) and does a fractional interpretation for the Linear interpolation option:

  1. If the location falls exactly on a grid point, it returns that value.

  2. If the location is on an “edge” (a line joining points in “X” or in “Y”), it linearly interpolates between those two points; if either is a dummy, it returns a dummy.

  3. If the location is inside the square defined by the four points, and any point is a dummy, it returns a dummy; otherwise, it interpolates the values linearly in X and in Y.

The Nearest (pixel) method returns the value of the closest “corner”. Locations exactly at the half-way point between two grid values are rounded down to the lower-index value.

Microlevelling

It is often useful to be able to sample a data value from a grid based on the (x,y) location in a database.

For example, you can extract the digital terrain along a survey path from SRTM grids. A more complex application of this tool is in microlevelling of survey data.

Microlevelling is intended to remove more subtle levelling errors that remain in data after normal levelling corrections have been applied. This error appears as a long wavelength along the survey lines and a short wavelength related to the survey line separation across the survey lines. Such error can be removed from a gridded data set using the decorrugation techniques available in the Geosoft Mapping System.

The following procedure describes how to use grid decorrugation to apply microlevelling correction to the original line data.

  1. Apply base station levelling and tie line levelling to produce a best-effort levelling of the data. There may still be some minor levelling errors that have not been corrected.

  2. Grid the survey line data (excluding tie lines) to produce a raw levelled grid.

  3. Apply decorrugation filters to the grid using MAGMAP to produce a 'microlevelled' grid. This normally involves the application of a Butterworth high-pass filter (4 times the line separation) and a directional cosine filter to produce a level error grid, which is in turn subtracted from the original data grid to produce a de-corrugated result. You may have to adjust the parameters of the Butterworth high-pass filter, or apply BIGRID non-linear filters to the original grid to remove very high-power features from the data. The result is an acceptably levelled gridded product.

  4. Run this GX to extract the 'microlevelled' values from the levelled grid and place them in a new channel of the database.

  5. Subtract the 'microlevelled' data from the raw levelled data to produce a raw level error channel.

  6. The raw level error channel will contain some short-wavelength features that have a geological source and which result from line gridding error. These must be removed by applying an appropriate low-pass filter using the LOWPASS GX. The result is the final 'microlevel' correction.

  7. Subtract the microlevel correction from the raw levelled data. The result is final levelled and microlevelled data. The microlevelled data can now be gridded and processed as a final product.

Sample a VOXI Model from a Grid

When creating the observation values from an import grid, use grid sampling (sample at a specific (x,y)) to sample at the location directly above and centered on the model cell.

Please examine the grid's sampling content to avoid creating a moiré effect that depends on the ratio of the data grid cell size and the voxel cell size.