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

  >  Docs Center  >  ENVI API  >  Point Clouds  >  ENVISpatialSubsetPointCloud



This method creates a new ENVISpatialSubsetPointCloud object which is a spatial subset of an existing ENVIPointCloud object. This can be used with ENVI LiDAR processing ENVITasks to process only the specified subset of the data.

Note: The methods GetPointsInCircle, GetPointsInPolygon, GetPointsInRect, GetPointsInTile are not constrained by this sub-rectangle; they still return data from the full extents.


; Create a headless instance
; 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')
; Create a spatial subset of 100m x 100m for processing
subset = ENVISpatialSubsetPointCloud(pointcloud, [593741.00, 5289518.0, 593841.00, 5289618.0])
; Typical use case scenario would be to subset data for Feature Extraction processing
task = ENVITask('PointCloudFeatureExtraction')
task.INPUT_POINT_CLOUD = subset
PRINT, 'Executing Point Cloud Feature Extraction Task'
; Get and print the generated products information
productsInfo = Task.OUTPUT_PRODUCTS_INFO
print, productsInfo


Result = ENVISpatialSubsetPointCloud(PointCloud, SubRect [, ERROR=variable])

Return Value

This method returns an ENVISpatialSubsetPointCloud object that is a spatial subset of the original point cloud file.



Specify the input ENVIPointCloud.


Set this keyword to a four-element double-precision array expressing the spatial range of the required subset. The array is of the form [x1, y1, x2, y2], where:

  • x1 = the minimum X value to include in the subset
  • y1 = the minimum Y value to include in the subset
  • x2 = the maximum X value to include in the subset
  • y2 = the maximum Y value to include in the subset

These should be specified in the coordinate system used by the ENVIPointCloud object (see the ENVIPointCloud SPATIALREF property)

Note: To subset in the Z direction, use the GENERAL_CLIP_MIN_HEIGHT and GENERAL_CLIP_MAX_HEIGHT properties in ENVIPointCloudFeatureExtractionTask.


ENVISpatialSubsetPointCloud has the same methods as the ENVIPointCloud object, plus the following:




ENVISpatialSubsetPointCloud has the same properties as the ENVIPointCloud object.



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

ENVI 5.3


ENVI 5.3, Service Pack 2 Added Dehydrate method

ENVI 5.4

Added Hydrate method

API Version


See Also

ENVIPointCloud, ENVIPointCloudFeatureExtractionTask

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