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.
Example
e = ENVI(/HEADLESS)
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY = ['data','lidar'])
pointcloud = e.OpenPointCloud(file, $
PROJECT_URI=Filepath('DataSample', /TMP))
subset = ENVISpatialSubsetPointCloud(pointcloud, [593741.00, 5289518.0, 593841.00, 5289618.0])
task = ENVITask('PointCloudFeatureExtraction')
task.INPUT_POINT_CLOUD = subset
task.DEM_GENERATE = 1
PRINT, 'Executing Point Cloud Feature Extraction Task'
task.Execute
productsInfo = Task.OUTPUT_PRODUCTS_INFO
print, productsInfo
Syntax
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.
Arguments
PointCloud
Specify the input ENVIPointCloud.
SubRect
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 the PointCloudFeatureExtraction task.
Methods
ENVISpatialSubsetPointCloud has the same methods as the ENVIPointCloud object, plus the following:
Dehydrate
Hydrate
Properties
ENVISpatialSubsetPointCloud has the same properties as the ENVIPointCloud object.
Keywords
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
ENVI 5.3 |
Introduced |
ENVI 5.3.2 |
Added Dehydrate method |
ENVI 5.4 |
Added Hydrate method
|
API Version
4.3
See Also
ENVIPointCloud, PointCloudFeatureExtraction Task