The GetLasHeader function method returns either a single E3DLasHeader object, or an array of E3DLasHeader objects populated with the header information from existing LAS files.

This method has been deprecated. Use METADATA property of ENVIPointCloud instead.

Example


; Create a headless instance
e = E3De(/HEADLESS)
 
; Open a las file
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['DataSample'])
lidar = e.OpenLidar(file, /DIRECT_READ)
 
header = lidar.GetLasHeader()
print, header
 
; Close any open lidar objects
e.Close

Syntax


Result = E3De.GetLasHeader([COUNT=variable] [, ERROR=variable])

Return Value


If E3De::OpenLidar was called to open a single LAS file (with or without the DIRECT_READ keyword), then a single E3DLasHeader object will be returned.

If E3De::OpenLidar was called to open a project file (.ini) that was created from multiple LAS files, then an array of E3DLasHeader objects will be returned. The FILENAME property on each E3DLasHeader can be used to determine which of the original LAS files the header was read from.

If the Lidar object's source data was a .txt or .bin file, then the E3DLasHeader object returned from GetLasHeader() will have valid values for the information available in the original source file and all other values will be zeroed. The LAS header information returned from .txt or .bin files includes:

  • FILE_NAME
  • MAX_X
  • MAX_Y
  • MAX_Z
  • MIN_X
  • MIN_Y
  • MIN_Z
  • NUMBER_OF_POINT_RECORDS

Keywords


COUNT

Set to a named variable that will contain the number of E3DLasHeader objects returned.

ERROR

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.

Version History


3.2

Introduced

ENVI 5.3 Obsolete

See Also


E3De::OpenLidar, E3DLasHeader, E3DLidar