ENVIView::CreateGridLinesLayer

The CreateGridLinesLayer function method creates and returns a new ENVIGridLinesLayer object. The layer is displayed in the parent view.

Example

; Launch the application

e = ENVI()

 

; Create an ENVIRaster

file = FILEPATH('qb_boulder_msi', $

  ROOT_DIR=e.ROOT_DIR, SUBDIRECTORY = ['data'])

raster = e.OpenRaster(file)

view = e.GetView()

 

; Create a true-color layer

layer = view.CreateLayer(raster)

 

; Create grid lines

gridlinesLayer = view.CreateGridLinesLayer()

Syntax

Result = ENVIView.CreateGridLinesLayer([, Keywords=value])

Return Value

This method returns a reference to the ENVIGridLinesLayer.

Arguments

None

Keywords

COORDINATE_SYSTEM (optional)

A fully qualified coordinate system string associated with the view. If no coordinate system is specified, then the coordinate system of the parent view will be used.

GEOGRAPHIC_FORMAT (optional)

An integer that specifies the format for displaying coordinates when the grid represents a geographic coordinate system. The choices are:

GEOGRAPHIC_PRECISION (optional)

An integer value that specifies the number of decimal places displayed for any GEOGRAPHIC_FORMAT setting.

GRID_COLOR (optional)

The color of the grid lines and bounding box. You can specify colors in the following ways:

For example, the following values all specify the same color:

"light_blue"

"#ADD8E6"

[173, 216, 230]

GRID_STYLE (optional)

An integer value that specifies the line style used to draw the polyline. The choices are:

GRID_THICKNESS (optional)

A floating-point value between 0.0 and 10.0 that specifies the line thickness (in points) used to draw the grid lines.

HIDE (optional)

Set this property to 1 to hide the layer, or set it to 0 to display it. The default value is 0.

INTERSECTIONS_SYMBOL_SIZE (optional)

A floating-point value that specifies the size of the intersection symbols, in points.

NAME (optional)

A string value with the name of the layer.

SHOW_BOX (optional)

A Boolean value that controls the display of a bounding box along the edge of the grid.

SHOW_INTERSECTIONS (optional)

A Boolean value that controls the display of crosshairs at grid line intersections.

SHOW_LINES (optional)

A Boolean value that controls the display of the inner grid lines.

SHOW_TEXT (optional)

A Boolean value that controls the display of coordinate labels along the outside edge of the grid.

TEXT_COLOR (optional)

The color of the text labels. You can specify colors in the following ways:

For example, the following values all specify the same color:

"light_blue"

"#ADD8E6"

[173, 216, 230]

TEXT_FONT_NAME (optional)

A string containing the name of the font used.

TEXT_FONT_SIZE (optional)

A floating-point value that specifies the point size of the font.

TEXT_OFFSET (optional)

A floating-point value that specifies the distance (in points) from the coordinate labels to the grid lines.

TEXT_ORIENTATION_X (optional)

An integer value that specifies the orientation of the X labels:

TEXT_ORIENTATION_Y (optional)

An integer value that specifies the orientation of the Y labels:

TRANSPARENCY (optional)

An integer value between 0 (opaque) and 100 (invisible) that specifies the transparency of the layer. The default value is 0.

X_SPACING (optional)

The spacing of grid lines in the X-direction, in the units of the current coordinate system (for example, in meters for a UTM projection).

Y_SPACING (optional)

The spacing of grid lines in the Y-direction, in the units of the current coordinate system (for example, in meters for a UTM projection).

Version History

ENVI 5.3.2

Introduced

API Version

4.2

See Also

ENVIGridLinesLayer, ENVIRasterLayer, ENVIVectorLayer