This task searches and opens rasters in a given directory based on a match pattern.

Example


; Start the application
e = ENVI()
 
; Specify directory
Dir = Filepath('', Root_Dir=e.Root_Dir, Subdir=['data'])
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('FindRasters')
; Define inputs
Task.DIRECTORY = Dir
 
; Run the task
Task.Execute
 
; Display the result
View = e.GetView()
foreach Raster, Task.OUTPUT_RASTERS do Layer = View.CreateLayer(Raster)

Syntax


Result = ENVITask('FindRasters')

Input properties (Set, Get): DIRECTORY, IGNORE_ERRORS, INCLUDE_SUBFOLDERS, SEARCH_PATTERN

Output properties (Get only): OUTPUT_RASTERS

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

DIRECTORY (required)

Specify the directory in which to find raster files.

IGNORE_ERRORS (optional)

Specify whether to ignore errors during opening, or to halt execution.

INCLUDE_SUBFOLDERS (optional)

Specify whether or not to include subdirectories in the search.

SEARCH_PATTERN (optional)

Specify an array of strings containing the patterns for files to match. The default is *.hdr, which will find all files in ENVI format.

OUTPUT_RASTERS

The resulting rasters found.

Version History


ENVI 5.6.2

Introduced

API Version


4.2

See Also


ENVITask