The SetViewExtents method enables the user to set a four-element array, in the form [xMin, yMin, xMax, yMax], containing the extents of the magenta rectangle in the Navigate window (the region visible in the Main window). The default extent values use the WGS84 coordinate system. This method requires the ENVI LiDAR 3D Viewer user interface to be running and available.

If the SPATIALREF keyword is supplied, the extents are converted from the SPATIALREF coordinate system to the WGS84 coordinate system.

The view extents specified will be restricted to the 2000 x 2000 meter limit. If a value larger than these limits is specified, the extents will be restricted to the stated limits and a message will be written to the Operations Log in the user interface.

This method has been deprecated. Use ENVIPointCloudViewer::SetViewExtents instead.


; Get the ENVI LiDAR session
e = E3De(/CURRENT)
; Open a las file
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['DataSample'])
lidar = e.OpenLidar(file, AUXILIARY_URI='C:\lidar\DataSample')
extents = e.GetViewExtents()
e.SetViewExtents, extents + 100.0
; Close any open lidar objects


E3De.SetViewExtents, Extents [, ERROR=variable] [, SPATIALREF=E3DLidarspatialref]



A four-element array containing the extents of the Navigate window, in the form [xMin, yMin, xMax, yMax].



Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.


An instance of an E3DLidarSpatialRef. If this keyword is set, the extents should be specified in the coordinate system set in SPATIALREF.

This is useful for converting coordinates between the native E3DLidar coordinate system and a user-specified coordinate system.

If this keyword is set and the LiDAR file does not have information about the coordinate system used, or the coordinate system in use is Arbitrary, an error will be generated.

Version History

3.2 SP1


ENVI 5.3 Obsolete

See Also

E3De, E3De::GetViewExtents, E3De::OpenLidar, E3DLidar, E3DLidarSpatialRef