Geography 387 Lab Home | Geography 387 Home | Geography Home

Lab 2: Map Projections


Outline

  1. Purpose
  2. Brief overview of coordinate systems and projections in ArcGIS
  3. Data download and lab preparation
  4. Add shapefiles to ArcMap
  5. Define spatial reference
  6. Changing how the map looks
  7. Reprojecting shapefiles
  8. Reproject (with Data Frame Properties)
  9. Calculate area
  10. Summarizing attribute table statistics
  11. Refine the final map and export a PDF map
  12. To turn in

1.0 Purpose

In this lab, we will assess map projection differences for the Conterminous US. We will create a map layout with multiple data frames in it (four maps in one page), and we will create a new shapefile in different map projections. Aside from subtle visual alignment differences, each projection's areas will be different. We will compare the spatial differences by "calculating" the area of the US and a special test shape.

2.0 Brief overview of coordinate systems and projections in ArcGIS

Geospatial data are encoded with certain units, the spatial components of each feature (lines, points) are projected using a mathematically defined coordinate system transformation. The earth is round and maps are flat. Map projections flatten the round earth. ArcGIS recognizes a bewildering number of projections and coordinate systems, but in practice only a limited subset of these are used. ArcGIS has attempted to remedy problems associated with dealing with projections with "projections on the fly". Essentially ArcGIS will try to recognize what projection your data have, if this information is not already explicitly defined (the .prj component of the shapefile contains this information), and then open them in ArcMap. Sometimes this works, sometimes it doesn't.

When you add data to ArcMap it is contained in a Data Frame. Recall from the first lab that there are two view options in ArcMap: one is Data View and the other is Layout View. When you are in Layout View you can see the Data Frame that contains your data. Think of the Data Frame like a window on your data. You can resize it, move it, and add other data frames to the same map layout. You can also change the projection of the data frame but this does not change the actual projected units coded in the feature class file--it only changes the projection that you are viewing the data with.

The shapefiles in this lab have no projected coordinates, but rather have feature coordinates stored in latitude and longitude spherical coordinates (degrees, minutes, seconds, or decimal degrees). This is called the Geographic Coordinate System (GCS). If, however, you wish to calculate an area, or determine a precise distance, this is not an appropriate coordinate system. You need a planar, Projected Coordinate System to do this. Square degrees are meaningless, and for most people a distance specified in degrees is also meaningless. All projection operations are based on spherical coordinates, and so this lab begins with feature classes in GCS, and then moves to transforming these data into projected coordinate systems.

3.0 Data download and lab preparation

Get the data

Create a new folder for your Lab 3 work. Download and unzip lab2.zip into your work folder.

Configure Windows Explorer

Windows Explorer by default views files and folders as miniature pictures (icons), this might be a good way to look at pictures but its not very useful otherwise. Go to the Lab 3 folder you created using Windows Explorer. In Windows Explorer go up to View -> Details to make Windows Explorer list the contents of the folder. In the Options dialog go to the View tab, and uncheck Hide extensions for known file types, check on Show hidden files and folders, and Check on both of the Display full path boxes. Click the Apply to All Folders button at the top, then click Apply (ignore all warning messages if there are any), and finally click OK.

To change Windows Explorer's default way of displaying the contents of folders (make it remember to display it this way) go to Tools -> Folder Options and click Apply to All Folders (2), then click Apply (3) and finally click OK (4) to close this dialog box. Windows explorer should now remember these View options, but depending on how the account you are using to log in to this computer is configured you might have to do this again.

Open the ArcGIS data folder and look at a shapefile

Look inside your work folder where you unzipped the Lab 3 files. You will see a series of files all with the name "USA_48", "USA_parks" or "cities" prefix but with different extensions (e.g., ".dbf", ".shp"). These files collectively are what constitute the shapefile called USA_48.shp and cities.shp. Now start ArcCatalog and connect to this same Lab 3 folder using "Connect to Folder". You can copy and paste the full path (e.g., E:/WorkSpace/lab3) from Windows Explorer's address field into the folder connect dialog. This is much faster than manually clicking through the directory structure.

