Exploring Error and Uncertainty Related to Datums and Projections Using ArcGIS

Author: Nicolas Malloy

This activity aims to review concepts related to datums, coordinate systems, and map projections and how to manage them in ArcGIS. Additionally, this tutorial introduces you to some new tools and concepts related to data management. In this activity, you create and organize a workspace folder using a standardized folder structure. You then download and decompress the data from public sources. Using the data, you create a geodatabase and explore issues related to error and uncertainty concerning the potential spatial error related to datums, coordinate systems, and map projections.

Estimated time to complete this tutorial: 3 hours

Learning Outcomes

Readers should be able to accomplish the following outcomes by the end of this tutorial:

  • Summarize the steps for creating and organizing a project workspace folder structure
  • Illustrate the ability to download data from a public source
  • Demonstrate how to create a file geodatabase
  • Practice converting shapefiles to a geodatabase feature class
  • Add XY data in ArcMap
  • Exemplify the use of proximity operations such as buffers
  • Analyze distortion patterns using Tissot’s Indicatrices
  • Troubleshoot the causes of spatial errors
  • Solve data alignment problems in ArcMap
  • Insert essential map elements using ArcMap Export a high-resolution map

Skill Drill: Setting Up Your Workspace

On your desktop, create a workspace folder and give it a descriptive name, such as ″Exploring_Errors.″ Be sure there are no spaces in the name. You may use underscores instead of spaces. Create the following three subfolders inside this folder: original, working, and final.

Skill Drill: Downloading Data from Natural Earth

As you learned previously, Natural Earth is a website created to provide vector and raster data to meet cartographers’ needs using various software applications. The data on this website is free to use without restrictions. Open the Chrome browser and navigate to the Natural Earth website. Click the Downloads link. Under Small scale data, click the Cultural link (Figure 2.01).

If, for some reason, the website is down or the data is no longer available, this link takes you to a Google Drive page where you can download a backup copy of the data: https://bit.ly/uncertainty-prj-datum.

Figure 2.01: Natural Earth provides physical and cultural data in large, medium, and small scale.

Under Admin 0-Countries, right-click Download countries (Figure 2.02). Select, Save Link As, then navigate to your original folder and save.

Figure 2.02: The image here shows the Natural Earth Cultural Vectors download page for small-scale data.

Scroll down until you see Populated Places (Figure 2.03). Right-click the button that says Download populated places, select Save Link as, then navigate to your original folder and save.

Figure 2.03: This layer contains city and town points for the globe.

When you are ready, hit the back button and return to the main downloads page. Click Physical under Small scale data. On the Physical Vectors page, scroll down until you see Graticules (Figure 2.04). Right-click on the button that says Download 10. Select, Save Link As, then navigate to your original folder and save.

Figure 2.04: The image here shows the Natural Earth Physical Vectors download page for small-scale data. Graticules is near the bottom.

Previously, you learned how to decompress a file using 7zip. In Microsoft Windows, navigate to your original folder. You should see the two zip files, one for countries and one for graticules (Figure 2.05). For each zip file, right-click, select 7zip, then Extract Here.

Figure 2.05: You can access the 7zip software by right-clicking on a compressed file.

Be sure to delete the zip files when you are done decompressing them (Figure 2.06). You won’t need them anymore. Eliminating them saves space and helps to avoid confusion later.

Figure 2.06: As you can see, many parts make a shapefile. It must use these files together to work correctly. NEVER delete any of the component files. Pay attention when deleting unwanted zip files.

Skill Drill: Connect to Your Workspace Folder in ArcMap

Locate ArcMap on your computer and launch the software. Open a blank map document. In the Catalog Window, connect to your workspace folder, Exploring_Errors, located on the desktop (Figure 2.07)

Figure 2.07: You connect to a folder so that the contents appear in the Catalog Window.

Expand the original folder to view the contents. You should see the three shapefiles inside that represent countries, populated places, and graticules (Figure 2.08). Do not add the shapefiles to the map. Instead, you convert them to feature classes in the next step.

Figure 2.08: The contents of the workspace folder are displayed and organized in the Catalog Window.

This display of folders and files is sometimes called the Catalog Tree.

Creating A File Geodatabase

This step involves using a file structure called a geodatabase. A geodatabase is like a container that can hold many types of geospatial datasets. It is a way to organize and manage related datasets. There are several different types of geodatabases. The one covered here is called a file geodatabase, which can store individual datasets up to one terabyte (TB) in size.
In ArcMap, right-click on the working folder in the Catalog Window. Select New, then File Geodatabase (Figure 2.09).

