ENVITime
This is a reference to a time object.
Example
The following code sets the acquisition time for a raster dataset and creates an ENVITime object with the time information. Copy and paste the following code into the IDL command line.
; Start the application
e = ENVI(/HEADLESS)
; Open a raster
file = FILEPATH('qb_boulder_msi', ROOT_DIR = e.ROOT_DIR, $
SUBDIRECTORY = ['data'])
; Set the data acquisition time.
; Note: this is only an example, not the actual
; acquisition time for this dataset.
timeStr = '2001-01-01T00:30:45.321Z'
timeObj = ENVITime(ACQUISITION = timeStr)
raster = e.OpenRaster(file, TIME_OVERRIDE = timeObj)
; Verify that the raster contains an acquisition time field
PRINT, raster.time.acquisition
Methods
Properties
Properties marked as (Get) can be retrieved, but not set.
ACQUISITION (Get)
This property contains a string with information about the raster's acquisition time. Specify a string with the acquisition time, conforming to the ISO-8601 standard. The string can be in any of the following formats:
YYYY-MM-DD
YYYY-MM-DDTHH:MM:SS.DZ
YYYY-MM-DDTHH:MM:SS:Dooo:mm
Where:
YYYYis the four-digit yearMMis the two-digit monthDDis the two-digit dayTseparates the date and timeHHis the two-digit hourMMis the two-digit minuteSSis the two-digit secondDis the decimal fraction of a second with up to double-precisionZindicates that the time is in Coordinate Universal Time (UTC)ooois a two-digit offset in hours from UTC time. If the offset is negative, a minus symbol (-) precedes the value.mmis an optional partial-hour offset (in minutes) from UTC time.
Version History
|
ENVI 5.0.2 |
Introduced |
|
ENVI 5.3.1 |
Added Dehydrate method |
|
ENVI 5.4 |
Added Hydrate method |
See Also
ENVIRaster, ENVI::OpenRaster, ENVIRaster::WriteMetadata