In ArcCatalog you see only one file representing the cities dataset, the shapefile (.shp), and its icon has dots indicating it is contains points. ArcCatalog internally stores the linkages between all these files so you only have to work with one. Simplicity is good in some cases, but you keep in mind tha shapefile data are stored as separate files. For now we are not going to concern ourselves with what each of these files are, just know that a shapefile is not just one file and with ArcCatalog you can treat it like one single file.

Question 1:

1a. How many files comprise the USA_48.shp shapefile? How many files does the cities.shp shapefile comprise?

1b. Is there a projection assigned to these data? (hint: what does the ArcCatalog Metadata-Spatial, Details tell you)

1c. Why do you think that the cities.shp shapefile has more files?

4.0 Add shapefiles to ArcMap

Open ArcMap with a new empty map and drag the cities.shp file from from ArcCatalog into the empty ArcMap layout. After you have cities.shp in ArcMap, push the Add Data button and add USA_48 from the Lab 3 folder. What does ArcMap say?

Projection warning

This warning message means that ArcGIS has detected that USA_48.shp does not have spatial reference information. This means that there is no defined coordinate system or projection associated with the shapefile. Acknowledge the warning by clicking OK.

Now add the USA_parks.shp layer to your map document. You should see this warning message.

GCS difference warning

This warning informs us that there is a difference between the geographic coordinate system as it has been defined for the first layer you added (cities.shp), and the third layer USA_parks.shp. Click Close.

Generally it is fine to ignore these warning messages for cartographic purposes. However, errors in analyses may occur due to projection or coordinate system differences among layers. Be aware of these differneces among layers and consider the implications in your analyses.

Data frame

In ArcMap, the table of contents (TOC) shows which layers have been added to the map document for viewing. These layers are grouped in one or more data frames. By default, the TOC starts with an empty data frame called "Layers" (see figure above). The first layer added to Layers defines the data frame's projection and coordinate system. In this case, the first layer added was cities.shp. ArcGIS then reprojected "on the fly" the USA_48.shp and USA_parks.shp layers to Layer's projection (same as cities.shp). The USA_48.shp and USA_park.shp shapefiles are only reprojected in memory, using a mathematical equation, for use in the current ArcGIS session. Important: The geometry files of these shapefiles on the storage drive are not physically changed in this process. We will learn how to physically reproject layers later using ArcTools.

Note that in the middle of USA_48 there is a funny shape. This is referred to as the test-shape--it looks like a sideways ice-cream cone. The test shape will help you visualize the results of different projections. Both the roundness and the direction it points will change depending on the projection.

Close ArcMap completely and return to ArcCatalog.

5.0 Define spatial reference

Now we will define the projection for USA_48.shp. Right click on the USA_48.shp in ArcCatalog and select Properties. Click on the XY Coordinate System tab.

Projection properties

Notice that ArcGIS does not have any information on the shapefile's spatial reference. In fact, the USA_48.shp shapefile shares the same spatial reference as cities.shp. We will fix this problem. Click the Import button and select the cities.shp shapefile. Notice that the name of the spatial reference is "GCS_North_American_1983". This means that the shapefile is using the Geographic Coordinate System (no projection) with a datum of NAD83. You can see in the Details section of the window that the datum is indeed set to NAD83 ("D_North_American_1983"). Next click the OK button in the Shapefile Properties window. If you get this error message saying that the shapefile is in use by another application, be sure that you have ArcMap closed, click OK, and repeat the importation of the USA_48.shp spatial reference information.

Error message of a data lock

Open ArcMap with a new empty map and drag the cities.shp from from ArcCatalog into the empty ArcMap layout. Do the same for and USA_48.shp.

Question 2:

Did you get a warning message saying that USA_48.shp has a different coordinate system? If not, why?

6.0 Changing how the map looks

Change the colors (Symbology)

Right-click on the USA_48 layer in the TOC, and choose Properties then open the Symbology tab. Under Categories, choose "Unique values". In the pulldown menu under Value Field choose STATE_ABBR. Click the Add Values ... button at the bottom. The test-shape's STATE_ABBR attribute has been assigned ZZ, select it from the list and click OK. Double-click on it, and make it darker than the rest. <all other values> are the states, change them to a lighter color than the test shape. Click Apply, then click OK.