Figure 2.09: You can access contextual menus by right-clicking on a file or folder.

The geodatabase should appear in your working folder with the default name, New File Geodatabase (Figure 2.10).

Figure 2.10: A new file geodatabase is generated within the folder you select.

Change the name to something more meaningful, such as your initials, followed by World Data (Figure 2.11). Spaces are OK to use when naming geodatabase.

Figure 2.11: This example uses the author’s initials. You should use your initials in the file name.

When saving files, ArcMap uses a default geodatabase as an output location. As a result, many readers encounter a situation where they forget to specify the output location, and data gets saved to the default geodatabase. This carelessness may lead to lost data or other unforeseen problems. In this step, you set the default output location to the geodatabase you created.
From the File menu, open the Map Document Properties window. Next to Default Geodatabase click the yellow file folder icon to browse to your working folder (Figure 2.12).

Figure 2.12: The Map Document Properties window indicates which geodatabase is the default.

If you do not see your workspace folder in the Default Geodatabase window, use the drop-down menu to locate it (Figure 2.13).

Figure 2.13: The drop-down menu will display the list of connected folders.

Navigate to your working folder and select your World Data geodatabase. When ready, click ADD (Figure 2.14).

Figure 2.14: Be sure to choose the geodatabase you created. The name should include your initials.

When you return to the Map Document Properties window, be sure to check the box next to Store relative pathnames to data sources (Figure 2.15). When ready, click OK.

Figure 2.15: Always make sure to check the Store relative pathnames to data sources option.

Creating Feature Classes from Shapefiles

Until now, most readers should primarily have experience working with shapefiles, which is the most common file format for vector data. In ArcMap, a shapefile appears as a single file (Figure 2.08). However, when viewed in Microsoft File Explorer, you can see that a shapefile consists of many files linked together (Figure 2.06). Some of these files store spatial information, such as geographic location. Some files store attribute data as a database file.
Others will save the geometry of a feature. Separating any one of these pieces makes the data unusable.

In this step, you use the shapefiles downloaded from Natural Earth to create feature classes within the geodatabase. In many ways, a feature class works similar to a shapefile. Like a shapefile, it is a collection of geographic features stored in vector format that have the same geometry type, such as point, line, or polygon. For most readers, the most noticeable differences relate to the file structure and file size. When stored in a file geodatabase, a feature class can save a maximum of one terabyte of data. A stand-alone shapefile has a size limit of only two gigabytes (GB).
In the catalog window, right-click on the geodatabase. Select Import, then Feature Class (single) (Figure 2.16).

Figure 2.16: You can import several different data types into a file geodatabase, a feature class, a table, and a raster dataset.

For the Input Features, choose the shapefile representing countries. The output location is already set to your geodatabase. For the Output Feature Class, name the file countries (Figure 2.17). You do not need to enter a file extension. Leave all other settings as default and click OK.

Figure 2.17: Check to make sure your settings match those in this image.

When the geoprocessing is complete, you should see the new feature class within the geodatabase. ArcMap should also add the new feature class to the map document (Figure 2.18).

Figure 2.18: The countries feature class gets added to the map.

Skill Drill: Creating Feature Classes from Shapefiles

Repeat these steps and import new feature classes to the geodatabase for the graticules and populated places. Be sure to give the feature classes human-friendly names. When done, all of the feature classes should be added to the map (Figure 2.19). Take a moment to save your map document within your workspace folder. Call the map document, Exploring Errors.

Figure 2.19: All three feature classes are added to the map, and the map document is saved within the workspace folder. Double-click or tap twice to view the image in a larger size.

Adding XY Data Using the ArcCatalog Window

Previously, you learned how to add XY data to ArcMap using the File menu and choosing Add Data, Add XY Data. This procedure creates a representation of the data on the map as an Events layer. An Events layer is a temporary representation of the data. It might look like a regular shapefile, but it does not have a database. A depiction of the data is useful for readers that may want to view the data before making a permanent file. In this step, you do not need a temporary representation. Instead, you use the ArcCatalog window to add XY data as a feature class in your geodatabase.
Download the following CSV file and save it to your original folder. The link takes you to a Google Drive download page:

Tissot’s Indicatrices centroids

