ARCHIVED: In ERDAS IMAGINE, how do I update map model and projection information?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

When working with raster imagery (e.g., satellite photos, aerial photos, and elevation data), you may discover that the map model is incomplete and the images are missing metadata information for the projection system and units of measurement. This information is often contained in an auxiliary file, which is associated with non-ERDAS image raster formats (e.g., .tif & .tfw or .jpg); see Esri's Auxiliary files. If your raster data does not include an .aux file, you will need to create one in order to perform spatial analysis.

Single-file update

Use the single-file update method to modify the image metadata information. This process does not reproject the image.

  1. To determine the upper-left X and Y coordinates, in ERDAS IMAGINE 2013, open the image in a View. In the Home Tab Group, click the Metadata icon to open the Image Metadata Window. From the File menu, open Print Options and check Map Info . From the File menu, open Print Options to File and save output to a text file. This file will report the X and Y coordinates.

    Note: If you do not see coordinates listed here, you can also obtain them from the header file (.hdr) or metadata file (.txt) associated with the images. If the image does not have any coordinate information, you may need to georeference it. For georeferencing help, from the Help tab, select Help to launch the IMAGINE online documentation.

  2. From the main ERDAS IMAGINE 2013 ribbon menu, select Manage Data. In the "Image" group on the right side of the ribbon menu, select Edit Image Metadata. The Image Commands window will open.
  3. From the Image Commands window, select the file to update.
  4. Check Change Map Model, and then click Options next to the selection.
  5. In the Map Info Options window, if it is not already entered, enter the upper-left X and Y coordinate information. Select the appropriate units and projection.

    Note: Selections are not in alphabetical order.

  6. Click OK.
  7. To set the map projection, in the Image Command window, check Change Map Projection, and then click Options next to the selection.
  8. In the Map Projection Options window, select your desired category and projection, and then click OK.
  9. In the Image Command window, click OK.
  10. To confirm that the raster file update was successful, open the file in the Viewer window. Select Utility, and then Layer Info.

Multiple file update

The multiple file update method requires you to assign the map model information to the raster data before setting the desired map projection. To set the model and projection information on multiple images at once:

  1. Using a text editor, create a comma-separated list of the upper-left X (ulx) and Y (uly) coordinates for each of your images, entering one set of coordinates per line. Make sure the order of each set of image coordinates corresponds to the order in which you will list the image files (e.g., alphabetical). You should also make sure that there are no spaces after the commas, for example:
    3067625.5,1448516.5
    3067691.5,1443225.5
    3067776.5,1437870.5
    3065815.5,1448529.5

    Determine the upper-left X and Y coordinates. In ERDAS IMAGINE 2013, open the image in a View. In the Home Tab Group, click the Metadata icon to open the Image Metadata window. Save the upper-left X and Y coordinates to a .txt file (e.g., coords.txt).

    Note: If you do not see coordinates listed here, you can also obtain them from the header file (.hdr) or metadata file (.txt) associated with the images. If the image does not have any coordinate information, you may need to georeference it. For georeferencing help, from the Help tab, select Help to launch the IMAGINE online documentation.

  2. From the main ERDAS IMAGINE 2013 ribbon menu, select Manage Data. In the "Image" group on the right side of the ribbon menu, select Edit Image Metadata. The Image Commands window will open. Browse to the first image of the dataset to update.
  3. Check Change Map Model, and then click Options next to the selection.
  4. In the Map Info Options window, if it is not already present, enter the upper-left X and Y coordinate information for the image selected. Select the appropriate units and projection.

    Note: Selections are not in alphabetical order.

  5. In the Map Info Options window, click OK.
  6. Now you can set your desired map projection. Check Change Map Projection, and then click Options next to that selection.
  7. In the Map Projection Options window, select the category and projection, and then click OK.
  8. In the Image Commands window, click Batch.
  9. Select Modify commands manually, and then click Next. You should see a command similar to the following:
    imagecommand 'c:/xxxxx/xxxxx.xxx' -map
    3.0840002400000002e+006 1.4119997400000000e+006
    5.0000000000000000e-001 5.0000000000000000e-001 units 'projection'
    -projection 'C:/Program Files/ERDAS/Geospatial Imaging
    9.3/etc/projections/xxxxxxx.plb' 'xxxxx' -xxxxx imagecommand
  10. You will need to create and enter three variables into the command line so that it will recognize the input files and the upper-left X and Y coordinates of each image:
    1. In the Batch Commands window, select the Variables tab, and then click New to define a new variable.
    2. Name the first variable Input, and then set its type to User.
    3. Click New to create another variable. Name the second variable a_ulx, and then set its type to User.
    4. Click New to create the third variable. Name it b_uly, and then set its type to User. Press Enter.
    5. If there is a variable listed called "new variable", delete it. You may need to add more variables (e.g., for units).
    6. Select the Commands tab, and then click to highlight the path of your input file.
    7. From the drop-down menu, select Input as a variable. Click Insert the Variable at the current location. This will change the path of your input file in the command line to $(Input).
    8. Highlight the X coordinate (e.g., "3.0840002400000002e+006"), which will be listed after "-map". From the variable drop-down menu, select a_ulx, and then click Insert the Variable at the current location. This will change the path of your X coordinate in the command line to $(a_ulx).
    9. Do the same thing for the Y coordinate, replacing it with the variable b_uly. Your new command line will look similar to this:
      "imagecommand $(Input) -map $(a_ulx) $(b_uly)
      5.0000000000000000e-001 5.0000000000000000e-001 units 'projection'
      -projection 'C:/Program Files/ERDAS/Geospatial Imaging
      9.3/etc/projections/xxxxxxx.plb' 'xxxxx' -xxxxx

  11. Click Next, and then click Select files to add. Highlight all the files you want to add, and then click OK.
  12. Highlight the a_ulx and b_uly columns by holding Shift and clicking on the column heading. With the columns highlighted, right-click one of the column headings, and then select Import.
  13. Select the text file containing the upper-left X and Y coordinates for your input files.
  14. In the Import Column Data window, select Options, and then set the Separator Character to Comma. If you are using Windows, set the row terminator character to Return NewLine(DOS). Click OK twice.
  15. All of your columns should now be populated with the appropriate information. Click Next, and then Finish to run the command immediately.

You have just updated the map model and map projection image metadata information for all of your image files. You will notice that each image now has an associated .aux file.

This is document avkl in the Knowledge Base.
Last modified on 2023-05-09 14:38:00.