The Query method queries the ENVI Catalog for matching raster entries. Filters can be combined freely; keywords that are omitted will not be included in the search.
Syntax
Result = ENVICatalog.Query([, Keywords=value])
Return Value
This method returns a List of Hashes, one per matching row (up to LIMIT rows). Each Hash contains all catalog schema fields: URI, UID, SOURCE_UID, COLUMNS, ROWS, BANDS, ACQUISITION_DATE, SENSOR, MODALITY, DATA_TYPE, PIXEL_SIZE, PROJECTION, CLOUD_COVER, DESCRIBE, LAST_OPENED, UL_LON, UL_LAT, UR_LON, UR_LAT, LR_LON, LR_LAT, LL_LON, LL_LAT, MIN_LON, MAX_LON, MIN_LAT, MAX_LAT, CENTER_LON, CENTER_LAT.
Note: The hashes are case sensitive; you must refer to all the keys in upper case (e.g., Print, result[0, 'CENTER_LON'])
Returns !null on error (check ERROR keyword for the message).
Arguments
None
Keywords
BBOX
Specify the bounding box filter as [min_lon, min_lat, max_lon, max_lat]. This returns rasters whose footprints overlap this box.
CONTAINED
When true, restricts the BBOX filter to rasters whose entire footprint lies within the bounding box. This keyword is ignored if BBOX is not set.
COUNT
Set to the total number of matching rows before the LIMIT is applied. This is useful for pagination.
END_DATE
The end date for a date range filter, inclusive.
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.
FILENAME
Filter by filename (not full path). It is a partial match against the filename portion of the URI. For example, . 'LC08' or '_MTL'.
LIMIT
The maximum number of rasters to open. Use this with the OFFSET parameter to paginate.
MODALITY
Filter by modality. Multiple values are matched with OR logic.
MONTH_FROM
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
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
The number of catalog entries to skip before returning results. Use with the LIMIT parameter to paginate.
SEARCH
A free-text filter. Each space-separated word is matched against URI, sensor, modality, projection, and describe metadata (AND logic).
SENSOR
Filter by sensor name. Multiple values are matched with OR logic.
START_DATE
The start date for a date range filter, inclusive.
Version History
See Also
ENVICatalog