Take a moment to view the contents of the file using Microsoft Excel. As you can see, it consists of a table with minimal information (Figure 2.20). There are only two fields, longitude, and latitude. The values are in degrees represented by plain integers.

Figure 2.20: To work with GIS data, the first row of a CSV table must contain the field names.

The other than the latitude and longitude coordinates, the CSV table does not contain any additional spatial information, such as the geodetic datum. To properly align the data, you must be sure to correctly define the datum from which these geographic coordinates were derived. In this instance, the geographic coordinates come from WGS 1984 the datum most commonly used by GPS receivers and the internet.
In ArcMap, refresh the original folder to be sure that the CSV file appears in the Catalog Tree. When you see the Tissot’s Indicatrices centroids CSV file, right-click on the file and select Create Feature Class, then From XY table (Figure 2.21).

Figure 2.21: Be sure to right-click on the CSV file to see the correct contextual menu.

When the Create Feature Class From XY Table window appears, the longitude should automatically appear as the X field, and the latitude should appear as the Y field (Figure 2.22). If these fields do not appear, you should be able to use the drop-down menu and select them.

Figure 2.22: ArcMap automatically locates the fields in the CSV file that represent the XY coordinates.

Next, you must specify to which spatial reference system the XY coordinates belong. Click the button that says Coordinate System of Input Coordinates (Figure 2.23).

Figure 2.23: ArcMap does not have enough information to determine to which spatial reference the XY coordinates belong. You must manually indicate the correct spatial reference.

When the Spatial Reference Properties window opens, expand the Geographic Coordinate Systems folder. Next, expand the World folder. Scroll down and choose WGS 1984 (Figure 2.24). When ready, click OK.

Figure 2.24: Your Spatial Reference Properties window should look like the image above.

The output of the Create Feature Class From XY Table window should already be set to your World Data geodatabase. Check to make sure (Figure 2.25).

Figure 2.25: If you set your World Data geodatabase as the default, it should automatically appear as the output location for any tool you use in ArcMap.

Leave all other default settings and click OK. When the geoprocessing is complete, you should see the new feature class in your geodatabase (Figure 2.26). When ready, add the new feature class to the map.

Figure 2.26: A new point feature class appears in the geodatabase.

Skill Drill: Creating Indicatrices Using the Buffer Tool

In 1859, the French mathematician Nicolas Auguste Tissot introduced a method to visualize the distortions of map projections using regularly spaced circles. On the globe, each circle was precisely the same size. When one transforms the globe into a flat plane using mathematical equations, the size and shape of the circles reflect the distortion patterns of the map projection. In this instance, you use centroids feature class and the buffer tool to create a similar indicatrix.

Begin by changing the data frame map projection so that Earth looks closer to a globe. On the data frame properties window, navigate to the Coordinate System tab. In the Projected Coordinate System folder, locate the World folder. Choose the World from Space. Double-click on it to open the Project Coordinate System Properties. Change the longitude of center to 180 (Figure 2.27). When ready, click OK, then click OK again. If a warning message appears, click Yes to close it. The map should appear closer in size and shape as the globe.

Figure 2.27: Setting the Longitude of Center to 180 centers the map on the pacific ocean.

Earlier, you learned how to use the buffer tool. In ArcMap, create a buffer around the Tissot’s Indicatrices centroids. Set the buffer distance to five hundred kilometers. Save the output to your geodatabase and call the feature class indicatrix. Under Method, choose GEODESIC (Figure 2.28). When using the geodesic method, the ArcGIS software measures distance based on the elliptical model of Earth’s shape. As a result, the buffer distances remain accurate in all map projections. Leave all other default settings and click OK.

Figure 2.28: Check to make sure that your settings match the image above.

Your buffers should appear as regularly spaced circles around the globe. Take a moment to remove the centroid layer from the Table of Contents while leaving the indicatrix layer. Using the skills learned previously, rearrange the map layers and change the colors of the basemap so that the indicatrix layer is easily visible (Figure 2.29).

Figure 2.29: In this example, the graticule and countries layer were changed to a light grey. The cities were changed to grey stars. The graticule color is dark amethyst with a transparency of 50%. For clarity, the graticule layer was moved to the bottom of the drawing order.

Evaluate Distortion Patterns in Map Projections

