Showing results for 
Search instead for 
Do you mean 

AutoSync: MrSID images have no projection information

by Technical Evangelist on ‎02-29-2016 08:01 AM - edited on ‎03-21-2016 03:43 PM by Anonymous (622 Views)

Symptoms

In AutoSync, the user is  trying to use a .SID NAIP image as the reference image, and aerial
camera images as the input images. The SID the program claims there is no
projection information with the .SID file. Is there a step I am missing in
preparing this image before starting the AutoSync project?


 

Also, the only elevation models I have available for this project are USGS NED 1/3.
I have tried loading a GeoTiff and a .BIL format. For both images the program
claims there is no elevation information. IS there anything I can do to allow me to
use this elevation info in the resample process?

Diagnosis

Solution

On the NED data not having a z value, try loading the Elevation Raster in IMG Viewer
and check/verify via Image Info. Tool there that you have Elevation Tab attached to
that Elevation Raster. If not [I think this is the case], please attach the
Elevation Info. via [Image Info. | Edit | Add/Change Elevation Info.].

 

 

MrSID, TIFF, and JPEG images often do not have projection information embedded in
the image data, but rather come with a so-called world file (*.sdw, *.tfw, *.jpw)
that carries nothing more than corner coordinates. However, if the data provider
included projection information for the images, you can add it manually, and then
batch the process to do all of your images, if you have more than one.

To do this with a single image, please do this:

1. Home> Information > Edit Image Metadata
2. Load the image.
3. Check the box for Change Map Model > Options. In the Options dialog, confirm that
the Projection is correct. If not, select the correct one.
4. Select OK to run the change.
5. Re-open the Image Command Tool. Enter the image, then select Change Map
Projection. Select Options and enter the correct information.
6. Select OK to run the change
Your single MrSID image now has projection information embedded in the image header.
- Batch Procedure:

If your input MrSID images do not already contain map coordinate information, you
will have to create a text file that contains a comma-separated list of the
upper-left x (ulx) and upper-left y (uly) coordinates for each of your images, one
set of coordinates per line. Using a simple text editor (ERDAS IMAGINE's built-in
text editor under the Tools menu is ideal), create a comma-separated list of the
upper-left x (ulx) and upper-left y (uly) coordinates for each of your images, one
set of coordinates per line. Make sure that there are no spaces after the commas
(e.g.- 1062354.0,2062356.0). The list of coordinates must correspond (be in the
same order) with your images that you will input into the Batch tool later. Save

this file with a .TXT extension.
If your input MrSID images do have map coordinate information, you do not have to
create the text file containing the coordinates for each of your images. Instead,
create a new image catalog (select the Catalog icon from the main IMAGINE icon panel
to open the Image Catalog tool) and add all of your images into the new catalog.
You will use the information stored in the Ulx and Uly columns of the image catalog
to populate variables in the Batch tool later.

1. Batch update your Map Model:
Using the Image Command tool (from the main IMAGINE tool bar select Tools | Image
Command Tool...), select one of your image files that you want to add the map
information to (ULX, ULY, pixel size, projection category, and units). Enable the
Change Map Model checkbox and select the Options button. Enter the X and Y
coordinates for the upper left corner of your image, and the X and Y pixel
dimensions. Select your projection category, and set the desired units. Click "OK"
in the Map Info Options window and then click "Batch" instead of "OK" in the Image
Command window. This will open the Batch Commands window where you will be given
three choices. Of the three, select "Modify commands manually" and click "Next".
You should see a command similar to the following:

imagecommand e:/input/2-2.sid -map 1.0623540000000000e+006 2.0623560000000000e+006
8.0000000000000000e+000 8.0000000000000000e+000 meters 'State Plane' -meter
imagecommand

You now need to enter a few variables into the command line so that it will
recognize the input files and the ULX and ULY coordinates of each image and not the
coordinates that you originally defined.

