The Validate function method returns a flag that indicates success (1) or failure (0) if the properties for a PointCloudFeatureExtraction task meet the required criteria for successful execution. An ENVIPointCloud object has a complete set of parameters saved on disk in the ENVIPointCloud PROJECT_URI location. In addition to validating the parameters set on the ENVITask, this function also loads the parameters that were not set on the ENVITask (that is, are !NULL) from the saved parameter set. This is useful for inspecting the saved parameter values.

A simple way to check the valid settings for all properties associated with a given PointCloudFeatureExtraction task is to issue a PRINT statement on the task object. Then you can set the properties with acceptable values before running the task.

The PointCloudFeatureExtraction task's Validate method is an advanced option for users who want to validate properties during run-time execution, or inspect the values that will be used during execution.

Note: If the IGNORE_VALIDATE property to the PointCloudFeatureExtraction task is set to the default value of 0 (false), properties will be validated as they are set. If you set it to 1 (true), then ENVI will not issue errors if properties are invalid.

Example


This example shows how to use Validate to read the saved parameter values and print the values for BUILDINGS_MINIMUM_AREA and DEM_GRID_RESOLUTION. Copy and paste the following code into the IDL command line:

; 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=Filepath('DataSample', /TMP))
 
Task = ENVITask('PointCloudFeatureExtraction')
Task.INPUT_POINT_CLOUD = pointcloud
 
; Enable DEM and buildings generation
Task.DEM_GENERATE = 1
Task.BUILDINGS_GENERATE = 1
 
; Call Validate to read the saved parameter values
val = task.Validate()
 
; Print the saved parameter values for BUILDINGS_MINIMUM_AREA
; and DEM_GRID_RESOLUTION
print, 'task.BUILDINGS_MINIMUM_AREA = ', task.BUILDINGS_MINIMUM_AREA
print, 'task.DEM_GRID_RESOLUTION =' , task.DEM_GRID_RESOLUTION
 
; Close any open point cloud objects
pointcloud.Close

Syntax


Result = ENVIPointCloudFeatureExtractionTask.Validate([VALIDATION_EXCEPTION=variable])

Arguments


None

Keywords


VALIDATION_EXCEPTION

Set this keyword to a variable that will contain a message indicating the reason for any validation exceptions.

Version History


ENVI 5.3

Introduced

API Version


4.3

See Also


PointCloudFeatureExtraction Task