As learned previously, a map projection is the geometric transformation of the round earth onto a flat plane using mathematical equations. One cannot perform this transformation without a high degree of distortion. However, some map projections can maintain a high degree of accuracy of particular geometric characteristics called preserved properties. Distortion occurs in one or more of the following properties:

  • Area
  • Shape
  • Distance
  • Direction
  • Continuity

A map projection may be able to maintain more than one of these properties, but no map projection can preserve all of them at once. Take a moment to capture a screenshot of your ArcMap window. You can do this by pressing the Alt key and the Print Screen key on your keyboard while the ArcMap window is active. Open a blank Microsoft word document.

In Microsoft Word, press Ctrl V to paste the screenshot into the document. Right-click the image and choose Insert Caption (Figure 2.30). Type the name of the map projection as the figure caption. Then, write down the answer to the following questions:

  1. Which of the five properties appear to be preserved based on the size and shape of the indicatrices?
  2. Which of the five properties appear to be distorted based on the size and shape of the indicatrices?
  3. Where on the map does there appear to be minimal distortion?
  4. Where on the map does there appear to be the most distortion?
Figure 2.30: You should be prepared to discuss the answers to these questions at a later time.

Save your Word document to your final folder. You answer these same questions for other map projections in a later step.

Measuring Scale Distortion

In ArcMap, activate the Snapping toolbar (Figure 2.31).

Figure 2.31: You can access the list of toolbars by right-clicking on the empty area above the map.

One the Snapping toolbar, be sure that only the Point Snapping is active (Figure 2.32). Point snapping will make measurements easier in a later step.

Figure 2.32: A bluish square surrounds the active snapping icons.

Turn on the labels for the populated places layer so that the map displays the name of each city. On the Tools toolbar, find the Measure tool (Figure 2.33).

Figure 2.33: The Measure tool icon looks like a ruler with arrows above.

Because the circles on the indicatrix layer are precisely one thousand kilometers across, change the units in the Measure tool to kilometers (Figure 2.34).

Figure 2.34: The Measure tool can use several different unit types for both distance and area.

The first measurements need to establish an accurate baseline. To do this, change the Measurement Type to Geodesic (Figure 2.35). Recall that a geodesic measurement uses the spherical model of Earth when calculating distances.

Figure 2.35: The geodesic measurement calculates the shortest distance between two points on a sphere and is accurate, regardless of the map projection.

Practice using the Measure tool on one of the circles on the indicatrix layer. Zoom into the circle closest to Alaska. It has a shape that is nearly a perfect circle. Then, with the Measure tool active, move the mouse cursor over one side of the circle and click once. Then, move the cursor to the opposite side of the circle and double-click to complete the line segment. The Measure tool records the information on the dialog box (Figure 2.36). Don’t worry about getting it perfect. This step helps you practice using the Measure tool while also demonstrating the accuracy of a geodesic measurement.

Figure 2.36: This example uses the circle near Alaska to test the accuracy of the geodesic measurement. Because the buffer distance was set to a radius of five hundred kilometers, the diameter of the circle should be one thousand kilometers.

Next, measure the distance between Tokyo to Vancouver. You may need to zoom out to see both cities clearly (Figure 2.37). The point snapping setting should help with the accuracy of the measurement.

Figure 2.37: ArcMap uses the spherical shape of Earth, a three-dimensional surface when applying geodesic measurements.

Open a blank Microsoft Excel workbook and record the geodesic length in kilometers between Tokyo and Vancouver. Also, record the scale factor by entering the following formula in the cell next to the distance in kilometers (Figure 2.38). Be sure to include the dollar signs in the second half of the equation.

 =SUM(B2/$B$2)
Figure 2.38: The geodesic measurement is technically not a map projection. Its purpose on the table is to serve as a relatively accurate baseline to compare with the planar distance taken from the map projections.

On the Measure tool dialog box, change the Measurement Type to Planar (Figure 2.39).

Figure 2.39: The planar distance uses the spatial information derived from the map projection to measure distances.

Once again, measure the distance from Tokyo to Vancouver. You should notice a slight difference in the distance value (Figure 2.40).

Figure 2.40: ArcMap uses the map projection, a two-dimensional surface when applying planar measurements.

Record the planar distance from Tokyo to Vancouver into your Excel table (Figure 2.41). Copy and paste the scale factor formula into the cell next to the distance in kilometers for the World from Space projection.

Figure 2.41: This table records the differences in Kilometers between the three-dimensional geodesic measurement and the two-dimensional planar measurements of map projections.

