USGS Banner

Registering and Using Imagery within a GIS

Author:  Joseph J. Kerski, USGS, jjkerski@usgs.gov, 303-202-4315

Lesson:  As you know by this point in the semester, a variety of datums, map projections, and coordinate systems are used for paper maps and for digital spatial data in a GIS.  For many projects, you will need to incorporate data that are in different datums, map projections, and coordinate systems.  A typical example is a project where the images are in a different coordinate system than the vector data.   Another common example is when the images have no registration information, and you must create the registration information in order to use it.

In this lab, you will have the opportunity to register images to vector maps, an essential GIS skill.   Here, you will manually create two files that will register images, one for a state image (Minnesota) and one for a Landsat image of the August 2002 St Francis wildfire on the Rosebud Sioux Reservation, South Dakota.   You could also create a registration file for an image by rubbersheeting the image by choosing ground control points and using a tool such as the Rectify tool from ESRI Canada, or the Image Registration tools available with the Image Analysis extension to ArcView or ArcGIS from ESRI.

Data Management

Create a folder for this exercise and name it imageregistration.  As you know from the last lesson, it is best to name the folder without any spaces in the name.

Click here to download the data that you will need for this lab exercise.

This file is named imageregistrationlesson.zip and totals approximately 2.2 MB.

After downloading, unzip the file using the Winzip program.

You now should have 14 files with the following names:

mn.tif

states.dbf

states.prj

states.sbn

states.sbx

states.shp

states.shx

stfrancisfire.jpg

toddroads.dbf

toddroads.shp

toddroads.shx

toddhydro.dbf

toddhydro.shp

toddhydro.shx

 

Start ArcView with a new project and a new view.

Add the following theme to your view as a feature data source:

states

Add the following theme to your view as an image data source:

mn.tif

Go to View—> Properties and name your view "Minnesota"

1)  Based on the information at the beginning of this lab, why do you suppose that you cannot see the state outlines and the image file in the view?

 

Save your project and give it an appropriate name, placing it into the appropriate folder.

 

Introduction to Image Registration

It is possible to work with many kinds of images in ArcView and other GIS software packages. You can use and manipulate satellite imagery, radar data, digital orthophotoquads (DOQs--aerial photographs), digital raster graphics (topographic maps), shaded relief images from digital elevation models, and a variety of other images. In the last lab, you worked with DOQs and DRGs for the SGU campus area.  

Images can be an aid for GIS analysis as background, or base, maps.  Even more powerful is the ability to analyze the images.  In ArcView, you need the Image Analysis extension to do this.  In either case, you can integrate the pictures, which are “raster” (or cell-based) data, with standard ArcView shape files or ArcInfo coverages, which are “vector” (or point/line/polygon) data.

Images can be divided into two classes:  Intelligent and unintelligent.  Intelligent images are able to provide the user with information about the actual size or location of features, and may be integrated with vector data in such a way that they scale appropriately when the user zooms in and out.  Unintelligent images do not provide these capabilities.  However, the intelligence is not within the images themselves but, rather, within an accompanying “world file” or "header file" or "registration file" that GIS software sees and correlates with the image.  If an image was named “kewaunee.tif” and there is a properly formatted file called “kewaunee.tfw” in the same directory, a GIS reads this second file and uses the data from it to position and scale the image. Any image that is an “overhead view” can be registered simply by creating a proper world file.   

In the last lab, you downloaded one topographic map and one aerial photograph for the SGU campus.  You also downloaded one corresponding registration file for each image. This allowed the images to be displayed at the correct scale and location in ArcView.  In this lab, you do not have a registration file at first.  You will have to create the registration file.

2)  Based on the above discussion, why would it be especially difficult to use an oblique image -- one that is photographed at an angle from a satellite or an airplane -- within GIS or remote sensing software?

 

The simplest situation to describe is one using decimal degree (or “geographic projection”) data.  This is the default configuration in ArcView.  If the image is formatted in something like an Albers projection instead of decimal degree, it is still possible to create an effective world file; it just takes a little more tinkering.  

Typical images used in GIS and remote sensing analysis are  in .bil, .tif, .jpg, and .bip formats.  The file extension for a header file is usually the first and last letters of the image file extension, with a “w” at the end for “world” file.  For example, the header for mn.tif should be mn.tfw.  

3)  Enter the world file name for the following files:

image file name                                             world file name

-------------------------------------------------------------------------------

rosebud.tif                  

sheboygan.jpg

southdakota.bil

 ______________________________________

 

Understanding Registration and World Files

A world (registration) file for an image is just a text file consisting of six lines.  Here is a simple example