You must create these three variables. Under the Variables tab in the Batch
dialogue click on the New button to define a new variable. Name the first variable
"Input", and set its Type to "User", then click the New button to create another
variable. Name the second variable "a_ulx", and set its Type to "User", then click
the New button to create another variable. Name the third variable "b_uly", and set
its Type to "User", then hit the key. Now that you have created your
variables, it is time to insert them into the Batch command line.

Under the Commands tab in the Batch window, highlight the path of your input file
(in this example it is "e:/input/2-2.sid"). You will see a drop-down-menu box
containing the word "Input" near the bottom of the Batch wizard. Click on that box
and make sure that the "Input" variable is selected. Next, you want to click on the
second icon to the right...the icon for "Replace the current argument with the
variable". This will change the path of your input file in the command line to
"$(Inupt)". Now highlight the X coordinate (in this example it is
"1.0623540000000000e+006 "). From the variable drop-down-menu scroll down and
select "a_ulx", and click on the "Replace the current argument with the variable"
icon. This will change the X coordinate value 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 this:
imagecommand $(Input) -map $(a_ulx) $(b_uly) 8.0000000000000000e+000
8.0000000000000000e+000 meters 'State Plane' -meter imagecommand

Click the "Next" button and choose all of the MrSID files that you wish to add. You
may want to open your files under the Multiple File Selection tab in the Select
Batch Files dialogue. This will populate your Input column with all of the images
you want to update.
If you created a text file with your image's upper-left x and upper-left y map
coordinates, follow these steps to populate the a_ulx and b_uly columns in the batch
tool. Highlight the a_ulx and b_uly columns in the batch tool by holding the shift
key and clicking on the column heading. With the columns highlighted, right-click

on one of the column headings and select Import. Select your text file that you
created earlier which contains the ULX and ULY coordinates for all of your input
files. In the Import Column Data dialogue select the Options button, and set the
Separator Character to "Comma". Click OK to import your columns into the Batch
tool. All of your columns should now be populated with the appropriate information.
Click the "next" button and then the "Finish" button to run the command.
If you did not create a text file with your images coordinates, but created a new
image catalog instead, follow these steps to populate the a_ulx and b_uly columns in
the batch tool. Highlight the Ulx and Uly columns in the image catalog, right-click
and select copy. Now highlight the a_ulx and b_uly columns in the batch tool,
right-click on the headings and select Paste. All of your columns should now be
populated with the appropriate information. Click the "next" button and then the
"Finish" button to run the command.

You have just updated the Map Model information for all of your files.

2. Batch update your projection information:
Using the Image Command tool select one of your image files that you want to update
the projection information for. Enable the Change Map Projection checkbox and
select the Options button.

After selecting your desired category and projection, click "OK" in the Map
Projection Options window and then click "Batch" instead of "OK" in the Image
Command window. This will open the Batch Commands window where you will be given
three choices. Of the three, select "Modify commands manually" and click "Next".
You should see a command similar to the following:

imagecommand d:/example_data/reproject1.sid -projection 'C:\Program Files\Hexagon\ERDAS IMAGINE 2015\etc\projections\/spnad83_new.plb' 'MONTANA (2500)' -meter imagecommand
Click the Variables tab and select the "New" button. Set the Name to "Input" and
the Type to "User". Click the Commands tab and highlight the directory path and
filename of your input image. You will see a "drop-down-menu" box in the bottom
right with the word "Input" in it. Click on that box and make sure that "Input" is
selected. Next, you want to click on the second icon to the right of that menu
box...the icon is the "Replace the current argument with the variable". This will
change the input filename in the command line to $(Input.). Your new command line
will look like this:

imagecommand $(Input) -projection 'd:/program files/imagine
8.5/etc/projections/spnad83_new.plb' 'MONTANA (2500)' -meter imagecommand

Click the "Next" button and choose all of the files that you wish to add. You may
want to open your files under the Multiple File Selection tab in the Select Batch
Files dialogue. Click the "next" button and then the "Finish" button to run the
command.

Your images will now have complete projection information.


 

Contributors