Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.



The QUERY_MRSID function allows you to obtain information about a MrSID image file without having to read the file. It is a wrapper around the object interface that presents MrSID image loading in a familiar way to users of the QUERY_* image routines. (See QUERY_* Routines for more information.) However this function is not as efficient as the object interface and the object interface should be used whenever possible. See IDLffMrSID for information about the object interface.

Note: This routine is only available under Microsoft Windows.


; Select the image file.
file = QUERY_MRSID(FILEPATH('test_gs.sid', $
   SUBDIRECTORY=['examples', 'data']), info, LEVEL = -2)
HELP, file
; IDL returns 1 indicating the correct file type
; and successful query.
; Print the range of levels of resolution available within
; the file.
PRINT, 'Range of image levels = ', info.LEVELS
; Print the image dimensions when the image level is set to -2
; as specified by LEVEL = -2 in the QUERY_MRSID statement.
PRINT, 'dimensions of image at LEVEL is -2 =', info.DIMENSIONS
; IDL returns 2048 by 2048
; Check for valid georeferencing data.
PRINT, 'Result of georeferencing query', info.GEO_VALID
; IDL returns 0 indicating that the file does not contain
; georeferencing data.


Result = QUERY_MRSID( Filename [, Info] [, LEVEL=lvl] )

Return Value

This routine returns a long with the value of 1 (one) if the query was successful (and the file type was correct) or 0 (zero) on failure.



A scalar string containing the full path and filename of the MrSID file to query.


Returns an anonymous structure containing information about the image in the file. The Info.TYPE field will return the value 'MrSID'.

Note: See General Query * Routine Info Structures for detailed structure information.

The info structure also has the following the MRSID-specific fields:

  • info.LEVELS – a named variable that will contain a two-element integer vector of the form [minlvl, maxlvl] that specifies the range of levels within the current image. Higher levels are lower resolution. A level of 0 equals full resolution. Negative values specify higher levels of resolution.
  • Info.GEO_VALID – a long integer with a value of 1 if the file contains valid georeferencing data, or 0 if the georeferencing data is nonexistent or unsupported.

Note: Always verify that this keyword returns 1 before using the data returned by any other GEO_* keyword.

  • Info.GEO_PROJTYPE – unsigned integer.
  • Info.GEO_ORIGIN – 2-element double precision array.
  • Info.GEO_RESOLUTION – 2-element double precision array.

See IDLffMrSID::GetProperty for more information on GEO_* values.



Set this keyword to an integer that specifies the level to which the DIMENSIONS field of the info structure corresponds. This can be used, for example, to determine what level is required to fit the image into a certain area. If this keyword is not specified, the dimensions at level 0 are returned.

Version History



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us