This routine is obsolete.

Map information is stored in an ENVIStandardRasterSpatialRef object. Use the SPATIALREF property of ENVIRaster to associate this map object with a given raster, and to retrieve the map information from a raster. See Map Information for details.

Use this function to return projection information for the specified file, display group, or map information handle.

Syntax


Result = ENVI_GET_PROJECTION([, DN=integer] [, FID=file ID] [, PIXEL_SIZE=variable] [, UNITS=variable])

Keywords


DN (optional)

This keyword cannot be used to reference the ENVI display. It is only for use with ENVI Classic display groups.

Use this keyword to specify the display number for the returned projection information. The function returns the projection information for the data in the display group. If the displayed data are not georeferenced, an Arbitrary projection is returned.

Display numbers (DNs) are zero-based; ENVI Classic Display #1 corresponds to DN=0. You can retrieve DNs in the event handler of user-managed display events. For example, use the following code to retrieve the uvalue for ev.top:

widget_control, ev.top, get_uvalue=dn

FID (optional)

Use this keyword to specify the file ID for the returned projection information. If the file is not georeferenced, an Arbitrary projection is returned. This value 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.

PIXEL_SIZE (optional)

Use this keyword to specify a named variable that contains the x and y pixel size of the returned projection. The returned pixel size is a two-element, double-precision array. The first element is the x pixel size, and the second element is the y pixel size.

UNITS (optional)

Use this keyword to specify a named variable that contains the projection units. This is an integer value that you can transform into a string using the procedure ENVI_TRANSLATE_PROJECTION_UNITS.

Example


PRO atest
compile_opt IDL2
  ; Select a file
  ENVI_SELECT, FID = fid
  IF (fid EQ -1) THEN RETURN
  ; Get the projection information
  proj = ENVI_GET_PROJECTION(FID = fid)
  PRINT, proj
END