The Export method saves a raster layer to a TIFF format. It saves the full raster layer extent, with image enhancements, at full resolution.
Example
e = ENVI()
file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY = ['data'])
raster = e.OpenRaster(file)
stretchRaster = ENVIEqualizationStretchRaster(raster, $
MIN=[138,154,92,52], MAX=[1492,2047,1785,1807])
view = e.GetView()
rasterLayer = view.createLayer(stretchRaster)
newFile = e.GetTemporaryFilename('tif')
rasterLayer.Export, newFile, 'TIFF'
raster2 = e.OpenRaster(newFile)
layer = view.CreateLayer(raster2)
Syntax
ENVIRasterLayer.Export, URI, Format [, Keywords=value]
Arguments
URI
A scalar string denoting the fully qualified file path in which the raster layer's data will be saved.
Format
A scalar string denoting the format in which the raster layer's data will be saved. The valid string values are as follows:
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
API Version
4.3
See Also
ENVIRasterLayer, ENVIView::Export, ENVIView::ChipToFile