ARCHIVED: 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 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.
- 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 icon to open theImage Metadata Window
. From the menu, open and check . From the menu, open 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 tab, select to launch the IMAGINE online documentation. - From the main ERDAS IMAGINE 2013 ribbon menu, select
Image Commands
window will open. . In the "Image" group on the right side of the ribbon menu,
select . The - From the
Image Commands
window, select the file to update. - Check , and then click next to the selection.
- 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.
- Click .
- To set the map projection, in the
Image Command
window, check , and then click next to the selection. - In the
Map Projection Options
window, select your desired category and projection, and then click . - In the
Image Command
window, click . - To confirm that the raster file update was successful, open the file in the Viewer window. Select , and then .
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 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 icon to open theImage 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 tab, select to launch the IMAGINE online documentation. - From the main ERDAS IMAGINE 2013 ribbon menu, select
Image Commands
window will open. Browse to the first image of the dataset to update. . In the "Image" group on the right side of the ribbon menu,
select . The - Check , and then click next to the selection.
- 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.
- In the
Map Info Options
window, click . - Now you can set your desired map projection. Check , and then click next to that selection.
- In the
Map Projection Options
window, select the category and projection, and then click . - In the
Image Commands
window, click . - Select
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
, and then click
. You should see a command similar to the following:
- 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 Commands
window, select the tab, and then click to define a new variable. - Name the first variable
Input
, and then set its type to . - Click
a_ulx
, and then set its type to . to create another variable. Name the second
variable - Click
b_uly
, and then set its type to . PressEnter
. to create the third variable. Name it
- If there is a variable listed called "new variable", delete it. You may need to add more variables (e.g., for units).
- Select the tab, and then click to highlight the path of your input file.
- From the drop-down menu, select
$(Input)
. as a
variable. Click . This will change the path of your input file in the
command line to - 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 . This will change the path of your X
coordinate in the command line to - Do the same thing for the Y coordinate, replacing it with the
variable
"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
. Your new command line will look similar
to this:
- In the
- Click , and then click . Highlight all the files you want to add, and then click .
- Highlight the
Shift
and clicking on the column heading. With the columns highlighted, right-click one of the column headings, and then select . and columns by holding
- Select the text file containing the upper-left X and Y coordinates for your input files.
- In the
Import Column Data
window, select , and then set the Separator Character to . If you are using Windows, set the row terminator character to . Click twice. - All of your columns should now be populated with the appropriate information. Click , and then 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.