0.0107

0.0

0.0

-0.0087

-97.26

49.43

 

Each line in a registration file has a special purpose. The lines are not interchangeable, and must always be presented in this order, so writing a correct world file requires understanding the purpose and the data.

 LINE1 =            how much of a map unit (in this case, degrees) is represented by moving one pixel eastward from any spot (positive number).

LINE2 =            how much the image should be skewed from the sides (negative number, but usually zero)

LINE3 =            how much the image should be skewed from top and bottom (positive number, but usually zero)

LINE4 =            how much of a map unit (in this case, degrees) is represented by moving one pixel southward from any spot (negative number)

LINE5 =            X coordinate (in this case, decimal degrees longitude) of the top left (northwest) corner of the image (decimal degrees means negative number for 0-180 west, positive number for 0-180 east).

LINE6 =            Y coordinate (in this case, decimal degrees latitude) of the top left (northwest) corner of the image (decimal degrees means negative number for 0-90 south, positive number for 0-90 north).

4)  In the example header file above, is the image skewed?

   

5)  In the example header file above, what is the latitude-longitude coordinate of the northwest corner of the image?

  

6)  How many degrees are represented by moving any number of pixels in the E-W direction?

 

7)  How many degrees are represented by moving any number of pixels in the N-S direction?

 

Creating a World File and Registering an Image

Engage a graphics program such as Photo Editor under "Microsoft Office Tools" or another graphics program.  Open the image “mn.tif”.  This is a Minne-SO-ta colorized image file based on a digital elevation model (DEM), with the different colors representing elevation.

In Windows Paint, access “image” and then “attributes” for this information. 

8)  Enter width in pixels:    ____________ 

9)  Enter height in pixels:  ____________

Note:  If you are not able to access a graphics program that gives you this information, it is:  Width = 742 pixels, and height = 695 pixels.

Access ArcView.  Add Theme and navigate to the location of your data for this lab.  Make sure the “data source type” is “feature data source” (i.e. vector data) and select “states.shp.”   

Double click on the theme to access the legend editor.  Make the states transparent and the state boundaries a 2 or 3 in thickness.

Add your mn.tif file as a theme by changing “data source type” to “image data source”.

Save the project as imagereg.apr in your folder where the data resides.

Zoom to the extent of all themes.

10)  Can you see Minnesota on top of the state outline in its correct position? ____________

11)  Why or why not?

  

 Make mn.tif active and zoom to the extent of Minnesota.  Zoom out until you see the state lines.

12)  Where is Minnesota in your view?

  

Scroll the mouse across the state outlines.  

13)  What are the coordinates (upper right hand corner) for Minnesota?

    

It appears there because there is no header information associated with it.  You will create this header information so you can register the image.

Make mn.tif the active theme and zoom to the extent of Minnesota’s image. 

Determine the latitude and longitude coordinates for the top left and bottom right corners of the image, using decimal equivalents for easy fractions (1/3 = .33 and so on). 

14)  Fill in the following “worksheet,” substituting known numbers:

 

LINE1 = _____________

 

Line 1 is the longitude of the SE corner minus longitude of NW corner) divided by image width in pixels.   Show your work.

LINE2 = ___________           assume 0 skew

LINE3 = ___________           assume 0 skew

LINE4 =  ______________

 

Line 4 is the latitude of the SE corner minus latitude of NW corner) divided by the image height in pixels.  Show your work.

 

LINE5 = ____________

 

Line 5 is the northwest corner longitude.

LINE6 = ____________

Line 6 is the northwest corner latitude.

Look at the image below.  When recording the NW and SE corners, use the locations of the + plus signs shown in this image, so you account for Minnesota’s full extent.  Don’t cut off the Lake of the Woods area or the northeast corner of the state along Lake Superior.  You don’t want to shortchange any of those 10,000 lakes, eh!   Thumbnail image of Minnesota boundary.

Note that Lines 4 and 5 have to be negative numbers.  

15)  Why does line 5 have to be negative?

 

Create the world file with your data above and name it mn.tfw.  Create it in WordPad or NotePad.  You may use a Word Processor, but make sure you save it in text file format.

After you create your world file, add the image theme mn.tif again in ArcView.  

16)  Does the Minnesota image overlay on top of your state outlines?

 

Images may be offset from the vector data, depending on the accuracy of the image, the vector data used, and the coordinates you decided on. You can create an approximately correct world file through this method, but you may have to refine this file once you see how the image lines up with other known data sets. Each time you change and re-save the world file in your text editor, you must then delete and re-add the image in ArcView to test it.   To do this in ArcView, use the Edit menu choice, and select Delete Theme.  ArcView remembers the registration information for an image when it is first brought into a view, so changes to the world file will not re-position the image until the image is added again.

