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


  >  Docs Center  >  ENVI API  >  Point Clouds  >  ENVIPointCloud

ENVIPointCloud

ENVIPointCloud

ENVIPointCloud is a reference to a point cloud object. For details on creating an ENVIPointCloud object and processing it into an optimized file format, see ENVI::OpenPointCloud. For details on creating an ENVIPointCloud for writing points to a new LAS file, see ENVIPointCloud::WritePoints.

Example


; Create a headless instance
e = ENVI(/HEADLESS)
 
; Open a las file
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data','lidar'])
pointcloud = e.OpenPointCloud(file, PROJECT_URI='C:\lidar\DataSample')
 
; Print information about the point cloud
print, pointcloud
 
; Close the point cloud object
pointcloud.Close

Syntax


Result = ENVIPointCloud([, URI] [, Keywords=value] [, Properties=value])

Keywords

[, ERROR=variable] [, LAS_OFFSET=value] [, LAS_SCALE_FACTOR=value] [, OVERWRITE=value]

Properties

AUXILIARY_URI, DATA_RANGE, NPOINTS, PROJECT_URI, READ_ONLY, SOURCE_URI, SPATIALREF, TILE_SIZE_METERS, TILES_X, TILES_Y, URI

Return Value


This function returns a reference to an ENVIPointCloud object.

Arguments


URI

The fully qualified filename to be written, including the .las extension.

Methods


Close

Dehydrate

GetPointsInCircle

GetPointsInPolygon

GetPointsInRange

GetPointsInRect

GetPointsInTile

Hydrate

Save

WritePoints

Keywords


Keywords are applied only during the initial creation of the object.

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.

LAS_OFFSET

Set this keyword to a three-element array of doubles that specify the x, y, and z offsets used in the new LAS file being written. The offsets can effect the precision of the point positions stored in the LAS file. See the LAS specification on the ASPRS web site for more details. If this keyword is not set the default value for LAS_OFFSET is [0.0, 0.0, 0.0].

LAS_SCALE_FACTOR

Set this keyword to a three-element array of doubles that specify the x, y, and z scale factors used in the new LAS file being written. The scale factors can affect the precision of the point positions stored in the LAS file. See the LAS specification for more details.

If this keyword is not set the default value for LAS_SCALE_FACTOR is [0.0000001, 0.0000001, 0.0000001] for LAS files using lat/lon coordinate system and [0.01, 0.01, 0.01] for all other coordinate systems.

OVERWRITE

By default, if the file specified by the URI argument already exists, an error will be thrown. Set this keyword to enable overwriting an existing LAS file.

Properties


Properties marked as (Init) are applied only during the initial creation of the object. Properties marked as (Get) can be retrieved but not set. All other properties can be set during the creation of the object, or retrieved or changed after creation.

AUXILIARY_URI (Get)

This property retrieves a string array containing the URLs for the ENVIPointCloud project files. If there are no auxiliary files, !NULL is returned.

DATA_RANGE (Get)

This property retrieves a six-element array containing the boundary of the entire data space, in the form [xmin, ymin, zmin, xmax, ymax, zmax].

The DATA_RANGE values use the coordinate system of the dataset (see the SPATIALREF property).

METADATA (Get)

This property retrieves a reference to the ENVIPointCloudMetadata object. This contains the metadata for the ENVI LiDAR optimized file (the project). If you wish to read the metadata from a point cloud file (las, laz, etc.) directly, then query it with ENVI::QueryPointCloud and get the ENVIPointCloudQuery METADATA property.

NPOINTS (Get)

An unsigned long value containing the total number of points in the dataset. If there are multiple files associated with this ENVIPointCloud, this is the total number of points in all the files.

PROJECT_URI (Get)

This property retrieves a string containing the path to the directory that contains the ENVIPointCloud's project files. If there are no project files, !NULL is returned.

READ_ONLY (Get)

Returns 1 if the ENVIPointCloud is read-only, and returns 0 if it is not. If the value is 0, the WritePoints and Save methods are available.

SOURCE_URI (Get)

An array of strings containing the fully-qualified filenames of the point cloud files used in this ENVIPointCloud. This is useful to get the list of files that were imported into an ENVI LiDAR project.

SPATIALREF (Init, Get)

If creating an ENVIPointCloud object for writing to a new file, set this property to an ENVIPointCloudSpatialRef object to have the coordinate system information contained in the ENVIPointCloudSpatialRef written to the .las file.

Note: If the coordinate system information is specified using the COORD_SYS_STR, it must have a corresponding EPSG code in the string (e.g., AUTHORITY["EPSG","2236"]), otherwise the coordinate system information will not be written to the LAS header.

If reading from an existing file this property holds a reference to an ENVIPointCloudSpatialRef object that contains the coordinate system information for this point cloud data.

If ENVI::OpenPointCloud was called with an .ini file or an array of point cloud files, this property contains the coordinate system information for the project (either UTM WGS84 or arbitrary).

TILE_SIZE_METERS (Get)

A double value containing the tile size used in the optimized file. The value will be 0 if point cloud data has not been written to an optimized file.

TILES_X (Get)

A long integer value containing the number of tiles in the X direction in the optimized file. The value will be 0 if point cloud data has not been written to an optimized file.

TILES_Y (Get)

A long integer value containing the number of tiles in the X direction in the optimized file. The value will be 0 if point cloud data has not been written to an optimized file.

URI (Get)

A string that is the fully-qualified point cloud filepath that was passed to ENVI::OpenPointCloud().

Version History


ENVI 5.3

Introduced

ENVI 5.3, Service Pack 2 Added Dehydrate method

ENVI 5.4

Added Hydrate method

ENVI 5.5 Added AUXILIARY_URI property

API Version


3.3

See Also


ENVI::OpenPointCloud, ENVI::QueryPointCloud, ENVIPointCloudSpatialRef, ENVIPointCloudMetadata, ENVISpatialSubsetPointCloud, ENVIGeneratePointCloudsByDenseImageMatchingTask, ENVICreatePointCloudTask



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