This routine is obsolete and has been replaced with one of the following objects, depending on the type of spatial reference (standard, RPC, or pseudo):

ENVIStandardRasterSpatialRef
ENVIRPCRasterSpatialRef
ENVIPseudoRasterSpatialRef

This function returns an ENVI Classic map information structure for any of the supported map projections. Arbitrary, Geographic, UTM, and State Plane map information structures use their corresponding keyword. All other projections use the PROJ keyword to define the associated projection. You can define projections using the procedure ENVI_PROJ_CREATE. With optional keywords, you can define the datum, name, units, projection parameters, pixel size, rotation, and map coordinates. The result of this function can be used for functions that require an input MAP_INFO structure. For example, to georeference an image, ENVI_SETUP_HEAD requires an input MAP_INFO structure.

Note: Use this function instead of accessing the map information structure directly.

Syntax


Result = ENVI_MAP_INFO_CREATE([, /ARBITRARY] [, DATUM=value] [, /GEOGRAPHIC] [, /MAP_BASED], MC=array [, NAME=string] [, PARAMS=array] [, PE_COORD_SYS_CODE=integer] [, PE_COORD_SYS_STR=string] [, PROJ=structure], PS=array [, ROTATION=value] [, /SOUTH] [, /STATE_PLANE] [, TYPE=integer] [, UNITS=integer] [, /UTM] [, ZONE=integer])

Keywords


ARBITRARY (optional)

Set this keyword to create an Arbitrary projection for the map information. Set the keyword MAP_BASED to create a map-based projection. The default is a non-map based projection. A map-based projection uses the lower-left corner of the image as the projection origin, while a pixel-based projection (non-map based) uses the upper-left corner as the origin.

DATUM

Use this keyword to specify the datum for the map information projection. The default for a Geographic projection is WGS-84, and the default for UTM and State Plane projections is North America 1927 (NAD27). All other projections default to no datum. The exact name that ENVI Classic uses for each datum is listed in the datum.txt file in the map_proj directory of your ENVI Classic installation.

GEOGRAPHIC (optional)

Set this keyword to create a Geographic projection for the map information.

MAP_BASED (optional)

Set this keyword to interpret the Arbitrary projection as map-based. This keyword does not have any effect for other projections.

MC

Set this keyword to specify the map location tie point, which is the reference point for a pixel at a known map coordinate. MC is a four-element double-precision array where,

  • MC[0]: x pixel location corresponding to the x map location, MC[2]
  • MC[1]: y pixel location corresponding to the y map location, MC[3]
  • MC[2]: is the x map location corresponding to the x pixel location, MC[0]
  • MC[3]: is the y map location corresponding to the y pixel location, MC[1]

NAME

Use this keyword to specify a string variable with the name of the map information projection.

PARAMS (optional)

Use this keyword to specify the parameters for the map information projection. PARAMS is a array of double-precision values with 1 to 15 elements. The number of elements is determined by the projection type (see the TYPE keyword). Do not use PARAMS with Arbitrary, Geographic, State Plane, or UTM projections. The PARAMS keyword must contain all projection parameters listed in the above document (for the specified projection) except the datum and name, which you specify using the DATUM and NAME keywords, respectively.

PE_COORD_SYS_CODE (optional)

Use this keyword to pass in a valid geographic (GEOGCS) or projected (PROJCS) coordinate system code, typically a five-digit number.

For a full list of coordinate system strings and codes, refer to the following text files in the \IDLxx\resource\pedata\predefined directory of the ENVI distribution:

  • EnviPEProjcsStrings.txt: PROJCS codes and strings
  • EnviPEGeogcsStrings.txt: GEOGCS codes and strings

Set the TYPE keyword to 1 when passing in a GEOGCS code, or set TYPE to 42 when passing in a PROJCS code.

PE_COORD_SYS_STR (optional)

Use this keyword to pass in a a geographic (GEOGCS) or projected (PROJCS) coordinate system string.

For a full list of coordinate system strings and codes, refer to the following text files in the \IDLxx\resource\pedata\predefined directory of the ENVI distribution:

  • EnviPEProjcsStrings.txt: PROJCS codes and strings
  • EnviPEGeogcsStrings.txt: GEOGCS codes and strings

Set the TYPE keyword to 1 when passing in a GEOGCS string, or set TYPE to 42 when passing in a PROJCS string. See Example.

PROJ (optional)

Set this keyword to specify the projection for the map information. PROJ is an ENVI Classic projection structure returned from ENVI_PROJ_CREATE or ENVI_GET_PROJECTION. PROJ is not needed if the keyword ARBITRARY, GEOGRAPHIC, STATE_PLANE, or UTM is used. For all other projections, either set the PROJ keyword or define the projection using the keywords DATUM, NAME, PARAMS, SOUTH, TYPE, UNITS, and ZONE.

PS

Set this keyword to specify the pixel size of the image. PS is a two-element, double-precision array, where:

  • PS[0]: x pixel size
  • PS[1]: y pixel size

ROTATION (optional)

Set this keyword to specify the rotation of the image in the defined projection. Rotation is expressed in degrees clockwise from north.

SOUTH (optional)

Set this keyword to specify that the UTM projection is in the southern hemisphere.

STATE_PLANE (optional)

Set this keyword to create a State Plane projection for the map information.

TYPE (optional)

Use this keyword to specify the map information projection type. TYPE is an integer value corresponding to the projection type. See Coordinate System Strings and Codes for more information.

UNITS (optional)

Use this keyword to specify the projection units. UNITS is an integer value indicating the projection units. The function ENVI_TRANSLATE_PROJECTION_UNITS converts projection unit strings to integer values. The default units are degrees for Geographic, feet for State Plane, and meters for all other projections.

UTM (optional)

Set this keyword to create a UTM projection for the map information.

ZONE (optional)

Use this keyword only with UTM and State Plane projections to specify the zone number.

Example


This example creates a Geographic map information structure with a Geographic projection, default datum of WGS-84, default units of degrees, and a pixel size of one second (1. / 3600). Set the map tie point for the center of the first pixel (0.5, 0.5) to 34.5 degrees north, 117.4 degrees west. This is one of the simplest uses of ENVI_MAP_INFO_CREATE.

;
; Set the pixel size and map tie point
;
ps = [1D/3600, 1D/3600]  
mc = [0.5D, 0.5D, -117.4D, 34.5D]
;
; Create the map information
;  
map_info = envi_map_info_create(/geographic, $
   mc=mc, ps=ps)

This example creates map information for a UTM projection Zone 23 South with units of kilometers and a North America 1983 datum. Set the map tie point for the upper-left corner of the first pixel to 8339330 North and 177246 East. Use the keywords for ENVI_MAP_INFO_CREATE instead of first creating a projection structure and then using the PROJ keyword.

;
; First convert the kilometers to its integer
; representation.
;
units = ENVI_TRANSLATE_PROJECTION_UNITS('km')
;
; Set the datum and map tie points
; 
datum = 'North America 1983'
mc = [0D, 0, 177246, 8339330]
ps=[30, 30]
;
; Now create the UTM map information
;
map_info = ENVI_MAP_INFO_CREATE(/UTM, ZONE=23, /SOUT, $
   DATUM = datum, UNITS = units, MC = mc, PS = ps)