As you learned previously, the scale factor is the relationship between the principal scale and the actual scale (Figure 2.42). One uses the principal scale, based on the scale of the generating globe, to construct the map projection. Cartographers refer to a map scale measured locally as an actual scale.

Figure 2.42: Scale Factor (SF) can serve as an indicator of accuracy and distortion throughout the map.

In this instance, you are not using scale ratios for actual and principal scale. Instead, you are dividing the planar map projection measurement by the geodesic measurement (Figure 2.43). Like the principal scale, the geodesic measurement is based on the scale of the generating globe. The results are similar.

Figure 2.43: Dividing the planar map projection measurement by the geodesic measurement is another way to determine the scale factor at a specific location on the map.

A scale factor of 1 means that the planar map projection distance and the spherical geodesic distance are the same. A scale factor of less than one indicates that the planar map projection distance is less than spherical geodesic distance. Therefore, the map projection is distorting distances by making them smaller. A scale factor of greater than one means that the planar map projection distance is greater than spherical geodesic distance. Thus, the map projection is distorting distances by making them larger. Knowing the range of the scale factor throughout the map is a good indicator of error and uncertainty related to size and distance.
On your Microsoft Word document, record the answer to the following question as it applies to the World from Space projection:

  1. What does the scale factor indicate in terms of distortion for this map projection in the region between Tokyo and Vancouver?
    Save the Excel workbook to your final folder. In later steps, you enter additional measurements and scale factors for multiple map projections.
    As you can see, the difference between the geodesic measurement and the planar measurement of the map projection are significant. Understanding how map projections influence accuracy is especially important when conducting spatial analysis.

Skill Drill: Evaluate and Measure Distortion

Repeat the steps for changing the projection of the data frame and evaluating distortion patterns for the following map projections:

  • • Cylindrical Equal Area (world)
  • • Goode Homolosine (Ocean)
  • • Mercator (world)
  • • North America Lambert Conformal Conic
  • • North Pole Azimuthal Equidistant

For consistency, change the central meridian or longitude of center to 180 for each map projection (Figure 2.44). You should measure the distance from Tokyo to Vancouver across the Pacific Ocean.

Figure 2.44: One some map projections, this setting is called the Longitude of Center, while in others, it is called the Central Meridian. The effect is the same.

Be sure to take screenshots of each map projection. You may place them all into the same Microsoft Word document. Also, you should write down the answers to the same questions for each as well:

  1. Which of the five properties appear to be preserved based on the size and shape of the indicatrices?
  2. Which of the five properties appear to be distorted based on the size and shape of the indicatrices?
  3. Where on the map does there appear to be minimal distortion?
  4. Where on the map does there appear to be the most distortion?
  5. What does the scale factor indicate in terms of distortion for this map projection in the region between Tokyo and Vancouver?
    Additionally, you should record each distance measurement from Tokyo to Vancouver on your Excel table (Figure 2.45).
Figure 2.45: This table records the differences in Kilometers between the three-dimensional geodesic measurement and the two-dimensional planar measurements of map projections.

Be sure to save both your Microsoft Word document and your Excel workbook when done. Be prepared to discuss your answers to the questions and your measurements at a later time.

Troubleshooting Datum Shift

Now that you have explored how different projections distort the geometric characteristics of features on a map, you will now investigate how the ArcGIS software handles multiple datasets with distinct spatial reference systems. ArcMap represents geographic data visually using the data frame, the center of the three primary windows of the ArcMap user interface (Figure 2.46). As you learned previously, the data frame uses a specific display projection, which is defined in the Data Frame Properties Coordinate System tab. Earlier, you changed the display projection to determine distortion patterns of the indicatrix layer visually. Each time you changed the data frame spatial reference properties on the Coordinate System tab, the spatial reference of the feature classes in your geodatabase remained untouched. ArcMap makes this possible through a process called project-on-the-fly.

Figure 2.46: The pink rectangle delineates the data frame window in ArcMap.

When you first open a blank map document, the data frame has no spatial reference properties assigned to it. When you add your first layer to the Table of Contents, ArcMap adopts that layer’s spatial reference information and uses it for the data frame display. When you add the next layer to the Table of Contents, ArcMap checks the second layers spatial reference information. When it encounters a different spatial reference, ArcMap usually provides a warning message. If you accept the new layer, ArcMap tries to dynamically line up the two layers by performing a datum transformation on the fly.

