Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

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

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 information for the projection system and units of measurement. This information is often contained in an .aux file that is associated with the raster file. 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 update one file to its original map model and projection. Do not use this method if you are changing a raster file from one projection to another.

  1. Determine the upper-left X and upper-left Y coordinates. In ERDAS IMAGINE 9.3, in the Viewer window, select Utility, and then Layer Info. Write down and keep this information for later.

    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 information on georeferencing, from the Help menu, select IMAGINE Online Documentation.

  2. From the main ERDAS IMAGINE menu, select Tools, and then Image Command Tool.

  3. From the Image Commands window, select the file to update.

  4. Check Change Map Model, and then click Options next to that 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 Commands window, check Change Map Projection, and then click Options next to that selection.

  8. In the Map Projection Options window, select your desired category and projection, and then click OK.

  9. In the Image Commands 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 upper-left 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

    To determine the upper-left X and upper-left Y coordinates in the Viewer window, select Utility, and then Layer Info. 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 information on georeferencing, from the Help menu, select IMAGINE Online Documentation.

  2. Save this as a .txt file (e.g., coords.txt).

  3. From the main ERDAS IMAGINE menu, select Tools, and then Image Command Tool. Select one image file from the set you want to update.

  4. Check Change Map Model, and then click Options next to that selection.

  5. 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.

  6. In the Map Info Options window, click OK.

  7. Now you can set your desired map projection. Check Change Map Projection, and then click Options next to that selection.

  8. In the Map Projection Options window, select the category and projection, and then click OK.

  9. In the Image Command Tool window, click Batch.

  10. 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
  11. 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
  12. Click Next, and then click Select files to add. Highlight all the files you want to add, and then click OK.

  13. 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.

  14. Select the text file containing the upper-left X and Y coordinates for your input files.

  15. 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.

  16. 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 information for all of your image files. You will notice that .aux files have been created for your images.

This is document avkl in domain all.
Last modified on May 13, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.