Lab 5: Projections

1. Creating and reading the projection information

a. Coordinate system of a layer

ArcMap expects to find information on a layer's coordinate system in a projection file (.prj). For example, when you ask it to open the shapefile hydro.shp, it looks for hydro.prj; if this file is not found, it issues a warning,
warning box
and in the coordinate pane at the bottom of the window, the units of the coordinates are "Unknown Units": coordinates unknown

The missing projection file can be created in ArcToolbox by clicking Data Management Tools > Projections and Transformations > Define Projection, then selecting from hundreds of standard projections built into the software. The projection of our East Bay data set is found under Predefined > Projected Coordinate Systems > State Plane > NAD 1927 > California Zone III. ArcToolbox writes the .prj file, which includes

After .prj files have been created for all the layers, ArcMap will no longer give the warning when opening them, and the coordinate pane shows the correct units: feet. You can see the layer's coordinate system in ArcMap in the Layer Properties dialog box under the Source tab, or in ArcCatalog in the Metadata plane under the Spatial tab. (Actually, ArcCatalog displays what it finds in the layer's metadata file, which is written in XML. The metadata for the shapefile hydro.shp is hydro.shp.xml. When you browse a layer in ArcCatalog, it will create this metadata file if it doesn't exist already, reading the .prj file to find the coordinate system.)

b. Coordinate system of a data frame

ArcMap assumes each data frame is using a common coordinate system for all its layers. Normally, an empty frame takes on the coordinate system of the first layer added to it. The frame's coordinate system is shown in the Data Frame Properties dialog box on the Coordinate System tab, and can also be set or reset there:
data frame dialog box
This dialog defines the coordinate system for the frame, not any particular layer; that system is saved in the map document (.mxd), not in a projection file associated with a layer. In fact, ArcMap will display the layers re-projected on the fly into whatever system you select in the Data Frame Properties dialog, using built-in functions to convert from the layer's own coordinates. The coordinates written in the shapefile don't change, but ArcMap computes new coordinates for display. For example, here's the same shapefile displayed in two data frames with different coordinate systems:
North America Projections
The frame on the left is in geographic coordinates, GCS_North_American_1983, the frame on the right is in a projected coordinate system, North_America_Albers_Equal_Area_Conic.

A layer may be exported with its data frame's projection: this means ArcMap writes a new copy of all the layer files and also writes a .prj file containing the data frame's projection, even if the original layer didn't have a .prj file.


2. Changing the projection of a layer

Let's see what happens when we change a layer's projection. First, look at the vegetation layer with ArcCatalog to check that it is in the State Plane projection.
ArcCatalog_sp
ArcToolbox can re-project a layer, which means inverting the projection to get geographical coordinates (latitude and longitude); computing new projected coordinates using a different projection; and writing the new coordinates in a new shapefile. Let's re-project this layer into Universal Transverse Mercator Zone 10. Note that both projections use geographical coordinates referred to the North American Datum of 1927.
ArcToolbox menuprojection dialog from ArcToolbox
(The first time I tried to re-project a layer that was currently open in ArcMap, ArcToolbox responded with a totally uninformative error message. I quit the program, tried again, and then it worked fine.) Compare the original shapefile:
veg layer in sp coords
to the re-projected one:
veg layer in UTM coords
(I opened it in a different instance of ArcMap. If I had opened the re-projected layer in the same data frame with the original, it would have automatically been projected back into the frame's coordinate system, and looked exactly the same as before!)

The re-projected layer is tilted slightly differently because a different projection means a different choice of which meridians appear as vertical lines on the map. Also, the coordinates are different, not just because they're in meters instead of feet, but also because of a different choice of coordinate origin. We can find out the coordinate origin by looking at the metadata for the new layer:
ArcCatalog metadata
In the UTM system the latitude of projection origin is 0 degrees (the equator), and the false northing is 0, so the equator has a y coordinate of 0 meters. The y coordinate of our data set (see the coordinates in the ArcMap screen capture) is about 4 million meters: that's how far north of the equator it is.


3. Transformation to a new geographic coordinate system

Finally, ArcToolbox can also transform coordinates from one geographic coordinate system to another. Each coordinate system has an associated ellipsoid model of the Earth, which can change when ellipsoids are chosen to best fit different regions of the Earth as well as when the accuracy of measurements is improved. Here's how the ellipsoids used in the North American Datums of 1927 and 1983 compare:
 
ellipsoid27 ellipsoid83

Also, the latitude and longitude of the same point on the Earth's surface is different in NAD83 from NAD27. These coordinates were calculated by minimizing errors over the whole survey network, and from 1927 to 1983 more survey points were added and accuracy was improved, so the best estimate of the correct latitude and longitude of a particular point has changed. The National Geodetic Survey developed software to do this conversion, called NADCON, and it is incorporated into ArcToolbox.
ArcToolbox menuNADCON dialog
ArcToolbox back-projects from the State Plane to geographic coordinates; transforms the geographic coordinates; re-projects them into another State Plane; and writes the new coordinates in a new shapefile.

Then the layer appears in ArcMap, but caution: if you try to display a NAD83 based shapefile in the same data frame with a NAD27 one, ArcToolbox issues a warning, "Datum conflict between map and output".

Even so, there's no visible difference when the two layers are displayed on top of each other:
NAD27 and NAD83 together
However, the coordinates have changed. Most of the change is because a different "false easting" and "false northing" are applied in the 1983-based State Plane projection. But also, the geographic coordinates have changed just a little bit: about .001 degree longitude and .0001 degree latitude.
 
NAD 1927
NAD 1983
Origin of coordinates
Position of our data set bounding coords NAD 27 bounding coords NAD83

The change in latitude and longitude is enough to change the projected coordinates by about 300 feet to the west and 10 feet to the south on top of the change in origin. This agrees with the map of latitude and longitude datum shifts associated with the conversion. (Actually, NADCON looks up the shifts on a grid of size 15 minutes (0.25 degree), which is larger than the area shown in our map. Our whole map likely lies within one NADCON grid, so the same correction was applied to every point on the map, and that's why it doesn't look any different.) Here's how I calculated the datum shifts:
original coord remove old origin add new origin expected position actual-expected
left 1494752.25 -2000000 +6561666.667 6056418.917 -299.683
bottom 505363.9375 -0 +1640416.667 2145780.605 -9.754
New position of left bounding coordinate due to change in "false easting" alone would be 6056418.917 feet. The actual coordinate is less (i.e., west) than this by about 300 feet due to change in the best estimate of longitude. Likewise for the bottom coordinate.