A datum transformation is a mathematical process in which the geographic coordinates of one datum are converted into the geographic coordinates of another datum. Recall that geodetic datums are the reference ellipsoid and origin point that model Earth and form the basis for geographic coordinates such as latitude and longitude (Figure 2.47). You can’t have latitude and longitude coordinates without a datum. Additionally, each datum uses different latitude and longitude values due to their position relative to the geoid model of Earth.

Figure 2.47: The brown area represents the surface of the Earth. The dotted line represents the geoid model of Earth. The smooth grey surface represents the reference ellipsoid model of Earth. The lower section of this graph depicts the geoid-ellipsoid surfaces overlaid on top of each other.

Some datums are optimized to increase accuracy over a specific region, such as North America or Europe. Other earth-centered datums, such as WGS 1984, try to average out their fit uniformly across the globe (Figure 2.48).

Figure 2.48: In places where the geoid, shown in yellow, separate from the ellipsoid, measurements are less accurate. The blue ellipsoid is a good fit for North America but does not work as well for other regions of the world. Likewise, the purple ellipsoid works well for Europe. The orange earth-centered ellipsoid is optimal for global applications such as global navigation satellite systems.

Typically, the ArcGIS software does a decent job when transforming the latitude and longitude coordinates from one datum to another. However, there are multiple ways to perform this transformation mathematically. In some cases, the method of transformation does not always provide the best results and can introduce spatial error into your analysis.

Navigate to the Humboldt County GIS Data Download page. Under Frequently Requested Data Sets, download the Humboldt County GIS Roadway Centerline shapefile(Figure 2.49). Save the zip file to your original folder. When done, decompress the file and delete the zip.

Figure 2.49: In Chrome, you can right-click on a link to save a downloaded file to a specific location.

In ArcMap, add the roads shapefile to the map. Open the data frame properties and navigate to the coordinate system tab. Match the spatial reference of the data frame to the new road layer. You can do so by opening the Layers folder, which displays all of the spatial reference systems currently loaded into the Table of Contents (Figure 2.50). Select NAD 1927 State Plane California I FIPS 0401 from the list. When ready, click OK. The data frame now matches the spatial reference of the road layers.

Figure 2.50: The Layers folder provides a shortcut to spatial references for layers currently in the Table of Contents.

Return to the Humboldt County GIS Data Download page and download the Fire Hydrants Shapefile under Fire Plan Data (Figure 2.51). Save the file to your original folder and decompress it. When ready, add the fire hydrants shapefile to the map.

Figure 2.51: The Humboldt County website provides free GIS data related to Humboldt County.

Zoom in to the Humboldt Bay and along the waterfront just north of Downtown Eureka (Figure 2.52). You should see the location of the fire hydrants relative to the streets. Most are located alongside the street segments and near intersections.

Figure 2.52: In this image, the green dots represent the fire hydrants. The pink rectangle marks the area of interest for this step.

Next, use the Project tool to transform the fire hydrants layer from NAD 1927 State Plane California I FIPS 0401 to GCS WGS 1984. Recall that the Project tool does not alter the original data. Instead, it creates a copy of the data during the transformation process.

In the Catalog Window, click the plus sign next to Toolboxes. Expand the System Toolboxes, then Data Management Tools. Scroll down and expand Projections and Transformations and double-click the Project tool (Figure 2.53).

Figure 2.53: The Project tool is used for vector data.

For the Input Dataset or Feature Class, use the drop-down menu to select the layer representing fire hydrants. For the Output Dataset or Feature, name the feature class hydrantWGS84 and save it to your geodatabase. For the Output Coordinate System, click the button on the right. When the Spatial References Properties window opens, open the Layers folder and GCS WGS 1984 and click OK. You may leave all other default settings and click OK (Figure 2.54).

Figure 2.54: Check to make sure that your settings match the image above.

When the geoprocessing completes, you should see your hydrants feature class in your geodatabase. ArcMap may automatically add it to the map. If not, you should do so now. Zoom in close and compare the original fire hydrant layer with the new hydrant feature class. Change the colors of the point symbols for clarity if necessary (Figure 2.55). You may notice that the original layer and the new layer do not align.

Figure 2.55: The pink arrows indicate the shift in location from the original dataset, indicated by the green points, to the new dataset, indicated by the orange points, after the transformation process.

