This routine is obsolete and has been replaced with the properties to ENVIRaster and ENVIRasterMetadata.

This procedure returns information about a data file, including (but not limited to) number of samples, lines, and bands; spatial dimensions; filename; data type; and interleave.

Syntax


ENVI_FILE_QUERY, FID [, ACQUISITION_TIME=variable] [, BBL=array] [, BNAMES=variable] [, BYTE_SWAP=variable] [, CLASS_NAMES=variable] [, CLOUD_COVER=variable] [, DATA_GAINS=variable] [, DATA_IGNORE_VALUE=variable] [, DATA_OFFSETS=variable] [, DATA_TYPE=variable] [, DEF_BANDS=array] [, DEF_ZRANGE=variable] [, DEF_STRETCH=variable] [, DESCRIP=variable] [, DIMS=variable] [, FILE_TYPE=variable] [, FNAME=variable] [, FUNC_COMPLEX={0 | 1 | 2 | 3 | 4}] [, FWHM=variable] [, H_INFO=variable] [, INTERLEAVE=variable] [, LOOKUP=variable] [, LUT_NAME=variable] [, NB=variable] [, NL=variable] [, NS=variable] [, NUM_CLASSES=variable] [, OFFSET=variable] [, READ_PROCEDURE=variable] [, REFLECTANCE_SCALE_FACTOR=variable] [, SENSOR_TYPE=integer] [, SNAME=variable] [, SOLAR_IRRADIANCE=variable] [, SPEC_NAMES=variable] [, STA_NAME=variable] [, SUN_AZIMUTH=variable] [, SUN_ELEVATION=variable] [, WAVELENGTH_UNITS={0 | 1 | 2 | 3 | 4 | 5 | 6}] [, WL=variable] [, XSTART=variable] [, YSTART=variable]

Arguments


FID

This positional parameter is returned from the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integer with a value greater than 0. An invalid file ID has a value of -1.

Keywords


ACQUISITION_TIME (optional)

Use this keyword to specify a named variable containing a string with the date and time when the image was acquired. This string conforms to the ISO-8601 standard and can be in any of the following formats:

YYYY-MM-DD
YYYY-MM-DDTHH:MM:SS.DZ
YYYY-MM-DDTHH:MM:SS:Dooo:mm

Where:

  • YYYY is the four-digit year
  • MM is the two-digit month
  • DD is the two-digit day
  • T separates the date and time
  • HH is the two-digit hour
  • MM is the two-digit minute
  • SS is the two-digit second
  • D is the decimal fraction of a second with up to double-precision
  • Z indicates that the time is in Coordinate Universal Time (UTC)
  • ooo is a two-digit offset in hours from UTC time. If the offset is negative, a minus symbol (-) precedes the value.
  • mm is an optional partial-hour offset (in minutes) from UTC time.

BBL (optional)

Use this keyword to specify a named variable containing an array of ones and zeros representing the good and bad bands, respectively. The number of elements in BBL must be equal to the number of bands in the image. If no list of bad bands is available, BBL returns a value of -1.

BNAMES (optional)

Use this keyword to specify a named variable that contains the band names associated with each band.

BYTE_SWAP (optional)

Use this keyword to specify a named variable that contains the byte swap value for the data. If you set BYTE_SWAP, then the byte order of the data specified by FID is different than the current processor. User-specified spatial and spectral read procedures will need to byte order the data after reading from disk.

CLASS_NAMES (optional)

Use this keyword to specify a string array of class names for classification images. The first element (Class 0) is “Unclassified.” Only use CLASS_NAMES if the result is a classification image, in which case this keyword is required. If the result is not a classification image, this keyword is optional.

CLOUD_COVER (optional)

Use this keyword to specify a named variable that contains the percentage of cloud cover in the image.

DATA_GAINS (optional)

Use this keyword to specify a named variable that contains an array of gain values for each band in the dataset. DATA_GAINS is an array of values, one for each band. You can use DATA_GAINS in conjunction with DATA_OFFSETS in ENVI's general purpose utility, Apply Gain and Offset. If the gains are undefined for the input file, nothing is returned for the DATA_GAINS keyword.

DATA_IGNORE_VALUE (optional)

Use this keyword to specify a named variable that contains a scalar number representing the data value to ignore in the dataset. If you set DATA_IGNORE_VALUE, it is the same type as the input dataset, and an undefined ignore value is represented by the double-precision number 1e-34. Currently, this value is used only in user-written ENVI code. If the data ignore value is undefined for the input file, DATA_IGNORE_VALUE returns nothing.

DATA_OFFSETS (optional)

Use this keyword to specify a named variable that contains an array of offsets for each band in the dataset. You can use DATA_OFFSETS in conjunction with DATA_GAINS in ENVI's general purpose utility, Apply Gain and Offset. If the offsets are undefined for the input file, DATA_IGNORE_VALUE returns nothing.

DATA_TYPE (optional)

Use this keyword to specify a named variable that contains the IDL data type of the file, using the following IDL convention.

  • 1: Byte (8 bits)
  • 2: Integer (16 bits)
  • 3: Long integer (32 bits)
  • 4: Floating-point (32 bits)
  • 5: Double-precision floating-point (64 bits)
  • 6: Complex (2x32 bits)
  • 9: Double-precision complex (2x64 bits)
  • 12: Unsigned integer (16 bits)
  • 13: Unsigned long integer (32 bits)
  • 14: Long 64-bit integer
  • 15: Unsigned long 64-bit integer

DEF_BANDS (optional)