When refining the world file, first ensure the accuracy of Lines 5 and 6. Once this “starting point” is properly set, you can then tweak Lines 1 and 4 to stretch or shrink the image. Add a little bit at a time to the numbers in Lines 1 and 4 to expand an image; subtract from the numbers in Lines 1 and 4 to shrink an image.

17)  What coordinate system have you registered your image to?

 

18)  Name one data problem with registering this image to fit the state outline.

 

Once you’ve done the best you can do with adjusting the image, do the following:

19)  Paste the contents of your final header file below:

 

Save your ArcView project again.

Note: Creating a header file for a “projected image” involves basically the same process, except that the top left coordinates will be in numbers of meters away from a projection reference. Here is an example of a world file for an image in Albers projection:

4100.0

2.51179777165858

-0.08833980138674

-4050.0

-2360630.88315064972267

3182746.43488585297018

Image Registration with Landsat Image

In ArcView, under the Window menu, you should have an "imagereg" choice, representing the project window of your ArcView project.  Go to the project window.  It contains a left bar that includes choices for Views, Tables, Charts, and so on.  

Go to View, and select New.

In this new view, go to the pull down menu View--> Properties, and name your view "St Francis Fire."  You will have the opportunity to practice image registration one more time, this time using a Landsat satellite image of the St Francis wildfire, that burned during August 2002, west of St Francis, South Dakota on the Rosebud Sioux Reservation.

First, add the themes "toddhydro" and "toddroads."  These are roads and hydrography files from the 2000 TIGER files from the Census Bureau.   They are the same files that you downloaded and analyzed in a previous lab exercise.

The Landsat image for the fire is in JPG format.  Therefore, you need to turn on the JPG reader extension to view it:  

File--> Extensions.  Turn on the JPG reader.

Next, add the theme "stfrancisfire.jpg."

Zoom to the extent of all themes.  

20)  Does the stfrancisfire image overlay on top of the vector data?  

 

21)  Why or why not?

Therefore, you must create a header file that registers the fire image to the streams and roads.

Zoom to the area west of St Francis, near 101.5 west longitude and 43.24 north latitude.  Zoom to the extent of the streams and roads.  Then, make the St. Francis fire image active and zoom to the extent of it.  

22)  What features can give you a clue about how to register the image?

 

Step 1:  Enter the following data into WordPad or NotePad as the start for your registration file:

0.00010

0.0000

0.0000

-0.00010

-101.05

43.24

 

23)  What does this file need to be named?

 

Your goal is to:  Adjusting the numbers above until the image is registered as closely as possible to the vector files.  

Step 2:  Adjust the first and fourth lines until the scale of the image matches the scale of the roads and hydrography.  Take note of the following:  The image is a 30 meter Landsat image.  Therefore, each pixel on the screen represents 30 meters.  The vector data is in geographic coordinates:  latitude and longitude.  Therefore, the first and fourth lines need to represent how many degrees of latitude and longitude each one of these 30 meter pixels cover.

Step 3:  Adjust the origin point where the image starts drawing.  This will be the fifth and sixth lines of the registration file.

24)  Paste your final registration file below.

 

25)  Comment about how you came up with your final registration file.

 

26)  Which is greater in geographic extent--the Todd County hydro and roads data, or the image?

 

27)  Approximately how many square kilometers does the image cover?

 

28)  How many square kilometers does the smoke in the image cover?

 

29)  How did you determine the amount of area in the questions above?

 

30)  Make two observations about the features in the Landsat image?

 

31)  How does the Landsat image compare to the resolution of your aerial photograph from the previous lab?

 

32)  What are the large circles that appear in the southern and southeastern portions of the image?

 

Create a layout for printing that contains the results of your fire image along with the roads and hydrography.

View —> Layout.  Create your layout.  With the text tool, add your name, date, and change the title of the map to something that reflects what the map displays.

Print the layout.

Save your project.  Close your project and exit ArcView.

33) Summarize in a few sentences what you have learned about imagery in this lesson.

  

34) Summarize in a few sentences what you have learned about GIS in this lesson.

 

Back to SGU GIS Course Home

 

U.S. Department of the Interior
U.S. Geological Survey
Rocky Mountain Mapping Center
Maintainer: webmaster@rockyweb.cr.usgs.gov
URL:http://rockyweb.cr.usgs.gov /public/outreach/sgu/imageregistrationlesson.html
Last modified:  4 March 2004