Geospatial scientists call this difference in location a datum shift. This datum shift is caused by the differences in the geodetic datums between the two datasets as well as the mathematical equations used by the GIS software when trying to perform on-the-fly transformations. In other words, ArcMap knows that the two layers have different spatial reference system properties, and it works to line them up in the data frame using project-on-the-fly.
However, the process is not perfect, and spatial errors are introduced.

In ArcMap, activate the Measure tool and change the units to meters. Measure the extent of the datum shift from a point on the original fire hydrant layer to the new one. In your Microsoft Word document, answer the following question:

• How many meters of spatial error did the datum shift introduce?
• How might such an error impact an application of geospatial analysis, such as for city planning?

Take a moment to consider the implications. Imagine if you didn’t have two copies of the same data set to compare. For example, suppose you downloaded the street layer from the Humboldt County website and obtained the fire WGS 84 hydrant layer from a different source, such as from a friend or coworker. How would you notice the spatial error introduced by the datum shift? Most readers would likely be unaware of the spatial error. A potential datum shift is why it is essential to use a consistent spatial reference system for every dataset when conducting spatial analysis. The best way to avoid spatial errors when conducting an analysis is to make sure that every layer in the Table of Contents has the same spatial reference properties as the data frame.

Repairing Corrupted Data Using the Define Projection Tool

As you learned previously, GIS data is often composed of multiple files working together. For example, a shapefile might appear as a single file in ArcMap. When one views the same shapefile using Microsoft File Explorer, one can see that many files are present (Figure 2.56).

Figure 2.56: This image shows the populated places shapefile as seen in Microsoft Windows Explorer.

Once in a while, these component files get deleted or corrupted for various reasons, and you may encounter a shapefile that is missing the spatial reference information. To correct this issue, you must first understand how a shapefile stores spatial reference information. The file that ends in the .shp extension stores the feature geometry, such as nodes and arcs. As you learned previously, a node is a single XY coordinate pair, such as latitude and longitude, that represent a point feature. An arc is a linear feature made up of nodes, vertices, and line segments. In an arc, the nodes refer to the beginning and ending points of a line feature. Vertices refer to any intermediate points in between the start and endpoints (Figure 2.57).

Figure 2.57: In this image, the black points represent nodes. The green points represent vertices. The blue line segments represent arcs. This type of feature geometry is stored in the file with the .shp extension.

Though the .shp file stores the feature geometry, it does not specify any other spatial reference system information such as which geodetic datum or map projection is used. As you learned earlier, each datum uses slightly different geographic coordinates. Even though ArcMap may have a shapefile’s latitude and longitude coordinates, without knowing the correct datum to use, ArcMap cannot place the features on the map. For shapefiles, the spatial reference information, including map projection and datum, is stored in the file that ends with .prj (Figure 2.58).

Figure 2.58: The .prj file stores the spatial reference information, including the datum.

In Microsoft Windows File Explorer, open the original folder. Right-click on the populated places .prj file and select Open with (Figure 2.59).

Figure 2.59: Right-clicking on the .prj file opens the contextual menu in Windows.

When the dialog box opens, choose Notepad from the list of applications (Figure 2.60).

Figure 2.60: If you do not see the Notepad application on the list, click on the More apps link to expand the list of available applications.

Take a few minutes to examine the contents of the .prj file. As you can see, the .prj file contains only text. In this instance, it starts with the geographic coordinate system, followed by the datum information. After that, the prime meridian gets defined. Lastly, the units used for the XY data are provided (Figure 2.61).

Figure 2.61: PRJ files contain only text describing the spatial reference information.

The ArcGIS software reads this textual information to understand how to use the geographic coordinates stored in the .shp file. Without this information, ArcMap cannot correctly place the features on the map. In the next few steps, you will intentionally corrupt the shapefile by deleting the .prj file. Close the Notepad application and open the original folder in Microsoft Windows File Explorer. Right-click on the populated places .prj file and select Delete (Figure 2.62).

Figure 2.62: Right-clicking on the .prj file opens the contextual menu in Windows.

In ArcMap, expand the original folder in the Catalog Tree. Drag and drop the populated places shapefile into the data frame. You should see a warning message appear regarding an unknown spatial reference (Figure 2.63). Take a moment to read through the error message. When done, click OK.

Figure 2.63: This error message warns you that the spatial reference information is missing from the data source.

Currently, you should have the populated places feature class that was from your World Data geodatabase already loaded on the map. Zoom to the west coast of the United States to get a better view of some of the cities in this feature class, such as San Francisco and Los Angeles. What you will not see is the populated places shapefile correctly place on the map, even though the layer is visible in the Table of Contents (Figure 2.64).

