Spatial Data Handling
Georeferencing Images and CAD Data
As we often say, the beauty of GIS is the new information that is generated when we bring together data from many sources based on a framework of location. This tutorial will demonstrate how to georeference scanned maps, aerial photos and computer aided drafting files so that their value can be multiplied by association with other georeferenced data layers. The GSD GIS Manual Page, Sources of Geographic Images provides links to resources where you can find an infinite amount of image-based GIS data. Some of it is georeferenced already. Some scanned maps have coordinate system information in the margins that can be used to georeference the image without reference to any other data. This can be useful for beginning a spatial framework for areas, like China or countries of the former British Commonwealth where it is illegal or prohibitively expensive to obtail and exchange good controlled GIS layers. Where good GIS layers can be found, the process of georeferencing an image is surprisingly easy.
Tutorial Dataset
Create a folder for yourself, if necessary in c:\temp Expand the zip archive into to c:\temp
- The Boston dataset is the one featured in the image georeferencing demonstration.
- The Fields Point dataset is useful for demonstrating the georeferencing of a CAD dataset. Also has images to georeference.
References
- Hiding and Showing Toolbars
- Sources of Geographic Images
- Georeferencing a Raster Dataset ArcMap 9.3 Help
- Transforming CAD Datasets ArcMap 9.2 Help
- World Files for Rater Datasets
Issues to consider when georeferencing scanned maps and aerials and CAD files
- Choice of projection: The projection you choose for your view when georeferencing determines the quality of the result. If you choose a map projection that is similar to that used by your scanned map, your georeferenced map may fit nearly perfectly with the control map with only a few control points. If you choose a projection that is not similar to the scanned map, then you will find that no matter how many control points you add, even with higer-=order transforms applied, you will only be able to get the map to fit well in very limited areas.
- Choice of a control map: The success of t georeferencing project is largely dependent on the qality of your control layer. If you are using, for example, a streets layer that has a expected precision no better than 13 meters, you will be spining your wheels if you are trying to achieve a better fit than this in fitting control points to a scanned map. You should always keep in mind that part of the difficulty you may have in georeferncing a scanned map, is that if the scanned map or the control map have spatial errors, then your fit will not be very good. SO try to find the best control layer that you can.
- Georeferencing with aerial photos: Unrectified Aerial photos are not maps. That is, their scale is not consistent. Hills, and distance from the center of the photo can cause different parts of the map to be distorted different ways. It is often impossible to transform a photo so that all areas fit a control map well. So do the best you can with the areas that are imnportant. Keep in mind that tall things like buildings that aren't directly under the camera, are displaced. So even though the top of buildings may be the easiest things to see in a photo, try to pick your control points from the ground.
- Georeferencing Orthophotos: Most modern airphotos that are produced for planimetric surveys are Ortho-Rectified, which means that they have had distortions removed. Often the displacement of buildings as discussed above can be a factor, but if you are careful to pick your control points from the ground, you can get these to fit well.
- The georeferencing process creates some files that are read when the image is opened. These fiels include a .jgw, .jgwx, .ovr and.xml files. If you decide to re-georeference your image, you should remove it from ArcMap and use Windows Explorer to delete these files.
Georeferencing a Map Image
The ArcMap help document referenced below, does a good job of explaining the techniiques of georeferncing using the georeferencing toolbar. In this exercise, we will apply this using the 1897 Map of Boston and Surrounding Towns by Ormando Gray, downloaded from the David Rumsey's Wonderful On Line Map Collection. This map and its metadata are included in our tutorial dataset in the folder union_square/old_maps/rumsey This will provide a sense of how this works and some of the issues that may make it work better or worse.
Georeference your 1894 Map
- Open the ArcMap document compilation.mxd from the docs folder of the sample dataset.
- Take a look in the union_square/old_maps/rumsey of your sample dataset. Notice that it has a simple jpeg file and some metadata. There are also a bunch of other files that were created when we georeferenced the image. Delete the .aux, the .aux.xml, the .rrd and the ctl.txt files so we can begin with a simple .jpg file just as it was downloaded frm the Rumsey collection.
- Open the image in ArcMap.
- It does not show up where we would hope it would. Find it by Zooming to layer on it.
- Mouse over the top left corner of the image and not its arbitrary coordinate system has its origin (0,0) there.
- Look at the spatial referencing properties of this image. There are none.
The next several steps involve using the georeferencing tools to get the map image roughly aligned with the georeferenced data, and then fine-tuning this alignment. Our first goal is to get a sense of the extent of this map especuially as it relates to recognizable features in our GIS Data.
- Zoom to layer on your historic map image. Note the shape of the coastline covered on this map. For example look at the shape oif the Charles river and its northerly bend on the western side of the map. ALso note some landmarks in SouthBoston on the western edge.
- Now use the bookmark for Union Square Context to get back to your map view.
- Now adjust the view so that your map window approximates the extent of your historic map.
- Load the georeferencing toolbar (View->Toolbars->Georeferencing)
- Turn on Auto Adjust in the Georeferencing pulldown.
- Set your Gray_1897 map as the target layer in the georeferencing toolbar.
- Choose Fit to Display from the georeferencing pulldown.
- Add a couple of quick rough contol points to get the image in roughly the right place.
- Carefully add 3 more control points more precisely
- Examine the links table. Note that once you have more than 3 points, this table shows you which of your points fit best with the simple first order transformation.
- Delete the points with the biggest errors and notice how the fit of all of the other points improves.
- From the Links Table, save your control points as a text file in your Rumsey folder. This will allow you or someone else to pick up and refine this georeferencing project later.
- Take a look at the files in your Rumsey folder note that ArcMap has created a new aux., aux.xml, .rrd files
- Choose Update Georeferencing from the georeferencing toolbar,
- Notice that Update Georeferencing has added a World File for your image in the rumsey folder.
- Check the spatial referencing properties of your image. Note that it has inherited the CRS from your dataframe!
Now your image will align with with any GIS data you open it with, and it will reproject as necesary to conform to the coordinate system of the dataframe. If you ever wanted to fine-tune the georeferencing, you would delete all the supplementary files again -- except fore your control points file, and open the image for a fresh georeferencing session. Loading the control points table from Links table will restablish the control points that you have already picked -- and you can begin again where you left off. But Note: The georeferencing process creates some files that are read when the image is opened. These fiels include a .jgw, .jgwx, .ovr and.xml files. If you decide to re-georeference your image, you should remove it from ArcMap and use Windows Explorer to delete these files.
Georeferencing CAD files
This sample dataset covering Fields Point Rhode Island contains several referernce layers and an ungeoreferenced CAD dataset. Georeferencing a CAD dataset is very similar to georeferencing an image. The chief differences are that you only get two control points, and when you are done you need to use ArcCatalog or the Define Projection tool to update the Spatial Referencing settings of the CAD file when you are done.
References
- About CAD World Files
- Transforming CAD Datasets ArcMap 9.2 Help
- Defining a Projection
Bootstrapping a GIS: georeferencing without a control layer
It occaisionally happens that we want to build a GIS for an area for which our best coordinate system control is on a scanned map or aerial. In this case, if the image has places marked with known coordinates, we can use the Link Table feature of the georeferenfing toolbar to manually enter the geo-coordinates for the control points (after creating a row in the table by clicking on the known location in the image and completing the link by clicking anywhere else. THis process is explained at the bottom of the ArcMap Help document on Georeferencing a Raster Dataset. We will demonstrate this process here using this sample dataset for Istanbul.
- This image from Google earth shows how placemarks were created, and labeled with their latitudes and longitudes (after having set the Tools->Options to show coordinates in degrees. We then saved an image that includes our tics. It is important that the dataframe in arcmap be "projecting" the image in Geographic Coordinate System with reference to the Geodetic Spheroid of 1984 -- Unprojected GCS, WGS84
- Now, we trick the georeferencing tool by clicking on a control point on the image, and then clicking again. This enters a link in the links table with the correct image coordinate. We can then hand-enter the map coordinates.
SOmetimes we have a scanned map with mysterious coordinate references along the edge. These sample images come from a scanned map of Shanghai. Some experiments with rough GIS data from the ESRI Data collection shows us that these are likely to be coorinates in the UTM system, Zone 51. The coordinate tics along the margin that specify kilometers in the Universal Transverse Mercator zone 51. If you look at the bottom left corner, you will see the full coordinates in meters. Find intersections of the grid lines near the four corners of the map, and identify their x and y coordinates in meters (not kilometers). Jot these down on a piece of paper. The numbers running up the side of the map omit several digits for the sake of clarity. Only at the bottom rigth corner do they show you the whole numbers: See picture 1 and Picture 2.
To georeference this image, you would begin by projecting your dataframe to UTM Zone 51 (probably using a Chinese local Datum) and then hack your links table as described above. YOu now have a reference framework for detailed information you may collect in Shanghai with your GPS!