>  Docs Center  >  ENVI API  >  Processing  >  ENVICreatePointCloudSubProjectTask

ENVICreatePointCloudSubProjectTask

ENVICreatePointCloudSubProjectTask

This task divides an existing ENVI LiDAR project into a number of subprojects for simultaneous processing by a number of ENVI Services Engine (ESE) workers. The creation of multiple projects for processing by multiple ESE workers is necessary to prevent project corruption due to concurrent access. The spatial division of the input ENVIPointCloud object into new subprojects is controlled by the SUB_RECT keyword, but the data extents of the subprojects will always be rounded up to the next 32 x 32 meter tile boundary.

Example


The following example code creates four sub-projects that could be used by ESE workers.

; Create a headless instance
e = ENVI(/HEADLESS)
 
; Open a file
file = FILEPATH('DataSample.las', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data','lidar'])
pointcloud = e.OpenPointCloud(file)
dataRange = pointcloud.DATA_RANGE
dataRangeX = dataRange[3] - dataRange[0]
dataRangeY = dataRange[4] - dataRange[1]
dataCenterX = dataRange[0] + (dataRangeX * 0.5)
dataCenterY = dataRange[1] + (dataRangeY * 0.5)
 
; Create 4 subprojects, each spanning approximately a quarter of the data extents
; Note the actual subproject data extents will be rounded up to the next 32 x 32 meter tile boundary
subProjectDataRange1 = [dataRange[0], dataRange[1], dataCenterX, dataCenterY]
subProjectDataRange2 = [dataCenterX, dataRange[1], dataRange[3], dataCenterY]
subProjectDataRange3 = [dataRange[0], dataCenterY, dataCenterX, dataRange[4]]
subProjectDataRange4 = [dataCenterX, dataCenterY, dataRange[3], dataRange[4]]
 
subProjectUri1 = 'C:\DataSampleSubset1\DataSampleSubset1.ini'
subProjectUri2 = 'C:\DataSampleSubset2\DataSampleSubset2.ini'
subProjectUri3 = 'C:\DataSampleSubset3\DataSampleSubset3.ini'
subProjectUri4 = 'C:\DataSampleSubset4\DataSampleSubset4.ini'
 
task = ENVITask('CreatePointCloudSubProject')
task.INPUT_POINT_CLOUD = pointcloud
task.Execute, URI=subProjectUri1, SUB_RECT=subProjectDataRange1, ERROR=error
task.Execute, URI=subProjectUri2, SUB_RECT=subProjectDataRange2, ERROR=error
task.Execute, URI=subProjectUri3, SUB_RECT=subProjectDataRange3, ERROR=error
task.Execute, URI=subProjectUri4, SUB_RECT=subProjectDataRange4, ERROR=error
 
; only one dataset open at a time
pointcloud.Close
 
; open each subproject and print the data extents
subProject1 = e.OpenPointCloud(subProjectUri1)
subDataRange1 = subProject1.DATA_RANGE
subProject1.Close
 
subProject2 = e.OpenPointCloud(subProjectUri2)
subDataRange2 = subProject2.DATA_RANGE
subProject2.Close
 
subProject3 = e.OpenPointCloud(subProjectUri3)
subDataRange3 = subProject3.DATA_RANGE
subProject3.Close
 
subProject4 = e.OpenPointCloud(subProjectUri4)
subDataRange4 = subProject4.DATA_RANGE
subProject4.Close
 
; print data ranges for the subprojects
print, subDataRange1
print, subDataRange2
print, subDataRange3
print, subDataRange4

Syntax


Result = ENVITask('CreatePointCloudSubProject')

Input properties (Set, Get): INPUT_POINT_CLOUD, SUB_RECT, URI

Output properties (Get only): None

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_POINT_CLOUD

An ENVIPointCloud object that references the project that the subprojects will be created from.

SUB_RECT

A four-element double-precision array expressing the spatial range of the required subproject. Specify the values in the coordinate system used by the ENVIPointCloud SPATIALREF property. The array is of the form [x1, y1, x2, y2], where:

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

The actual data extents of the created subproject will be rounded up to the next 32 x 32 meter tile boundary.

If the SUB_RECT property is not specified, then the entire data extents of the original point cloud object are used.

URI

A scalar string that is a fully-qualified path and name of the new subproject .ini file.

Version History


ENVI 5.3

Introduced

API Version


3.3

See Also


ENVITask, ENVITask::Parameter, ENVI::OpenPointCloud, ENVIPointCloud



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