Window a Grid using Polygon File

Use the Grid and Image > Utilities > Window a Grid using Polygon File menu option (GRIDMASK GX) to create a 'Mask' grid using coordinates defined in a polygon (PLY) file. The polygon coordinates reference the input grid file. The region of the input grid file inside (or outside) the polygon is masked out - i.e., replaced by dummies.

Window a Grid using Polygon File dialog options

Input grid file

File name of the input grid.(.grd file).

Script Parameter: GRIDMASK.GRDIN

Output masked grid file

File name of the output masked grid (.grd file).

Script Parameter: GRIDMASK.GRDOUT

Polygon coordinates file

Name of the file containing the Polygon mask coordinates.(may have more than one polygon).

Script Parameter: GRIDMASK.POLY

Mask the area OUTSIDE or INSIDE the polygon

Select to mask the "OUTSIDE" or "INSIDE" the polygon.

Script Parameter: GRIDMASK.MASKOPT

Minimize size of output grid?

Select "Yes" or "No". to minimize the size of the output grid file.

Script Parameter: GRIDMASK.RESIZE

Application Notes

Use this GX to mask off (replace by dummies) those parts of a grid which are either inside or outside of a defined polygon. The masking polygon may be defined either in a clockwise or counter-clockwise sense, and it may contain up to 2048 vertices. There may be more than one polygon defined in a polygon file. The masking process will mask the grid against ALL polygons defined in the file.

When masking outside the polygon, grid points that lie on a polygon edge are not dummied.

When masking inside the polygon, points on a polygon edge are dummied.

Example:

gridmask tst mtst -p=mask.ply

This masks the grid TST.GRD against the polygon mask defined in the file MASK.PLY. All areas outside the defined polygons are dummied out in the output grid MTST.GRD. The file MASK.PLY would look like the following to mask a simple rectangular area:

435,300

520,300

520,550

435,550