Adding the ZZ value in Symbology

In the example below, states were symbolized with light shades of gray for the states <all other values> and a dark gray for the test shape. You can choose to use color if you want so long as there is contrast among the states and the test shape.

ZZ symbolized as darker gray

Change display units, print layout

Now we will change the data frame's map units. At the top of ArcMap go up to View -> Data Frame Properties and under the General tab set Units -> Display to Miles (or Kilometers). Notice that you cannot change Map Units. This is the unit that ArcMap will use to measure distances (i.e. with the ruler tool) and to create a scalebar linked to the data frame's coordinate system. Display units can be whatever you want, but the Map Units are those of the shapefile's projected units (the units that the actual data are encoded with). This is an important concept to grasp.

Change data frame units

After you change the Display units, go up to File -> Page and Print Setup, change the page alignment from Portrait to Landscape.

In ArcMap switch from Data View to Layout View (under the View menu at the top or on the little globe vs. paper buttons in the bottom of the display window). Warning: getting used to navigating in Layout View can be frustrating. There are two toolbars, one works for Map View and the other for Layout View. PLEASE ASK FOR HELP if you are confused with this part.

We are going to use the ruler and guides to section the layout into four sections. Each section will get a view of the lower 48 states in a different projection. Turn on the rulers and guides in Layout View using View -> Guides, and View -> Rulers). First put guides 0.50 inches in on all sides (click on the ruler guide on the edge of the window and the appropriate dash). Next, divide the page into quarters--because you have 0.50" in on either side, what is the center of the page now? 5.5 inches for left-right side and 4.25 for the top-bottom side (you will have to make it 4.30 in. since ArcMap will not let you select 4.25 in.). Arrange the first Data Frame (the dashed rectangle containing your data visible in Layout View) so that it takes-up about a quarter of the page. You should find that the Data Frame snaps to the guidelines as you move the border close to it. Insert a scalebar. Scales usually have round even numbers. Make the scalebar have Metric units.

First map quarter

After you get though with the positioning of the scale references and the data frame, go up to File -> Document Properties and change Data Source Options to "Store relative path names" and save this map layout.

Question 3:

3a. What is the purpose of guidelines?
3b. Why would you leave a one-half inch margin on a page instead of taking up the full page?

Add a graticule

A graticule consists of meridians and parallels. Add a graticule that has 15 degree spacing along the x-axis (meridians) and 10 degree spacing along the y-axis (parallels).

To do this go to View -> Data Frame Properties. Select the Grids tab in the dialog. There should be no graticule defined because we started from an empty map. Select "New Grid" to open the graticule Wizard. Click Next and make the latitude interval 10 degrees and the longitude interval 15 degrees. Click the Style button to change the line--make it lighter and choose a thin dashed line style.

Grid wizard

After you specified the internal and changed the line style to be lighter gray and dashed, click Next. Uncheck both Major division ticks and Minor division ticks, then change the Text style to No Color (as shown in the screenshot below). Then click Next and Next again, the Apply and the OK.

Graticule no color symbolization

The graticule will be visible only as simple gray lines, this is nothing more than a reference. At the size of this page, 8.5 x 11" a graticule would not serve the purpose if it were cluttered with tic marks and text. A simple grid will enable you to see (at this page size) the differences in the geometry. You can only see the graticule in Layout View.

Final graticule

Question 4:

In making the graticule definition with the graticule Wizard, how did you make the text labels invisible?

Now save the map layout.

7.0 Reprojecting shapefiles

We used ArcCatalog to define the projection of the USA_48.shp shapefile as "Geographic". You did not change the coordinate system of the data frame; you only defined the coordinate system of the data. You are going to add three more data frames, each with a different projection.

It is important to realize at this point that there are two facets to ArcMap: what you see (Display) and the actual datasets (the shapefiles). Manipulating display units is different than transforming between projected coordinate systems.

First click once on the Data Frame called Layers (in TOC, "Layers" in bold font with a stack of yellow squares icon). Rename the Data Frame as "Geographic". Now select the Geographic data frame in the layout, right-click and choose Copy. Now right-click in the white area of the map and choose Paste.

