ENVIRaster::CreatePyramid

This method creates a pyramid file for an ENVIRaster. (See Pyramids Background for more information.)

Example

The following code creates a pyramid file after opening an ENVIRaster:

; Launch the application

e = ENVI()

 

; Create an ENVIRaster

file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $

SUBDIRECTORY = ['data'])

raster = e.OpenRaster(file)

 

; Create a pyramid

raster.CreatePyramid

 

; Verify that the pyramid exists

PRINT, raster.PYRAMID_EXISTS

Syntax

ENVIRaster.CreatePyramid [, Keywords=value]

Arguments

None

Keywords

Keywords are applied only during the initial creation of the object.

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.

INCLUDE_FULL_RESOLUTION

Set this keyword to 1 to create a pyramid file for the full-resolution zoom level (the default value). This will improve visualization performance.

Set this keyword to 0 to not create the full-resolution pyramid file. This will save disk space, but visualization will be slower.

Full-resolution pyramids are always built for the following data formats, regardless of this keyword setting. This means you cannot set INCLUDE_FULL_RESOLUTION to 0 for custom readers.

Pyramids are never built for the following formats, so an error message will be issued if you try to create pyramids for these formats:

SAME_LOCATION

Set this keyword to build the pyramid in the same location as the original raster. If this location is not writable, an error is thrown instead of creating the pyramid in the auxiliary file location.

Version History

ENVI 5

Introduced

API Version

4.2

See Also

ENVIRaster, Pyramids Background