This task populates an ENVI Catalog with a selected raster image from a database of scanned files found using the ScanFilesForCatalog task.

This task requires a separate license for the ENVI Catalog Module; contact your sales representative for more information.

Example


; Start the application
e = ENVI()
 
; Get the  task from the catalog of ENVITasks
Task1 = ENVITask('ScanFilesForCatalog')
 
; Catalog the entire ENVI data folder (no subfolders)
Task1.dir = Filepath('', Subdir=['data'], Root_Dir=e.Root_Dir)
Task1.include_subfolders = 0
 
; Run the task
Task1.Execute
 
; Get the  task from the catalog of ENVITasks
Task2 = ENVITask('PopulateCatalog')
Task2.candidate_database = Task1.output_candidate_database
 
; Process all the files one by one synchronously.
Task2.workers = 0
 
; Run the task
Task2.Execute
print, Task2.output_catalog_database
 
; Take note of the newly created catalog file. 
; To load it, go to File > ENVI Catalog, then choose 
; File > Open Catalog and enter this catalog file.

Syntax


Result = ENVITask('PopulateCatalog')

Input parameters (Set, Get): CANDIDATE_DATABASE, CATALOG_DATABASE, GENERATE_THUMBNAILS, REQUIRE_GEOREFERENCE, WORKERS

Output parameters (Get only): LOG, OUTPUT_CATALOG_DATABASE

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

Input Parameters


CANDIDATE_DATABASE (required)

Specify the database file that contains the candidate files to catalog.

CATALOG_DATABASE (optional)

Specify the database file that will contain the output catalog. If not specified, the rasters will be saved to a temporary catalog file.

GENERATE_THUMBNAILS (optional)

Specify if a thumbnail should be generated for each raster added to the catalog. Disabling this option makes cataloging significantly faster.

REQUIRE_GEOREFERENCE (optional)

Specify if only rasters with a valid spatial reference can be cataloged. Rasters with no georeference will be skipped.

WORKERS (optional)

Specify the number of workers that can run in parallel and autonomously. Using multiple workers speeds up the process. If set to 0, the task will go through all the candidate files one by one. This will block the main ENVI process, meaning it could take many hours - or even days - to populate very large catalogs. The default is 8, the maximum number of workers is 25.

Output Parameters


LOG

A log of all the results from executing this task.

OUTPUT_CATALOG_DATABASE

The resulting catalog database.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 6.3

Introduced

See Also


ENVITask, ScanFilesForCatalog Task, MergeCatalogs Task, PruneCatalog Task, QueryCatalog Task, ExportCatalogToKML Task, ExportCatalogToSTAC Task, Run Models on a Schedule