>  Docs Center  >  ENVI API  >  Display Control  >  ENVIView::CreateGridLinesLayer

ENVIView::CreateGridLinesLayer

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:

  • 0: Decimal degrees
  • 1: Degrees, minutes
  • 2: Degrees, minutes, seconds

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:

  • A string that contains a standard color name. You can use any of the string values defined by the IDL !COLOR system variable.
  • A string that contains a hexadecimal color value, preceded by the # symbol.
  • A three-element RGB vector in the form of [red, green, blue].

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:

  • 0: Solid (default)
  • 1: Dotted
  • 2: Dashed
  • 3: Dash dot
  • 4: Dash dot dot dot
  • 5: Long dash
  • 6: No line

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:

  • A string that contains a standard color name. You can use any of the string values defined by the IDL !COLOR system variable.
  • A string that contains a hexadecimal color value, preceded by the # symbol.
  • A three-element RGB vector in the form of [red, green, blue].

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:

  • 0: Horizontal
  • 1: Vertical

TEXT_ORIENTATION_Y (optional)

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

  • 0: Horizontal
  • 1: Vertical

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, Service Pack 2

Introduced

API Version


3.3

See Also


ENVIGridLinesLayer, ENVIRasterLayer, ENVIVectorLayer



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us