Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

Harris Geospatial / Docs Center / ENVI API / Obsolete / E3De::GetViewExtents



The GetViewExtents function method returns 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 returned using that coordinate system.

The view extents specified will be restricted to the 1000 x 1000 meter limit for 32-bit installations, and the 2000 x 2000 meter limit for 64-bit. 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::GetViewExtents 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()
; print the extents
print, extents
; Close any open lidar objects


Result = E3De.GetViewExtents([ERROR=variable] [, SPATIALREF=E3DLidarspatialref])

Return Value

A four-element array containing the extents of the magenta rectangle in the Navigate window (the region visible in the Main 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 returned in Result will be converted to the coordinate system specified by the E3DLidarSpatialRef.

This is useful for converting coordinates between the native E3DLidar coordinate system and a user-specified coordinate system. If OpenLidar is called without DIRECT_READ, the native E3DLidar coordinate system will be UTM WGS84. This can be queried via the E3DLidar SPATIALREF property.

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::OpenLidar, E3De::SetViewExtents, E3DLidar, E3DLidarSpatialRef

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