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.
- Determine the upper-left X and upper-left Y coordinates. In ERDAS
IMAGINE 9.3, in the
Viewerwindow, selectUtility, and thenLayer 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 theHelpmenu, selectIMAGINE Online Documentation. - From the main ERDAS IMAGINE menu, select
Tools, and thenImage Command Tool.
- From the
Image Commandswindow, select the file to update.
- Check
Change Map Model, and then clickOptionsnext to that selection.
- In the
Map Info Optionswindow, 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.
- Click
OK.
- To set the map projection, in the
Image Commandswindow, checkChange Map Projection, and then clickOptionsnext to that selection.
- In the
Map Projection Optionswindow, select your desired category and projection, and then clickOK.
- In the
Image Commandswindow, clickOK.
- To confirm that the raster file update was successful, open the
file in the Viewer window. Select
Utility, and thenLayer 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:
- 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
Viewerwindow, selectUtility, and thenLayer 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 theHelpmenu, selectIMAGINE Online Documentation. - Save this as a
.txtfile (e.g.,coords.txt).
- From the main ERDAS IMAGINE menu, select
Tools, and thenImage Command Tool. Select one image file from the set you want to update.
- Check
Change Map Model, and then clickOptionsnext to that selection.
- In the
Map Info Optionswindow, 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.
- In the
Map Info Optionswindow, clickOK.
- Now you can set your desired map projection. Check
Change Map Projection, and then clickOptionsnext to that selection.
- In the
Map Projection Optionswindow, select the category and projection, and then clickOK.
- In the
Image Command Toolwindow, clickBatch.
- Select
Modify commands manually, and then clickNext. 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 - 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:
- In the
Batch Commandswindow, select theVariablestab, and then clickNewto define a new variable. - Name the first variable
Input, and then set its type toUser. - Click
Newto create another variable. Name the second variablea_ulx, and then set its type toUser. - Click
Newto create the third variable. Name itb_uly, and then set its type toUser. PressEnter. - If there is a variable listed called "new variable", delete it. You may need to add more variables (e.g., for units).
- Select the
Commandstab, and then click to highlight the path of your input file. - From the drop-down menu, select
Inputas a variable. ClickInsert the Variable at the current location. This will change the path of your input file in the command line to$(Input). - 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 clickInsert the Variable at the current location. This will change the path of your x coordinate in the command line to$(a_ulx). - 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
- In the
- Click
Next, and then clickSelect files to add. Highlight all the files you want to add, and then clickOK.
- Highlight the
a_ulxandb_ulycolumns by holdingShiftand clicking on the column heading. With the columns highlighted, right-click one of the column headings, and then selectImport.
- Select the text file containing the upper-left X and Y coordinates
for your input files.
- In the
Import Column Datawindow, selectOptions, and then set the Separator Character toComma. If you are using Windows, Set the row terminator character toReturn NewLine(DOS). ClickOKtwice.
- All of your columns should now be populated with the appropriate
information. Click
Next, and thenFinishto 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.
Last modified on May 13, 2009.







