This task queries the ENVI catalog and returns matching rasters.

The CATALOG_DATABASE parameter of this task requires a separate license for the ENVI Catalog Module; contact your sales representative for more information. However, this task can still be used to query the Internal Catalog (included in the ENVI installation). You do not need to set the CATALOG_DATABASE parameter to query the Internal Catalog.

Example


; Start the application
e = ENVI()
 
; Create a catalog with the data shipped with ENVI
Task1 = ENVITask('ScanFilesForCatalog')
Task1.dir = Filepath('', Subdir=['data'], Root_Dir=e.Root_Dir)
Task1.include_subfolders = 0
Task1.Execute
Task2 = ENVITask('PopulateCatalog')
Task2.candidate_database = Task1.output_candidate_database
Task2.workers = 0
Task2.Execute
 
; Get the task from the catalog of ENVITasks
Task3 = ENVITask('QueryCatalog')
Task3.CATALOG_DATABASE = Task2.output_catalog_database
 
; [min_lon, min_lat, max_lon, max_lat] around Boulder, Colorado
Task3.BBOX = [-105.5, 39.5, -104.5, 40.5]
Task3.Execute
 
; Print the resulting rasters' names. Should be the two 
; qb_boulder_xxx example datasets as well  as the two datasets
; that cover the entire world.
foreach raster, Task3.OUTPUT_RASTERS do print, raster.name

Syntax


Result = ENVITask('QueryCatalog')

Input parameters (Set, Get): BBOX, CATALOG_DATABASE, CONTAINED, END_DATE, FILENAME, LIMIT, MODALITY, MONTH_FROM, MONTH_TO, OFFSET, SEARCH, SENSOR, START_DATE

Output parameters (Get only): OUTPUT_RASTERS

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


BBOX (optional)

Specify the bounding box filter as [min_lon, min_lat, max_lon, max_lat]. This returns rasters whose footprints overlap this box.

CATALOG_DATABASE (optional)

The catalog database file to query. If not specified, ENVI's Internal Catalog will be used.

To set this parameter to query a custom catalog, you must have a separate ENVI Catalog Module license.

CONTAINED (optional)

When true, restricts the BBOX filter to rasters whose entire footprint lies within the bounding box. This parameter is ignored if BBOX is not set.

END_DATE (optional)

The end date for a date range filter, inclusive.

FILENAME (optional)

Filter by filename (not full path). It is a partial match against the filename portion of the URI. Foe example, . 'LC08' or '_MTL'.

LIMIT (optional)

The maximum number of rasters to open. Use this with the OFFSET parameter to paginate.

MODALITY (optional)

Filter by modality. Multiple values are matched with OR logic.

MONTH_FROM (optional)

The start month for a seasonal range filter (1=Jan, 12=Dec), inclusive. Combine this with the MONTH_TO parameter to select a month window across any year.

MONTH_TO (optional)

The end month for a seasonal range filter (1=Jan, 12=Dec), inclusive. When this month is less than MONTH_FROM, the range wraps across the year boundary (e.g., 11 to 2 matches Nov through Feb).

OFFSET (optional)

The number of catalog entries to skip before returning results. Use with the LIMIT parameter to paginate.

SEARCH (optional)

A free-text filter. Each space-separated word is matched against URI, sensor, modality, projection, and describe metadata (AND logic).

SENSOR (optional)

Filter by sensor name. Multiple values are matched with OR logic.

START_DATE (optional)

The start date for a date range filter, inclusive.

Output Parameters


OUTPUT_RASTERS

The rasters matching the query criteria, opened and ready for use.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 6.3

Introduced

See Also


ENVITask, PopulateCatalog Task, ScanFilesForCatalog Task, MergeCatalogs Task, PruneCatalog Task