The WritePoints method writes points to a new .las file. Each call to WritePoints appends the supplied points to those already written. Call E3DLidar::Save to finish writing points to the file.

This method has been deprecated. Use ENVIPointCloud::WritePoints instead.

Example


; Create a headless instance
e = E3De(/HEADLESS)
 
; Open existing data
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['DataSample'])
lidar = e.OpenLidar(file, AUXILIARY_URI='C:\lidar\DataSample')
 
; query points to be written to file
points = lidar.GetPointsInRect(593742.0d, 5289519.0d, 593800.0d, 5289650.0d, $
  ALL_ATTRIBS=allAttribs)
 
; Create the writer object (requires Administrative privileges)
File_Mkdir, 'C:\CreatedLasFiles'
writer = E3DLidar('C:\CreatedLasFiles\DataSampleSubset.las')
 
; write points to the file
writer.WritePoints, points, ALL_ATTRIBS=allAttribs, ERROR=error
writer.Save
 
; Close the writer object and any open lidar objects.
writer.Close
e.Close

Syntax


E3DLidar.WritePoints(Points [, ALL_ATTRIBS=variable] [, CLASSIFICATIONS=variable] [, CLASSIFICATION_FLAGS=variable] [, EDGE_OF_FLIGHT_LINE=variable] [, ERROR=variable] [, GPS_TIME=variable] [, INTENSITY=variable] [, NIR=variable] [, NUMBER_OF_RETURNS=variable] [, POINT_SOURCE_ID=variable] [, RETURN_NUMBER=variable] [, RGB=variable] [, SCAN_ANGLE=variable] [, SCAN_DIRECTION_FLAG=variable] [, SCANNER_CHANNEL=variable] [, USER_DATA=variable])

Arguments


Points

The 3-by-n array of points to be written to the file. These points are appended to any points written previously.

Keywords


ALL_ATTRIBS

Set this keyword to an E3D_ALL_ATTRIBS structure that was returned from GetPointsInCircle, GetPointsInPolygon, GetPointsInRange, GetPointsInRect, or GetPointsInTile. This is useful if all of the per-point attributes read from the input file should be written to the new file.

If any of the per-point attribute keywords are specified as well as ALL_ATTRIBS (for example, RGB, INTENSITY, etc.), then the values passed by the keyword will override the corresponding attribute values in ALL_ATTRIBS.

CLASSIFICATIONS

An array of bytes containing the classification for each point.

CLASSIFICATION_FLAGS

An array of bytes containing the special characteristics associated with each point.

EDGE_OF_FLIGHT_LINE

An array of bytes containing the edge of flight line status.

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.

GPS_TIME

An array of double-precision floating points containing the time tag value at which each point was acquired.

INTENSITY

An array of unsigned integers containing the pulse return magnitude for each point.

NIR

An array of unsigned integers containing the near-infrared (NIR) value for each point.

NUMBER_OF_RETURNS

An array of bytes containing the total number of returns for each point.

POINT_SOURCE_ID

An array of unsigned integers containing the point source ID foe each point.

RETURN_NUMBER

An array of bytes containing the pulse return number for each point.

RGB

An array of unsigned integers of size [3,n] containing the RGB color values for each point.

SCAN_ANGLE

An array of integers containing the scan angle rank for each point.

SCAN_DIRECTION_FLAG

An array of bytes containing the scan direction flag for each point.

SCANNER_CHANNEL

An array of bytes containing the channel (scanner head) of each point.

USER_DATA

An array of bytes containing the user data for each point.

Version History


3.2

Introduced

ENVI 5.3 Obsolete

See Also


E3DLidar, E3DLidar::GetPointsInCircle, E3DLidar::GetPointsInPolygon, E3DLidar::GetPointsInRange, E3DLidar::GetPointsInRect, E3DLidar::GetPointsInTile