Position the data frame in the second quadrant, it should snap in cleanly with the guidelines. Rename the new data frame from "Geographic" to "Albers".

Paste the copied data frame two more times so all four quadrants have data frames (but only one will have the scale). Rename the bottom left data frame to "Lambert" and the bottom right data frame to "Robinson". Select the Albers data frame and move on to the next section.

8.0 Reproject (with Data Frame Properties)

All the layers contained within the new data frames you just copied will be projected by changing the projection of the data frame. Think of the data frame like a window on your data. Although the shapefiles are all geographic (with decimal degree units) you can change how they are displayed to any projection or measuring unit. To change the actual units that the data are encoded with and their projection requires that we create a new shapefile or feature class with ArcTools or using the method outlined below.

Reproject to Albers

To change the display projection of Albers data frame, go up to View -> Data Frame Properties, click on the Coordinate System tab to view the projection. Choose a projection from those that are predefined (press the plus sign next to Predefined folder in the coordinate system window). Go to Projected Coordinate Systems. In the Continental subgroup choose North America.

Date frame coordinate system change

Choose a "USA Contiguous Albers Equal Area Conic" and click Apply.

Albers projection

Change the units that are displayed (in the General tab of the same dialog) to Kilometers. Select the General tab from the Data Frames Property dialog and change Display units.

Chaning units to kilometers

Notice that the Map Units are now Meters (they are dimmed, and in the field directly above the Display units you just changed). You can use kilometers, or nautical miles, or whatever unit you want for the Display units. The effect of this is to change the change the scalebar's units or the measurement tools units (the displayed units in other words). We only need one of our inset maps to have a scale bar because this will not change--the extent for each of the four data frames for the final map will be exactly the same.

Export the projected dataset

In order to set the projection permanently we need to export the "visually" projected data (that is, ArcMap's projection "on-the-fly"). Right-click on each of the three layers in the projected data frame and do Data -> Export Data...

Name the layer with its original name but "_alb" on the end to denote its projection.

Important Step: In the Export Data dialog, choose "the data frame", and put in the appropriate output shapefile name. If you browse to the folder where you will save the file, be sure that the "Save as type" field has "Shapefile" selected instead of "File and Personal Geodatabase feature classes" or "SQL feature classes" . Click "Yes" when asked if you want to add it this data frame after exporting the shapefile.

Exporting a shapefile to Albers

Question 5:

When exporting data, what is the difference between the two options for controlling the output shapefile projection?

Remove the original Geographic dataset (right-click, Remove) so only the USA_48_alb shapefile is in the Albers data frame. Select the Lambert data frame in the lower left.

Reproject to Lambert

With the Lambert data frame selected go up to View -> Data Frame Properties, click on the Coordinate System tab to change the projection.

This time choose "USA Contiguous Lambert Conformal Conic". Click Apply and OK.

Lambert projection

Once you have the New Data Frame set with Lambert projection, do Data -> Export Data and (Important Step) select "the data frame", and put "_lam" at the end of each of the new shapefile you are creating.

Click Yes when asked if you want to add it this data frame. Remove the original Geographic shapefile so only the USA_48_lam shapefile is in the data frame. Select the last data frame, Robinson.

Reproject to Robinson

In the last data frame repeat the procedure you've used for the last two. Use the "Robinson" projection under World projections. Follow the previous procedures to reproject USA_48 to the Robinson projection, calling it USA_48_rob.shp.

At this point you should have four data frames in your map, three of which contain data with a different projection. It is important that when you do a Data -> Export Data ... that you selected "the data frame" in the Export Data dialog. Doing this has permanently assigned the data a projected coordinate system and the planar units (Map units) will be meters. You can make sure each data frame shows the same extent by selecting it and clicking the Full Extent button (the globe in the map tools). The symbology should be identical for each data frame.

Layout with 4 maps of US in different projections

9.0 Calculate Area

There are two statistics I would like you to calculate in order to assess the three projected coordinate systems: 1) the area of the test-shape and 2) the area of the conterminous US (not including the test-test shape). In order to get these statistics you will need to update the Attribute Tables for each of the datasets. The Map units of the Geographic coordinate system data frame are decimal degrees (dd). These units are not based on planar coordinates, which are needed for calculating area.

