ENVIPointCloudSpatialRef::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
; Start the application
e = ENVI(/HEADLESS)
; The new (target) coordinate system is Lat Long EPSG code 4326
targetSpatialRef = ENVIPointCloudSpatialRef(COORD_SYS_CODE = 4326)
; Retrieve the dehydrated hash
dehydratedForm = targetSpatialRef.Dehydrate()
; Restore the object
newSpatialRef = ENVIPointCloudSpatialRef.Hydrate(dehydratedForm)
Print, newSpatialRef, /IMPLIED_PRINT
Syntax
Result = ENVIPointCloudSpatialRef.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 |
---|---|
factory |
Required. A string value of |
coord_sys_code |
An unsigned long integer containing a geographic (GEOGCS) or projected (PROJCS) coordinate system code (EPSG code). If this property and GEOCENTRIC are 0 and COORD_SYS_STR is an empty string, then the ENVIPointCloudSpatialRef object represents an arbitrary coordinate system (the geographic location and projection is unknown). If COORD_SYS_STR and COORD_SYS_CODE are both set in the call to ENVIPointCloudSpatialRef, the COORD_SYS_STR takes precedence and the COORD_SYS_CODE value is set to 0. Example: "coord_sys_code" : 20354 |
coord_sys_str |
A string containing a geographic (GEOGCS) or projected (PROJCS) coordinate system string (Well Known Text or WKT string) If this string is empty and COORD_SYS_CODE is 0, then the ENVIPointCloudSpatialRef represents an arbitrary coordinate system (the geographic location and projection is unknown). Example: "coord_sys_string" : |
geocentric |
A boolean value that specifies if the coordinate system is Geocentric. Example: "geocentric" : 0 |
units |
A scalar string that specifies the units of the coordinate system. Valid values are:
Units must be set if the coordinate system is arbitrary. If COORD_SYS_STR is set then UNITS are ignored as the string already contains the units. If the coordinate system is geographic then units must be set to specify the vertical units. Example: "units": "METERS" |
For a full list of coordinate system strings and codes, refer to the following text files in the \IDLxx\resource\pedata\predefined
directory of the ENVI distribution:
EnviPEProjcsStrings.txt
: PROJCS codes and stringsEnviPEGeogcsStrings.txt
: GEOGCS codes and strings
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.
API Version
4.2
Version History
ENVI 5.4 |
Introduced |
See Also
ENVIPointCloudSpatialRef, ENVIPointCloudSpatialRef::Dehydrate, ENVIHydratable, ENVIHydrate