Why Don't My Layers Line Up?
Working with Coordinate Systems
The great thing about geographic information systems is that data from different sources can be overlayed with one another graphically, and associations can be made across them. This is made possible by spatial referencing systems such as Latitude and Longitude or projected coordinate systems. Software is getting better at aligning images and layers that are referenced in different coordinate systems, nevertheless we often encounter problems getting layers to line up. This document provides some tips on aligning GIS data for students at the Harvard Design School.
Topics Covered in this Document
- If a GIS LAyer Doesn't Line Up
- Assessing a Non-Alignment Problem
- Guessing the Projection of a Data Layer
- Experimenting with Projections
- Defining the Projection of an ArcGIS dataset
Related Documents
-
ESRI's Handbook on Map Projections v9.0
- Using ArcMap V.9.2 Has a decent overview of the issues of using on-the-fly projection in ArcGIS in Chapter 4.
- GIS Data Resources
- Getting Started with ArcGIS
- A formal overview of the problem of measuring the earth
- A tutorial on dealing with projections in ArcMap
Aligning GIS Data Layers in ArcGIS
GIS databases place features in space using coordinate systems. Because of the difficulties of referencing objects on this irregularly shaped planet into an orthogonal grid, any GIS layer may utilize any of hundreds coordinate systems. Software such as ArcGIS can do a good job of transforming the coordinate systems of GIS layers, aligning them on-the-fly, provided these data have embedded metadata that accurately describes the coordinate system that is used to identify locations within the dataset. When data layers don't line up, it is because one data layer or another does not have the proper embedded coordinate system information.
Assessing a Non-alignment Problem
Because ArcGIS can re-project the coordinate systems of layers for display purposes, and will do a certain amount of educated guessing, it can be a bit confusing. You may have layers of many different coordinate systems all being aligned well and being displayed in yet another coordinate system. Depending on the order that layers are added to a map, you may have layers that align well sometimes, and the next time you add them, they don't align!
Fundamentals of Coordinate Systems in ArcGIS
It is difficult to design a software system that can accomodate information in different coordinate systems without getting the user involved in reconciling one with the other. ArcGIS does this most of the time, but when it doesn't, confusion can be the result. Part of the problem is that the idea od putting coordinate system metadata into the GIS dataset itself, is relatively new, and you frequently come up with data that do not have this coordinate system identification. To make matters worse, when there is a problem with a coordinate system, there are three different issues that come into play, and each of these can confound the other. So it may be helpful to describe these three things now:
- The Coordinate System Inherent in your Data The geometry in GIS datasets is either encoded as vertices with coordinates, or as rasters with regular cells that are registered to a coordinate system by locating one corner and declaring the size of each cell. The units of these coordinates may be completely arbitrary, or they could be meters or feet or decimal degrees in some well-known geodetic coordinate system.
- Coordinate System Properties Many datasets know what their coordinate referencing systems are by nature of metadata that travels with the dataset. If you check the layer's properties in ArcMap or ArcCatalog, you can see whether such information exists. If the coordinate system property is Unknown, then the machine readable metadata for the dataset is missing, you will need to find out what the inherent coordinate system of the data is, and set this property accordingly. If you set this property to a coordinate system that is not the inhernet coordinate system of the data, then your problem is compounded. It is besyt not to set this property until you know what to set it to. If setitng this coordinate system property of a layer does not fix the problem, you should set this back to Unknown or you will be hopelessly confused.
- The Coordinate System of the ArcMap Dataframe ArcMap is capable of transforming the coordinates of datasets on-the-fly (provided each layer has its coordinate system proerties set properly.) Layers that don't have coordinate system metadata can't be transformed (of course.) So the on-the-fly transformation of ArcMap can be helpful -- since you can experiment with various coordinate systems on the layers that are transformable, until they align with the unknown one. On the other hand, the on-the-fly transformation of ArcMAp can be confusing, as will be demonstrated below.
To assure that data layers will always align, the coordinate systems of all layers having projected (not latitude and longitude) coordinate systems need to be defined, and these definitions need to be embedded into the data layer. The first task in assessing the situation with layers that don't align is to check the source properties of the layers you have open, and checking the coordinate system definition under the Source tab. If some of your layers is 'Undefined' or 'No Projection' then these you need to figure out the coordinate system of the data, and then you may have to have their projection defined in ArcCatalog.
Identifying a Coordinate System
If you have a layer that doesn't have a coordinate system defined, there are a number of alternatives for figuring out what its coordinate system is. Did the data layer come with any metadata (documentation about the data?) This would be the best way to learn whatr the coordinate system is. If not, you should figure out what the native coordinate units of the layer are, and then proceed to guess what the projection is.
What are the Units? the most fundamental aspect of a coordinate system are the coordinate units. In order to figure out what these are, you should go to the properties of the data-frame and clear the projection information so that ArcMap will stop re-aligning the layers automatically and show each data layer in its own coordinate space. You should also set the Map Units, under the General Properties tab, to unknown units, so that ArcMap will cease its transformation of units, so you can learn what they actually are! Once you have done this, you may see that several layers that were aligned aren't anymore. Thats OK, you can right click on any layer and zoom to its extents. Now, when you wave the mouse over the map, you can watch the coordinates change on the bottom right side of the map frame. Are all of the coordinates between [-180 < X > 180] and [90 > Y > -90]? If so, then you have a layer with an unprojected, Latitude Longitude in Decimal Degrees (Geographic) coordinate system. If the coordinates aren't in decimal degrees, they are most likely in feet or meters. Use the measure tool to get the length of things like the width of a street, or the distance between two known points to see the length in the natural units of that layer. Since a a measurement in Feet will be approximately three times what you would expect a measurement in Meters would be, it is easy to guess what the units are.
The Projection: guessing a projection is easy if the creator of the data layer followed one of many extant conventions. If the data was compiled by a state or city government in the US, it is more than likely in the appropriate state-plane zone. You can find a shape file of US State Plane zones in the shared volume, \\terra\geo in the folder util\projections. If the data is locally detailed but part of a wide-ranging database that is broken down into many small tiled datasets, such as US Geological Survey or British Ordinance Survey maps, then the projection is most likely in the apropriate zone of the Universal Transverse Mercator System (UTM). Here is a handy image of UTM Zones. If the dataset covers a wide region, such as a country or continent in a single piece, then it may use one of the pre-defined national or continental coordinate systems that will be suggested in the coordinate system picker in ArcGIS.
The Earth Model A necessary component of a projection definiton is the earth model, sometimes known as the geographic Coordionate system. For data concerning North America, your choice is typically between the North American Datum (NAD) of 1927 or 1983. If you you think that your data was based on a map made before 1983, then pick NAD27. If not, choose NAD83. Guessing wrong can lead to errors as big as 20 feet. If your projection is UTM, and the focus is not in North America, then your earth model is probably the World Geodetic Spheroid of 1972 or WGS 1984. These guesses will cover about 95 percent of the data encounterd at the GSD.
Experimenting with Coordinate Systems
A handy aspect of ArcMap's projection capabilities is that it is easy to reproject data on the fly to see what it looks like. You can change the projection of the data frame, and the layers with defined coordinate systems will transform; any layers without defined coordinate systems will remain in place. This can be a useful technique for experimenting. If your defined layers line up with the undefined layer, then you have picked the correct projection! The data layers stored in the shared volume \\terra\geo in the folder util\projections provide many reference layers that will be handy for experimenting with projections.
Defining Coordinate systems in ArcGIS
OK, so now you have figured out what the coordinate system is for your data. How can you embed the proper coordinate system info into your data? This is accomplished with ArcCatalog. For images, you simply right-click on the dataset and edit the Spatial Reference properties. For a vector dataset, go to the field properties, select the Shape field, and use the '...' button next to the Spatial Reference property to edit the spatial referencing system. Note that your GIS data layers have ab inherent coodinate system. Using ArcCatalog to set the coordinate system properties of a dataset does not change the coodinnate system, it merely identifies it. If, in setting the coordinate system properties, you misidentify the data's coordinate system, not only will the data not line up with other layers, but it will be very difficult for anyone to figure out why.
Remember to redefine the projection properties of the data frame to something sensible before testing the alignment of your newly-defined data layer. ArcGIS won't try to align layers with disparate coordinate systems unless you tell it how you want the layers to be transformed!