The projected shapefiles (*_alb, *_lam, *_rob) have meter units and are projected in three different planar coordinate systems. The area attributes for the polygons in these shapefiles are stored in a separate table, with one row for each polygon.

Update Area for a shapefile

We will first recalculate the Area column for USA_48_alb. This will change the existing area values from square decimal degree to square meters.

1. Right-click the shapefile layer you want to update (e.g., USA_48_alb) and click Open Attribute Table.

2. Right-click the field heading Area and click Calculate Geometry.

3. Be sure that the "Use coordinate system of the data source" option and the "Square Meters [sq m]" options are selected (default settings). Click OK.

Calculate geometry

Repeat these procedures for the other two projected shapefiles (*_lam, *_rob). The Area values should be large numbers (e.g., 11 digits, see figure below). If not, you probably did not export the shapefiles with the "data frame" coordinate system (repeat Step 8 if necessary).

10. Summarizing attribute table statistics

So far you have updated the Attribute Tables of the projected datasets, and you have the areas in square meters for each shapefile in each o the three Data Frames (you have 3 new datasets, so 3 attribute tables). Getting the statistics from an attribute table is a two step process:

1) Right-click on USA_48_alb in the Albers data frame in the TOC of ArcMap, and choose Open Attribute Table. Next, right-click on the Area column heading in the Attribute table and choose Summarize...

In the Summarize dialog, check the First box under STATE_ABBR. Name the output "dbf" file (dBASE spreadsheet) with "alb_area_" at the beginning. Click NO when asked if you want to add the table to the map.

Summarizing area

2) Now open the summarized attribute table file (alb_area_USA48.dbf) with Excel. You will need to Sum the Area column. Ask your instructor for help with sum functions in Excel if you do not know how to do this step. You need to report two statistics: one is the area of the test shape and the other is the summed area of all 48 states. Remember that your units are square meters. You should convert these numbers to hectares. Do this by dividing the summed value by 10,000 (there are 10,000 square meters per hectare). Other conversions are available at the following site:

NODC Unit Conversion Guide - http://www.nodc.noaa.gov/dsdt/ucg

Create an Excel file with the summarized areas

For the write-up you will need the the area in hectares for the test shape and all the Conterminous US (including District of Columbia). This should be organized in one worksheet in an Excel file (.xls). Below is an example of what your spreadsheet could look like, but the format is up to you. Consult the instructor if you need assistance. You will find that learning how to export and import GIS attribute data with Excel is an invaluable skill.

Sum of areas in Excel

11. Refine the final map and export a PDF map

Map 1

Make a map from your map layout. Map requirements:

1) Shows four different projections of the Conterminous US and the test-shape, all on the same page.

2) A scalebar and numerical scale on the unprojected Geographic map (upper-left quadrant).

3) Add a title for each map (maybe its projection name for example) and a title for the whole map.

3) Include the area of the test-shape on each of the three projected data frames within the map's frame. Small fonts are fine, but don't go below 6 (that's too small).

Export the map to a PDF file. To export the map, go to File -> Export Map. Name the map, beginning with your LAST NAME, choose PDF as the type and set it to 150 dpi resolution. Then click Save.

Export final map as PDF

12. To turn in

  • The question sheet, with typed answers (Word document)
  • One map exported in PDF format, 150 dpi.
  • Summarized Excel file showing the areas for each of the three projected shapefiles with the hectares conversions.

Submit electronic files via email to klacefie@sonoma-county.org, with the subject "G387, Lab 2, [your last name]".

Please name your file attachments with your last name first, followed by whatever descriptive text that you want to include in the file name (e.g., "clark_lab3.doc").


Parts of this lab were originally created by Jeff Hemphill and other graduate students in the Geograhy Dept. at UC Santa Barbara. Used with permission.

The lab was updated for instruction at Sonoma State by Matthew Clark, Sept. 9, 2007.

This page was last modified on Sep. 3, 2008 by Matthew Clark