Knit Grids Together

Use Knit Two Grids Together (GRIDSTCH GX) or Knit Multiple Grids Together (GRIDSTCH2 GX) to stitch two or more grids into a single output grid.

These options are available under:

  •  Grid and Image > Merge GridsKnit Two Grids Together
  •  Grid and Image > Merge GridsKnit Multiple Grids Together

Knit Two Grids Together / Knit Multiple Grids Together dialog options

Input grid #1

Select the first input grid.

This grid acts as the master grid. Its projection and cell size determine the projection and cell size used in the output grid (unless a different cell size is specified below).

Script Parameter: GRIDSTCH.IFILE1

Input grid #2

Select the second input grid.

This grid does not need to share the same projection or cell size as grid #1. It inherits the projection of grid #1 and the specified output cell size. Point values are automatically interpolated and transformed to the output grid locations.

Script Parameter: GRIDSTCH.IFILE2

Input grid #3 to Input grid #10
(or up to #20 when using a script)

When stitching multiple grids, you can optionally specify additional grids in the order they should be processed.

Grids are stitched sequentially onto the growing output grid.

Behaviour notes:

  • Each grid is merged using the selected stitching method.

  • Grids may overlap or be non-overlapping.

  • The order of grids matters. Inputs must be sequential, with no gaps in the list.

    For example, if you specify grids #1, #2, and #5 (leaving #3 and #4 blank), only grids #1 and #2 are processed.

  • Up to 20 grids can be specified in a script.

Script Parameter: GRIDSTCH.IFILEX (where X is a value from 3 to 20).

Output grid

Specify the output grid name.

The output grid uses:

  • The same projection as grid #1

  • The same cell size as grid #1 (unless overridden below)

Script Parameter: GRIDSTCH.OFILE

Stitch method

Select one of the following methods:

  • Blend

  • Suture (default)

  • Suture - Old

See the Application Notes below for details.

Script Parameter: GRIDSTCH.METHOD

Detrending method

Select a detrending option:

  • None – No detrending.

  • To each other – Trends are calculated using only the input grids

  • To a regional grid – Trends are calculated relative to a regional grid

    The regional grid must cover the full spatial extent of all input grids.

Script Parameter: GRIDSTCH.TRMETHOD [0: None, 1: To each other, 2: To a regional grid]

Output grid cell size

Specify the output cell size.

If not specified, the cell size of grid #1 is used.

Script Parameter: GRIDSTCH.CELLSIZE

Mask output

Available only in the two-grid dialog. Controls which grid areas are included in the output.

This is commonly used in “postage-stamp” grid knitting, where only one grid’s area is required.

Options:

  • No (default) – Output includes both grids combined

  • Grid1/Grid2 – Output is limited to the selected grid’s area

For overlapping regions:

  • Blend – Includes all points in the overlap region

  • Suture – Includes points up to the suture boundary (path).

Selecting No is equivalent to combining Grid1 and Grid2.

Script Parameter: GRIDSTCH.MASK_OUTPUT [0: None, 1: grid 1, 2: grid 2]

[Options]

Click Options to configure: 

Application Notes

There are two primary grid-stitching methods: Blend and Suture, plus the legacy Suture - Old method.

Input grids do not need to overlap. Where grids overlap, the selected stitching method is applied. Where grids do not overlap (that is, only one grid provides data), values are carried through unchanged, aside from any detrending or resampling due to differences in registration or cell size.

Blend Method

The Blend method uses a blending function over the area of overlap to ensure a smooth transition between grids.

Outside the overlap region, grid values remain unchanged (except for any optional removal of a static offset or trend).

Within the overlap region, the contribution from each grid depends on the relative proximity of the edges of the two grids to each calculated position.

For example, if a position is equidistant from both grid edges, its value is the average of the two grids at that point. A cosine-based function is used that varies smoothly from 0 to 1, takes a value of 0.5 at positions midway between two grids, and whose derivative approaches 0 at both ends.

Singular Points

Where the edges of grid #1 and grid #2 intersect at a single point, the blending scheme breaks down, since by definition both grids fully define that point. In this case, the output value is the average of the two grids' values at the point.

Suture Method

The Suture method defines a line within the overlap region along which the grids are joined.

  • The suture path must lie within the overlapping region between the grids.

  • If no overlap exists, a suture path cannot be defined and the method is not applied until overlap exists.

  • The tool does not fill dummy cells prior to suturing.

If jagged joints occur, inspect the suture path for incomplete overlap. Cut-off sections of the grid do not contribute to the final grid.

Along the suture line: 

  • Differences between grid values are corrected by adjusting values on both sides of the path.

    For example, if at a point on the suture path the value in grid #1 is 1.0 larger than in grid #2, the discrepancy may be reduced by averaging the values.

  • Points adjacent to the path may then be adjusted to produce a smooth transition between the two grids.

Values near the suture path are calculated using a distance-weighted average of nearby points along the path.

If the automatic suture path option is used, the suture line bisects the overlap region so that each point along the line is approximately equidistant from the overlap boundaries.

Suture - Old Method

This legacy method:

  • Calculates differences between the two grids along the suture path

  • Decomposes them into spatial wavelengths (corrections)

  • Applies these corrections on either side of the path

Characteristics:

  • Longer wavelengths propagate farther from the path

  • Corrections from each suture point are applied within a radius defined by the correction width.

  • Provides smooth transitions without over-smoothing high-frequency variations that may occur along the suture path.

This method is conceptually similar to geometric optics, where the amplitude at a given location is determined by summing contributions from point propagators along an interface.

It typically produces minimal artifacts, even around corners or bends in the suture path.