Grid Outline

Use the Grid and Image > Utilities > Grid Outline menu option (GX: GRID2PLY) to detect edge points in a grid image. You can either save the detected edges to a polygon file or draw them directly on the current map.

Grid Outline dialog options

Grid file

The name of the grid file from which to extract edge points.

Script Parameter: GRID2PLY.GRID

Action

Choose how to output the detected edge:

  • Draw on current map — draws the polygon on the active map.

  • Save to a file — saves the edge coordinates to a polygon (.ply) file.

The next dialog depends on which action you select.

Script Parameter: GRID2PLY.ACTION

(If the first letter is "D", the polygon is drawn to the current map.)

Minimum polygon size (points)

Specifies the minimum number of points a polygon must have to be included.

  • Default: 0 points (includes all polygons).
    This option is useful for very large grids with many small “island” polygons, as it ignores polygons with fewer than x points.

Script Parameter: GRID2PLY.MINPOINTS

Save Edges to a Polygon File

Polygon file name (.ply)

The name of the polygon (.ply) file to create or update.

Script Parameter: GRID2PLY.PLY

Save mode

Choose how to save the polygon data:

  • New file — create a new polygon file.

  • Append — add the polygons to an existing file.

Script Parameter: GRID2PLY.MODE

Edge resolution (cells)

Controls thinning of edge points.

  • Default: 1 cell (no thinning).

  • Values > 1 thin the edge to produce a coarser polygon.

Script Parameter: GRID2PLY.EDGERES (Default 1.0)

Draw Grid Edge on the Map

Line colour

Select the line colour for the edge.

Script Parameter: GRID2PLY.LCOLOR

Fill colour

Select the fill colour for the polygon.

Script Parameter: GRID2PLY.FCOLOR

Line thickness (mm)

Specify the thickness of the drawn edge line in millimetres.

Script Parameter: GRID2PLY.THICK

Line style

Choose a line style from the list.

Script Parameter: GRID2PLY.STYLE

Style pitch (mm)

Specify the style pitch for patterned line styles.

Script Parameter: GRID2PLY.PITCH

Edge resolution (cells)

Enter the edge-thinning resolution for map output, in millimetres.

  • Default: 0.2 mm

  • Set to a negative value to disable thinning.

This option reduces rendering size for complex edges at large scales.

Script Parameter: GRID2PLY.EDGERESMAP (Default 0.2)

Application Notes

Only the outer boundary of the first non-dummy grid region is outlined.
Holes and interior islands are not detected.

If the grid outline is saved to a polygon file, it may be used for:

  • Masking operations

  • Drawing on maps using POLYDRAW GX

  • Use by external programs

The Edge resolution parameter controls thinning by removing colinear points below the specified resolution, producing a coarser edge.

  • For map output, thinning is disabled when the value is less than 0.0.

  • For file output, thinning is applied only if the resolution is greater than the grid’s X cell size.