Spatial Integration Help

Gridding (2D)

Note

Coming in Spatial Integration version 3.

Requires the Professional edition. In the Community edition, grid files written with the Professional edition can still be loaded and viewed as surfaces.

Gridding turns the scattered readings along a LineDB survey's lines into a regular 2D raster. You choose the survey, the two channels that give each reading its position, and the channel holding the values to grid; the result is written as a georeferenced raster file that you can load as an elevation or image source like any other.

The method is minimum curvature. It fits the smoothest surface that passes through your data - the shape a thin elastic sheet would take if it were pinned at every reading - which is what makes it the standard choice for line data. Unlike the 3D Interpolation dialog, which krigs drill samples into a volume, gridding works in plan only and needs no variogram.

Opening the Dialog

Hover over the Data Processing icon in the right tool panel, then Interpolation, and click Minimum Curvature (2D)....

You need a LineDB layer loaded first. Load one through Load LineDB... or create one with Import to LineDB... in the same flyout.

The Workflow

The dialog has three tabs, worked through from left to right.

  1. Data - which survey, which channels, and which file to write.
  2. Grid - the area to cover and the cell size.
  3. Advanced - blanking, tension and the other gridding parameters.

OK grids and writes the file. Cancel discards the changes made since the dialog was opened. If anything is missing or contradictory, an amber line above the buttons says what, and OK stays disabled until it is fixed.

While the grid is being made the tabs give way to a progress bar with a Cancel button. Small grids take a second or two; a grid of tens of millions of cells takes minutes. The dialog closes itself when the file is written and the log records what was done. Cancelling, or closing the window, stops gridding within a moment and leaves no file behind.

Data Tab

LineDB lists every LineDB layer in the project.

Survey lists the surveys held in that layer's file. A layer shows one of them, and that one is selected to begin with, but any survey in the file can be gridded. Only the survey's active lines are used, as last saved. Lines switched on or off in the attribute table but not yet saved do not count until they are.

X channel and Y channel are the channels giving each reading its position. They default to the coordinate channels the survey states as current, which is nearly always what you want; choose different ones when the survey carries a second set of coordinates - a different projection, or a local grid - that you would rather grid in.

Attribute is the channel to grid. Only numeric channels holding one value per fiducial are listed, so text channels and array channels such as EM decays do not appear.

Note

The grid is written in the coordinate system of the channels you choose, not the project's view system. Grid in the survey's own projection unless you have a reason not to.

Output File

Format lists every raster format SI can write. GeoTIFF is the default and is the right answer nearly always - it is widely readable, holds several bands, and carries its own georeferencing.

Type a path into Output file or use the browse button beside it. Changing the format changes the extension to match.

GeoTIFFs are written compressed. Build overviews, on by default, adds reduced resolution copies once the grid is written - inside a GeoTIFF, in a file beside it for formats that cannot hold them - so a large grid draws quickly at any zoom. Turn it off for a small grid you are going to regrid repeatedly, or when another program will build its own. Each band written carries a record of how it was made - the source file, survey and channels, the cell size, tension, blanking distance, iteration count and whether gridding converged - as metadata items whose names start with SI_, which most GIS packages can display.

Tick Show in Imager to open the finished grid in a new Imager window. A window already showing the same file refreshes by itself.

Writing to a File That Already Exists

Point the output at a file that is already there and the dialog reads it, reports what it holds, and offers up to three ways of writing into it.

Choice What happens
Overwrite grid The file is replaced. Every band it holds now is lost
Add band The existing bands are kept and this grid is appended as another
Overwrite band The values of one band are replaced and the rest are left alone. Choose which band beside the option

The last two are only offered when they make sense: Add band needs a format that can hold more than one band, and both need a raster whose geometry can be described by a single cell size. When either is chosen, the Grid tab shows the existing file's extent and cell size greyed out - a band has to match the raster it lives in.

Grid Tab

Minimum X, Maximum X, Minimum Y and Maximum Y give the area to cover, as the centres of the corner cells. Data extents fills them from the range of the chosen X and Y channels over the survey's active lines.

Cell size is the spacing, the same in both directions.

Underneath, the dialog reports the number of cells each way, the area actually covered and the total cell count. The covered area is worth a glance: a grid holds a whole number of cells, so the maximum it reaches is rarely the number you typed, and this is where you see what you are really getting.

Cell counts above ten million are coloured amber and above fifty million red. There is nothing stopping you, but a grid that large takes a long time to solve and may not fit in memory.

Tip

A sensible cell size is between a quarter and a half of the line spacing. Finer than that invents detail between the lines that the survey never measured.

Advanced Tab

Blanking distance leaves cells further than this from any reading empty, in ground units. It is what stops gridding drawing a confident surface across a gap where nothing was measured. Set it to around the line spacing. Zero fills the whole rectangle.

Tension controls how much the surface is allowed to overshoot. Pure minimum curvature, a tension of zero, gives the smoothest result but can swing past the data near steep gradients, producing highs and lows that are not there. Raising the tension pulls the surface back towards the readings at the cost of some smoothness, and helps gridding settle on noisy data. The default of 0.25 is the usual choice for magnetic, radiometric and electromagnetic data; use zero for smooth data such as topography or a modelled field, and no more than about 0.5 before the surface starts to follow the lines.

Maximum iterations and Convergence tolerance control how long gridding works on the surface. The surface is refined in repeated passes, stopping when no cell changes by more than the tolerance or when the maximum number of passes is reached, whichever comes first. A tolerance of zero lets SI choose one from your data: a ten thousandth of the spread of the readings about their trend. Noisy readings gridded with no tension can keep the surface changing by more than that for a long time. When the limit is reached the grid is still written, but the dialog stays open to say the result did not converge and the log records a warning. The grid is usable; Adjust and grid again takes you back to the settings, where more iterations or a little more tension will settle it.

On a few surveys - typically lines spaced close to a whole number of cells apart - gridding has to proceed more cautiously partway through to stay stable. This happens automatically and is noted in the log; it costs a little more time and needs nothing from you.

Note

The method is minimum curvature with tension as published by Smith and Wessel (1990), the method most geophysical gridding packages offer. Where several readings fall in the same cell they are first averaged to a single value at their mean position.

No data value sets the value written for empty cells. Left off, empty cells are written as NaN, which every format but the integer ones can hold.

Restore defaults puts the whole tab back.

Gridding From the Assistant

The Assistant can run the same gridding from a sentence: "grid the magnetics at a 50 m cell with a 200 m blanking distance". It reads the survey's channels, extent and a suggested cell size first, then grids in the background and writes the file, which it can load as a surface if you ask. The result is logged like a run from this dialog; a grid above fifty million cells is refused, and the Assistant does not use the settings remembered here.

Remembered Settings

Every setting here is stored in the project, so reopening the dialog - or the project - brings back the values you last clicked OK with. Cancelling leaves them as they were.

Also See