Overlay Grid Lines

If a view contains a standard, RPC, or pseudo spatial reference, you can overlay grid lines in that view. This topic describes how to work with grid lines. See the following sections:

You can also write a script to overlay grid lines using the ENVIView::CreateGridLinesLayer method and the ENVIGridLinesLayer routine.

Introduction

Once a view contains a base projection from displaying a raster, vector, or other projected layer, click the Annotations drop-down list in the ENVI toolbar and select Grid Lines.

Note: You can also select File > New > Grid Lines Layer from the menu bar. Or, right-click on a View layer in the Layer Manager and select New > Grid Lines Layer.

A default set of grid lines displays in the view. Coordinate labels also display along the edge of the grid in the default units of the coordinate system. The Layer Manager lists a new Grid layer. The grid line properties are displayed below the ENVI Toolbox.

To remove grid lines from the view, right-click on the Grid layer in the Layer Manager and select Remove.

You can also add multiple sets of grid lines, each in a different coordinate system. Click the Annotations drop-down list and select Grid Lines again to display the Select Coordinate System dialog. After choosing a new projection and clicking OK, the new grid lines will overlay the original grid lines. A new Grid layer for that projection is added to the Layer Manager. The following figure shows an example of displaying State Plane coordinates (yellow) along with Geographic WGS-84 latitude and longitude coordinates (pink):

Change Grid Line Properties

Properties of a grid line layer are displayed beneath the Toolbox in the lower-right corner of the ENVI application. Update the following properties as needed.

These settings persist until you close the ENVI session. To retain these settings for all ENVI sessions, use the Annotation Grid Line preferences in the ENVI Preferences dialog.

Create Output

Choose one of the following options to export a dataset with grid lines to a file on disk:

Examples

The following example shows how to display intersections only. Grid lines, intersections, and bounding boxes all inherit the same values when you change the Grid Color, Grid Thickness, and Grid Linestyle properties.

See Also

Annotations, Map Information in ENVI