Knit Grids Together

Use the Grid Stitching dialog (GRIDSTCH GX, GRIDSTCH2 GX) to stitch together two (or multiple) grids into a single grid.

Grid Stitching dialog options

Input grid #1

Select input grid 1.

The first grid acts as the "master grid". Its projection and cell size determine the projection and cell size used in the output grid (except if a different cell size is specified below).

Script Parameter: GRIDSTCH.IFILE1

Input grid #2

Select input grid 2.

The second grid does not need to share the same projection or cell size as grid #1. It "inherits" the projection of grid#1, and the cell size specified below, and point values are automatically interpolated and transformed to the output grid locations.

Script Parameter: GRIDSTCH.IFILE2

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

When multiple-grid stitching, optionally specify, in the order they are to be added, grids #3 to #10. Grids are stitched, one at a time, onto the growing final grid. Each successive grid must overlap the previously stitched grids. No "gaps" in specified grids are allowed; that is, you cannot specify grid #1, grid #2 and grid #5, and leave #3 and #4 blank; only the first two would be stitched together.

Using a script, up to 20 input grids can be specified.

Script Parameter: GRIDSTCH.IFILEX, with X a value from 3 to 20.

Output grid

Name of the output grid to create

The output grid has the same projection as grid #1. It has the same cell size as grid #1, unless the cell size is specified differently below.

Script Parameter: GRIDSTCH.OFILE

Stitch method

Select a Stitching Method (Default is Suture). See the notes below for a description of the 3 available methods.

Script Parameter: GRIDSTCH.METHOD

Detrending method

"To each other": Trends are calculated based on the two grids being stitched only, not to some third regional grid. This is the default behaviour (which existed before the regional detrending option was introduced in v5.1.4).

"To a regional grid": Trends are calculated with respect to a regional grid. The regional grid must overlap the entire areas of the grids to be stitched together. The name of the grid, the detrending method used, and whether to remove the regional grid from the final product, are all determined under "Options"

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

Output grid cell size

Set the cell size of the output grid. If left blank, the cell size is taken from the size of the first grid.

Script Parameter: GRIDSTCH.CELLSIZE

Mask output

This option appears for the two grid dialog. Frequently, and especially for postage-stamp grid-knitting, only one of the grid areas is required in the output. Three options are available:

None: The output grid is the combined grids. This is the default situation.

Grid1/Grid2: Output only the specified grid’s area. For the blending method, this includes all points in the overlap region. In the Suture method, this includes all points up to the suture path. In other words, the "None" method produces exactly the same as putting together the results of "Grid1" and "Grid2".

Script Parameter: GRIDSTCH.MASK_OUTPUT: (0: None, 1: Grid 1, 2: Grid 2)

[Options]

Click the Options button to select Trend Removal or Regional Trend Removal, Interpolation, and Suture options.

Application Notes

Stitching Methods

There are two different grid-stitching methods available, the "Blending" method, and the "Suture" method.

The Blending Method

The Blend method uses a blending function over the area of overlap so that transition from one to the other is smooth. Except for the optional removal of a static offset or trend, the grids beyond the overlap regions remain unchanged.

The blending function determines the weighting of one grid against the other inside the overlap region. It works by taking into account the relative proximity of the edges of the two grids to each position calculated; for instance, if a position is equidistant between both edges, its value is the average of the grid values found at that point. A "cosine" function is used which varies smoothly from 0 to 1, takes on 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 cross at a single point, the blending scheme breaks down, since by definition both grids are full owners of the point. In this case the average of the two grids' values at the point is used.

The Suture Method

The Suture method defines a line at which to join the two grids. The line, by necessity, lies completely within the overlapping area of the two grids. Gridknit will NOT fill in dummy cells prior to suturing. If you see jagged joints, inspect the suture path for lack of complete overlap. The "cut-off" sections of the grid have no contribution to the final grid. Along the suture line, the mismatch in the grid values must be corrected by adjusting the grids on either side of the path; for instance, if, at a point on the suture path, the value for Grid #1 is 1.0 larger than the value for Grid #2, the discrepancy could be eliminated by taking the average value. Points adjacent to the path point might then be adjusted so as to produce a smooth transition between the two grids.

Suture Old

This is the first implemented method. It takes the difference between two grids along the path, and then decomposes that difference function into different spatial wavelengths or Corrections that would be applied on either side of the path according to the various frequency components. As a result, the longest wavelengths would spread out the farthest from the path. This suture method propagates the correction required at each suture point in a circle whose radius is equal to the defined Correction width. This method provides smooth blending without over-smoothing high-frequency variations which may occur along the suture path. It is implemented using principles similar to those used in geometric optics, where the amplitude at a given location is found by summing the contributions of point propagators along an interface. This suture method manifests little if any artifacts near corners and bends in the suture path.

Suture

This is a simpler method that assigns values near the suture path based on a distance-weighted average of the nearest points along the suture path.

Suture Path

Options are Automatic, Interactive, Grid #1 Edges and Grid #2 Edges. If the automatic option is selected, the suture line will bisect the overlap region; every point along the line will be at approximately equal distance from the borders of the overlap region.