Set this keyword to a one- or three-element array specifying which bands to display upon opening the file in ENVI. If you set DEF_BANDS to a one-element array, ENVI loads a grayscale image in the display group. If you set DEF_BANDS to a three-element array, ENVI loads an RGB image in the display group. The values are one-based. For example, to load bands 4, 3, and 2 of a 7-band image, set DEF_BANDS to [4, 3, 2].

DEF_ZRANGE (optional)

Use this keyword to specify a named variable that contains a 2D array equal to the default lower and upper plot ranges in spectral plots.

DEF_STRETCH (optional)

Use this keyword to specify a named variable that contains the default stretch, which is used when displaying a band from the file. DEF_STRETCH is the structure created by ENVI_DEFAULT_STRETCH_CREATE.

DESCRIP (optional)

Use this keyword to specify a named variable that contains a string description of the file.

DIMS (optional)

Use this keyword to specify a named variable that contains the spatial dimensions of the file.

FILE_TYPE (optional)

Use this keyword to specify a named variable that contains an integer file-type value. See ENVI_FILE_TYPE for details on how to test for a given file type.

FNAME (optional)

Use this keyword to specify a named variable that contains the name and path of the file. For memory items, FNAME contains a string indicating the memory item number and its associated spatial and spectral dimensions.

FUNC_COMPLEX (optional)

Set this keyword to one of the following values to specify the complex lookup function that determines how to display complex data.

  • 0: Power (default): The natural log of the magnitude
  • 1: Magnitude:
  • 2: Real: The real portion of the complex number
  • 3: Imaginary: The imaginary part of the complex number
  • 4: Phase:

Only set this keyword if the IDL data type of the image is complex or double-precision complex.

FWHM (optional)

Use this keyword to specify a named variable that contains an array of FWHM values, one for each band. If there is no FWHM associated with the file, then a value of -1 is returned.

H_INFO (optional)

Use this keyword to specify a named variable that contains a handle pointer to user-defined header information. Use the procedure HANDLE_VALUE to retrieve the information. The value of the handle is set equal to the INFO keyword in ENVI_SETUP_HEAD or ENVI_ENTER_DATA.

INTERLEAVE (optional)

Use this keyword to specify a named variable that contains the file interleave type. The following integer values specify the interleave output:

  • 0: BSQ
  • 1: BIL
  • 2: BIP

LOOKUP (optional)

Use this keyword to specify a named variable that contains the RGB lookup values for each class in a classification image. The returned result is a byte array [3, num_classes]. LOOKUP is only set when the queried file is an ENVI classification file. Otherwise, the keyword returns a value of -1.

LUT_NAME (optional)

Use this keyword to specify a named variable that contains the filename of the lookup table for the data.

NB (optional)

Use this keyword to specify a named variable that contains the number of bands in the file.

NL (optional)

Use this keyword to specify a named variable that contains the number of lines in the file.

NS (optional)

Use this keyword to specify a named variable that contains the number of samples in the file.

NUM_CLASSES (optional)

Use this keyword to specify a named variable that contains the number of classes for classification images. NUM_CLASSES is only set when the queried file is an ENVI classification file. Otherwise, the keyword returns a value of 0.

OFFSET (optional)

Use this keyword to specify a named variable that contains the offset in bytes to the start of the data in the file.

READ_PROCEDURE (optional)

Use this keyword to specify a named variable that contains a two-element string array of the procedure names for the spatial and spectral readers, respectively. The ENVI read procedures provide a powerful mechanism for importing custom formats or files directly into ENVI without the need for conversion. All spatial or spectral requests for data go through the specified read procedures.

REFLECTANCE_SCALE_FACTOR (optional)

Use this keyword to specify a named variable that contains a single scalar number used to convert the input data into reflectance. For example, REFLECTANCE_SCALE_FACTOR would be used to convert integer scaled reflectance data into their floating point [0, 1] reflectance values. If the scale factor is undefined for the input file, nothing is returned for the this keyword.

SENSOR_TYPE (optional)

Use this keyword to specify a named variable that contains the integer sensor type value. See ENVI_SENSOR_TYPE for details on how to test for a given sensor type.

SOLAR_IRRADIANCE (optional)

Use this keyword to specify a named variable that denotes the top-of-atmosphere solar irradiance per band. Units are W/(m2 * µm).

SNAME (optional)

Use this keyword to specify a named variable that contains the shortened filename (without the path). For memory items, SNAME contains an empty string.

SPEC_NAMES (optional)

Use this keyword to specify a named variable that contains a string array of spectral library names. SPEC_NAMES is only set when the queried file is a spectral library.

STA_NAME (optional)

Use this keyword to specify a named variable that contains the statistics filename. If no filename is specified, the STA_NAME is equal to the empty string, ''.

SUN_AZIMUTH (optional)

Use this keyword to specify a named variable with the angle of the sun (in degrees) from due north in a clockwise direction.

SUN_ELEVATION (optional)

Use this keyword to specify a named variable with the angle of the sun (in degrees) above the horizon.

WAVELENGTH_UNITS (optional)

Use this keyword to specify a named variable that contains a value indicating the wavelength units. The following values are valid:

  • 0: Micrometers
  • 1: Nanometers
  • 2: Wavenumber
  • 3: GHz
  • 4: MHz
  • 5: Index
  • 6: Unknown

WL (optional)

Use this keyword to specify a named variable that contains an array of wavelength values, one for each band. If there is no wavelength associated with the file, then a value of -1 is returned.

XSTART (optional)

Use this keyword to specify a named variable that contains the x starting sample for the first pixel in the file.

YSTART (optional)

Use this keyword to specify a named variable that contains the y starting row for the first pixel in the file.