ENVIPointCloudProductsInfo::Hydrate

Use the Hydrate static function method to create the object from its dehydrated form. The dehydrated form consists of a hash containing the object’s properties and values. The Hydrate and Dehydrate methods let you store the object state in memory and restore it later.

Representing an object as a hash is necessary for running ENVI analytics with the ENVI Task Engine.

See the ENVIHydrate function if you are creating a general IDL routine that will restore multiple object types.

For additional information, see What are Hydrate and Dehydrate routines used for?

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=Filepath('DataSample', /TMP))

 

; Process a 300m x 300m subrect

subset = ENVISpatialSubsetPointCloud(pointcloud, [593847.0, 5289683.0, 594147.00, 5289983.0])

 

; Get the point cloud feature extraction task from the catalog of ENVI tasks

Task = ENVITask('PointCloudFeatureExtraction')

 

; Define inputs, select DEM, buildings and trees for generation

; and accept defaults for everything else

Task.INPUT_POINT_CLOUD = Subset

Task.DEM_GENERATE = 1

Task.BUILDINGS_GENERATE = 1

Task.TREES_GENERATE = 1

print, 'Executing Point Cloud Feature Extraction Task'

Task.Execute

 

; Get and print the generated products information

productsInfo = Task.OUTPUT_PRODUCTS_INFO

 

; Retrieve the dehydrated hash

dehydratedForm = productsInfo.Dehydrate()

 

; Restore the object

newProductsInfo = ENVIPointCloudProductsInfo.Hydrate(dehydratedForm)

Print, newProductsInfo, /IMPLIED_PRINT

Syntax

Result = ENVIPointCloudProductsInfo.Hydrate(DehydratedForm, ERROR=value)

Return Value

The result is a reference to a new object instance of this virtual raster class.

Arguments

DehydratedForm

Key

Description

buildings_uri

A string containing the fully-qualified filename for the Buildings product.

building_perimeters_uri

A string containing the fully-qualified filename for the Building Perimeters product.

dem_contours_uri

A string containing the fully-qualified filename for the DEM Contours product.

dem_uri

A string containing the fully-qualified filename for the DEM product.

dem_tin_uri

A string containing the fully-qualified filename for the DEM TIN product.

dsm_uri A string containing the fully-qualified filename for the DSM product.
orthophoto_uri A string containing the fully-qualified filename for the Orthophoto product.
pointcloud_uri An array of strings containing the fully-qualified filenames for the Point Cloud products.
powerlines_uri A string containing the fully-qualified filename for the Power Lines product.
trees_uri A string containing the fully-qualified filename for the Trees product.

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.4

Introduced

API Version

4.2

See Also

ENVIPointCloudProductsInfo, ENVIPointCloudProductsInfo::Dehydrate, ENVIHydratable, ENVIHydrate