Figure 2.64: Normally, the two layers should overlap perfectly. However, ArcMap does not know how to use the geographic coordinates in the shapefile due to the missing spatial reference information.

When zoomed out, the undefined layer appears as a single dot. However, all of the point features are still present. In the Table of Contents, right-click on the populated places shapefile that has the unknown spatial reference. Choose, Zoom to Layer. As you can see, all of the point features are drawn correctly relative to each other. It is the size and location that is incorrect due to the missing spatial reference information (Figure 2.65).

Figure 2.65: Without spatial reference information, ArcMap can draw the features of the shapefile, but cannot project them correctly.

To correct this problem, you must replace the missing .prj file. In the Catalog Window, click the plus sign next to Toolboxes. Expand the System Toolboxes, then Data Management Tools. Scroll down and expand Projections and Transformations and double-click the Define Projection tool (Figure 2.66).

Figure 2.66: The Define Projection tool is used for creating new .prj files.

In ArcMap, choose the populated places shapefile with the unknown coordinate system as the input. For the Coordinate System, click the button on the right. In the Spatial References Properties window, open the Layers folder and select GCS WGS 1984. When ready, click OK, then click OK again to run the tool (Figure 2.67).

Figure 2.67: Be sure that your settings match the image shown here.

When geoprocessing is complete, zoom back to the west coast of the United States. The two populated places layers should now align (Figure 2.68). In Microsoft Windows Explorer, you should see the .prj file replaced.

Figure 2.68: The two populated places shapefile and geodatabase feature class should now align.

Skill Drill: Repairing Incorrect Coordinate System Definitions

Though it may have a similar name, the Define Projection tool and the Project tool work very differently. The Project tool does not alter the original input data. Instead, it makes a copy of the data. Most of the geoprocessing affects the geometry stored in the new .shp file. The Define Projection tool does not create an output dataset. It also does not alter the geometry stored in the .shp file. The Define Projection tool modifies the original input data by overwriting the .prj file. If the .prj file is missing, it creates a new one. You should only use the Define Projection tool when you have a dataset that has an unknown spatial reference or an incorrect coordinate system defined.

Confusing these two tools is a common mistake that many readers often make. Mixing them up will corrupt your data. For example, suppose you wanted your populated places shapefile to use the same spatial reference as the streets and fire hydrant layers. Your intentions are good because you know that having layers with different spatial reference properties can introduce spatial errors, such as a datum shift. In this instance, you want all of your layers to be in the State Plane Coordinate (SPC) system used by the streets and fire hydrants. The correct procedure would be to create a new shapefile with the desired spatial reference properties using the Project tool. However, like many others before, you choose to use the Define Projection tool instead.

To demonstrate this problem, run the Define Projection tool on the populated places shapefile that you corrected earlier. This time, use the other spatial reference listed in the Layers folder that starts with NAD 1927 State Plane. You may notice a warning icon in the upper right (Figure 2.69). Click the yellow exclamation to read the warning. Then, close the warning and click OK to run the tool.

Figure 2.69: ArcMap tries to warn you when a dataset already has a spatial reference defined.

In your Microsoft Word document, write down the answer to the following questions:

  • • What happened to the location of the data layer on the map?
  • • Why does the data not align with the layer from the geodatabase feature class?
    • What kind of spatial error is this?

Open the .prj file with Notepad and view the contents (Figure 2.70). As you can see, the textual information stored within has changed. The information now references a different datum, NAD 1927. It also includes much more information because the State Plane Coordinate (SPC) system contains more complexity than a geographic coordinate system.

Figure 2.70: PRJ files contain only text describing the spatial reference information.

ArcMap reads the text in this file and assumes that the geographic coordinates stored in the .shp file come from the North American Datum of 1927 (NAD 1927). Recall that the Define Projection tool does not alter the .shp file. The geographic coordinates come from a different datum, WGS 1984. The result is a shapefile with an incorrectly defined spatial reference. To correct this error, rerun the Define Projection tool. Overwrite the incorrect .prj file with one that uses GCS WGS 1984 as the coordinate system (Figure 2.67).

When done, you can save your map document and close ArcMap. Take a moment to save your Microsoft Word Document and your Excel workbook. Be prepared to discuss your results at a later time. Back up your project folder to a safe location like Google Drive.