Amherst College I.T. I.T. home. Amherst College.
I.T. home.
IT > Software > Geographic Information Systems > Mapping Coordinate Data

Geographic Information Systems

Mapping Coordinate Data

Previous: Mapping Place-Name Data

Following: Mapping Raster Data


Geographic data is commonly described by pairs of X-Y coordinates on the surface of the Earth, such as longitude and latitude. This is the type of spatial information that underlies the shapefiles used in the previous two sections, but it may also show up in simple tables. GPS receivers also describe your location using X-Y coordinates.

Topics

Procedures

  1. Locating an X-Y Coordinate Position

  2. Determining the Spatial Reference of a Layer

  3. Changing the Spatial Reference of a Map (Data Frame)

  4. Transforming the Datum of a Layer

  5. Defining the Spatial Reference of a Layer

  6. Changing the Map Display Units

  7. Measuring Distances and Areas

  8. Displaying a Coordinate Grid on a Layout

  9. Mapping Tabular Coordinate Data

  10. Extracting Data From Web Pages


Getting Started

Since this tutorial will be using specific maps and data, the first step is to make your own copy of the tutorial data.

Set Up: Getting the Tutorial Data

  1. In the Windows Explorer, navigate to the network drive  K: (aka \\Software\Winsoft), open the folder  Maps, and then open the folder  Introduction to GIS.
  2. Drag the folder  MappingCoordinates and its contents to either:
    1. your network drive  U:, e.g. into the folder  My Documents; or
    2. the local hard drive  C:, e.g. onto your Desktop.

    The folder MappingCoordinates contains the following data layers:

     countries.shp  MassachusettsLighthouses.csv  masscounties.shp  states.shp

Set Up: Initializing ArcMap and Adding Data

  1. Start up the  ArcMap software (see Constructing and Sharing Maps for details).
  2. Click on the button Add Data Icon Add Data.
  3. In the dialog Add Data, navigate into the folder  MappingCoordinates; if necessary, make a new connection to it (see Constructing and Sharing Maps for details).
  4. In the folder  MappingCoordinates, click on the file  countries.shp.
  5. Click on the button Add.

ArcMap will now display a map of the countries of the world:

Move the cursor across the map, and notice the two changing numbers in the lower right corner of the window (here 95°20'"W 57°49'52.523"S). This pair of X-Y coordinates are the longitude and latitude of the tip of the cursor, to be described next.


Geographic Coordinate Systems

Geographic coordinate systems, describing positions on the surface of the Earth in latitude and longitude, are the most common representation of spatial data.


The Spherical Earth

Since the time of the Ancient Greeks it has been known that the Earth was a spherical object rather than a flat surface.

Though it was suggested millennia ago that the Earth rotates once a day, this fact was not widely accepted until the 17th century, and was not firmly established until the 19th century.

The Earth’s rotation defines certain reference points and circles that we can use to determine our position on its surface.

The Earth’s rotation axis is a line that passes through the the North Pole, the South Pole, and the center of the Earth.

The Equator is a circle on the Earth’s surface that’s perpendicular to its axis and equidistant from its poles:


Geographic Directions

The reference points described above establish the four Cardinal Directions.

The direction toward the North Pole is North, and South is in the opposite direction, toward the South Pole.

The direction parallel to the Equator and toward the Earth’s rotation is East, while the direction opposite to the Earth’s rotation is West.

By definition, North and South will always be at right angles to East and West, at any point on the surface of the Earth.

In addition, the direction toward or away from the Earth’s Center are, of course, down and up, respectively.


Geographic Coordinates

It is useful and important to be able to precisely specify positions on the Earth’s surface: to compare positions, calculate distances, and in general navigate from one point to another.

So, a pair of numbers or geographic coordinates are used that are similar to the x and y Cartesian coordinates in a plane, but designed for a sphere.

These two numbers, latitude and longitude, are angles measuring south-to-north and west-to-east, respectively.


LatitudeLatitude

Any circle parallel to the Equator is called a parallel of latitude.

The angle (with vertex at the center of the Earth) between a given parallel of latitude and the Equator describes that parallel and any point on it, and is called the latitude.

So, the North Pole is at 90° north latitude, the Equator itself is 0° latitude, and the South Pole is 90° south latitude.

Amherst is located at 42.37° north latitude.

Southern latitudes are often expressed as negative values, particularly in computer applications such as GIS.

One degree of latitude corresponds to a distance of 111 Km (69 miles) across the Earth’s surface.


LongitudeLongitude

Any semicircle passing through the poles is called a meridian of longitude.

One of these is designated as the Prime Meridian, usually the one passing through the Royal Observatory in Greenwich, England (just outside London).

The angle (with vertex at the center of the Earth) along the Equator between a given meridian and the Prime Meridian describes that meridian and any point on it.

So Amherst is located at 72.52° west longitude.

Western longitudes are often expressed as negative values, particularly in computer applications such as GIS.

Note that the antimeridian can be described by either 180° west longitude or 180° east longitude.

One degree of longitude at the Equator also corresponds to 111 Km; but this gets progressively smaller as one moves towards the poles, eventually shrinking to zero (varying as the cosine of latitude).


Minutes and Seconds of Arc

Because a degree of latitude or longitude is relatively large, a common practice is to break them down into smaller units.

A minute of arc is defined to be 1/60 of a degree, often abbreviated as a single prime (').

A minute of arc corresponds to 1.86 Km = 1.15 miles (called a "nautical mile").

A second of arc is defined to be 1/60 of a minute of arc, often abbreviated as a double prime ('').

A second of arc corresponds to 31.0 m = 101 feet.

Experiment: Moving your cursor across the map of the world’s countries, determine the approximate location of Amherst, Massachusetts, USA.

The location of Amherst Center is, in fact, very accurately known.

Procedure 1: Locating an X-Y Coordinate Position

  1. In ArcMap Icon ArcMap, in the main toolbar Tools, click on the button Go to X-Y Coordinate Position Go to XY (it’s also in the menu Edit).
  2. The dialog Go TO XY (Degrees Minutes Seconds) will open; move it to a convenient location that doesn’t obscure the map.
  3. In the fields Long: and Lat:, type in the coordinates of Amherst in Degrees-Minutes-Seconds (DMS) format, but without punctuation:
    • 72 31 11 W or -72 31 11
    • 42 22 31 N or 42 22 31
  4. Click on one of the available tools:
    • Tool for Panning Pan to Center the position but don’t change the zoom level.
    • Tool for Zooming In to a Region Zoom to Center the position and zoom in somewhat.
    • Tool for Panning Flash Indicate the position but don’t change the map center or the zoom level.
    • Tool for Panning Add Point Add a point marker at that location (note: this is only a graphic, not actual point data).
    • Tool for Panning Add Callout Add a "balloon" marker displaying the coordinates.
  5. Other coordinate formats such as Decimal Degrees (e.g. -72.5197°, 42.3753° for Amherst) are available by clicking on the menu Tool for Panning Units.

The Imperfect Earth

In the seventeenth century, Isaac Newton suggested that, because the Earth is rotating and not perfectly rigid, it will bulge slightly at its equator.

So, the Earth is not precisely spherical, but instead is an oblate ellipsoid, like a squashed beach ball.

Precise measurements put the equatorial and polar diameters of the Earth at 12,756 Km and 12,713 Km, respectively, a difference of only 43 Km (0.34%).

This small oblateness can still effect the positioning of maps, so it must be taken into account.

In addition, the Earth has substantial variations in the elevation of its surface from point to point:

  • The peak of Mt. Everest is 9 Km above sea level.
  • The deepest point of the Marianna Trench is 11 Km below sea level.

(4)

Because gravity depends on the mass of the Earth, there are small variations in gravitational force across its surface, which are reflected by local sea level (because fluids will move in response). The geoid is an equal-gravity surface that includes local sea level but also continues into continental areas, as shown in the image above. The GOCE satellite has provided detailed measurements of the geoid, whose variations are displayed in exaggerated form in this mp4 movie:

A three-dimensional model of the Earth, displaying areas of low gravity as depressions on its surface and areas of high gravity as bumps


Datums

A map of the United States showing contours of the amount the datum shifted between NAD27 and NAD83, 0-20 meters in the central part of the country but reaching 40 meters in the east and 100 meters in the west.Because the Earth’s surface is so rough, fitting it in the best way with an ellipsoid depends on where you want to map it!

A datum is a choice of ellipsoid to model the Earth’s surface, viz. the location of its center, its size, and its orientation.

Many datums have been defined; U.S. maps commonly use the North American Datum of 1927 (NAD27), and more recently, NAD83.

With the expansion of international travel and commerce, worldwide standards have been adopted, such as the World Geodetic System of 1984 (WGS84), which is based on the geoid.

Note that this means that a measurement of latitude and longitude will depend on which datum you use!

The map at the right comparing NAD27 and NAD83 demonstrates how much measured positions can shift when switching between datums.

You should therefore always ascertain the datum when you’ve been given geographic data (e.g. NAD83 for Amherst, above).

The datum is the foundation of a geographic data set’s spatial reference; let’s look at an example: 

Layer Properties Dialog, Source PageProcedure 2: Determining the Spatial Reference of a Layer

  1. In ArcMap Icon ArcMap, in the Table of Contents, double-click on the layer of interest, e.g.  countries.
  2. In the dialog Layer Properties, click on the tab Source.
  3. Read the text field Data Source. You should see both the datum listed as well as the geographic coordinate system.

Projections

To view the Earth on a flat piece of paper or a computer screen, its curved surface must be projected.


Flattening the Earth

Once a datum has been chosen as a model of the Earth, it is straightforward to reproduce its features on a globe.

For many purposes it’s much more useful to represent the Earth on a flat surface, such as paper or a computer screen.

Such a flattened representation of the Earth is called a map.

The flattening process is known as a projection.

Map projections are similar to other projections you may be familiar with, such as projecting a slide or transparency onto a screen.

There are three common, general ways to "flatten" the Earth: Planar, Conic, and Cylindrical:

  • Planar Projection: hold a plane surface up to the Earth, and project outward in some way, as shown below left.

    Planar ProjectionGeneral Perspective Projection, as seen with Google EarthThis type of projection is commonly used to represent the Earth as a globe.

    This includes one common variant, the Vertical Perspective Projection shown at the right, which is used by Google Earth to provide a "birds-eye view" of the Earth.

    Question: What’s missing in the vertical perspective, in comparison to the orthographic projection at left? This could also be described as "something" that’s present but limiting the view.
     
  • Conic Projection: wrap a cone around the Earth:

       Earth Wrapped in Cone (1)

    then cut it along one side and flatten it:

       Conic Projection (1)
  • Cylindrical Projection: wrap a cylinder around the Earth:

      Earth Wrapped in Cylinder (1)

    and again cut it along one side and flatten it:

      Cylindrical Projection (1)

There are also many other, more complicated, projections that are used for certain purposes.

Projection surfaces can be tangent to the Earth’s surface (touching it along one standard point or standard curve), as in all of the images above, or secant to it (intersecting at one or two standard curves), as in the following images:

A large number of different projections are described in the University of Colorado’s Map Projection Overview and displayed with Penn State’s Interactive Album of Map Projections.


Mercator ProjectionLimitations of Projections

For each of these surfaces, there are a number of different ways to project the Earth’s features onto them.

Any projection will necessarily distort some aspect of geography:

  • distance: all projections distort distance in some way.
  • shape: some projections can preserve angles and therefore small shapes, and are said to be conformal.
  • area: some projections can preserve relative area, and are called equal-area.

Warning: No projection can be both conformal and equal-area.

The Mercator projection (right) is a famous example of a conformal map, in this case a coaxial cylindrical projection that makes navigation easier by preserving directions, but severely distorts area near the poles. Because it also maintains shapes over small regions, it is used by Google Maps.

The Gall-Peters projection (below left) is an example of an equal-area map, also coaxial cylindrical, sometimes used to avoid the exaggerated area of the global north seen in the Mercator projection, but at the expense of shape accuracy away from 45° latitude.

The Plate Carrée projection (below right) is a specific case of the equirectangular projection, again a coaxial cylindrical projection that preserves (longitude, latitude) by simply mapping it to (x, y); however, it is neither conformal nor equal-area (though it is equidistant north-south and approximately along the equator).

Gall–Peters Projection Plate Carrée Projection

Question: When bringing in data defined only in terms of geographic coordinates, ArcMap uses a default projection. Can you tell what it is?


Choosing a Projection

Any distortion introduced by a projection will be smallest near the standard points or curves where the projection surface touches the Earth’s surface.

Non-global maps will therefore generally use a projection that minimizes distortion in the region of interest.

Regions that are elongated east-west are commonly represented by coaxial conic projections (touching along parallels).

Regions that are elongated north-south are commonly represented by transverse cylindrical projections (touching along meridians).

Regions that are not elongated one way or the other may be represented by concentric planar projections.

(4)

Lambert Conformal Conic ProjectionIf the map will cover a relatively wide area, secant projections are generally used, as in the image above, since they even out the distortion around the multiple standard curves.

Once the map orientation is determined, one must choose between other characteristics such as whether it should be conformal or equal area.

For example, here are two different coaxial conic projections:

  • Lambert Conformal Conic (right (1))
  • Albers Equal-Area Conic (below, standard parallel = 45°)

Albers Equal-Area Conic

The Transverse Mercator projection (below) is a common example of a conformal transverse cylindrical projection, in this case designed for use around the prime meridian or the antimeridian.

Transverse Mercator Projection

(What’s that on the left side?)

Question: In this gallery of projections centered on Latin America, which do you think is the best choice?

It can be very important to make a good choice of projection; consider this discussion in a fictional White House.


Displaying Different Projections

GIS makes it easy to display your data with different projections.


The Data Frame

The spatial reference of the map displayed by ArcMap is determined by the data frame, which is indicated by the stack-of-layers icon and the default name Layers(click-pause-click on the name to change it).

All layers in a data frame will be projected in the same way; essentially, it’s "the map".

A data frame’s spatial reference is initially determined by the first layer added to it; in the Setup this was the layer countries.shp.

Procedure 3: Changing the Spatial Reference of a Map (Data Frame)

  1. In ArcMap Icon ArcMap, in the Table of Contents, double-click on the data frame of interest, e.g.  Layers.
  2. In the dialog Data Frame Properties, click on the tab Coordinate System.
  3. In the upper pane you’ll find a large collection of possible datums and projections. Navigate through the various possibilities by clicking on the + and – before their names to open and close them:
    1.  Geographic Coordinate Systems lists various datums, all of which are displayed with the default projection.
    2.  Projected Coordinate Systems provides a large collection of projections based on different datums.
  4. Choose one, for example  Projected Coordinate Systems >  World >  Robinson (world).
     
    Note that the selected spatial reference is shown in detail in the section Current Coordinate System:.
  5. Click the button Apply to see the effect on the map.
  6. When you are finished, click the button OK.

Experiment: A number of additional projections are available to display the entire world in what are sometimes more usable formats, e.g. including Mollweide, Eckert IV, and Polar. Try them!

Extra Absurdum: What does your favorite map projection say about you?


Projected Coordinate Systems

Once the Earth is flattened, its often easiest to use planar coordinates to describe it.


Map Coordinates

Projected CoordinatesA map projection, being flat, will often be given its own set of Cartesian map coordinates.

The origin is generally chosen to be far west and south of the region of interest.

Both coordinates (x, y) then increase towards the east and north, and are therefore always positive numbers.

(x, y) are known as the easting and northing, respectively.

The origin is typically defined by the false easting and false northing, which are the map coordinates of the standard points or curves that define the projection.

Map coordinates are generally measured in linear units such as feet or meters.


State Plane Coordinates

State Plane Coordinates are defined by each individual state to provide a highly accurate (< 0.01%) system of mapping for surveying, etc.

Most data coming from government institutions at the scale of a state or less will be in state plane coordinates.

Current State Plane Coordinates are based on the NAD83 datum and two conformal secant projections, Lambert Conic or Transverse Mercator, and use units of meters.

(4)

The low distortion requires state plane maps to be no more than 158 mi across, so most states use more than one projection to cover their area, breaking at county boundaries.

Massachusetts State Plane Coordinates are based on two Lambert Conic projections, one for the Mainland Zone (most of the state) and the other for the Island Zone (Dukes and Nantucket Counties — the Elizabeth Islands and Martha’s Vineyard, and Nantucket Island):

Massuchetts Counties and Towns (2)


Universal Transverse Mercator Coordinates

The Universal Transverse Mercator system provides a uniform way to describe any non-polar location on the Earth with good accuracy (< 0.08%).

Most maps coming from the US Geological Survey will be in UTM.

The Earth is divided into sixty narrow north-south strips, each six degrees of longitude wide and extending from 80° S. Latitude to 84° N. Latitude:

UTM Zones

The zones are numbered from west to east, starting with 1 from 180° W. Longitude, and are individually mapped with a transverse mercator projection centered on the zone.

The central meridian of each zone is assigned a false easting of 500,000 meters, and the Equator is assigned a false northing of zero meters in the northern hemisphere, and 10,000,000 meters in the southern hemisphere.

Massachusetts is covered by Zones 18N and 19N (3).

As a world-oriented coordinate system, UTM is usually used with the WGS84 datum (though not always).

UTM is also the basis of the new U.S. National Grid system being used by the Department of Homeland Security.

Exercise: Setting the Map’s Spatial Reference to UTM

Let’s change the world map’s spatial reference to UTM 14N/WGS 84:

  1. Open the data frame properties to the tab Coordinate System as described in Procedure 3.
  2. Navigate to the coordinate system  WGS 1984 UTM Zone14N; make sure you select the version whose linear unit is meters.
  3. Click the button OK.
  4.  


Working With Spatial References

GIS lets you combine maps with different datums/projections/coordinate systems, and display them with any other one you prefer.


Mapped Data and GIS

To accurately represent mapped data on a computer screen, and to ensure that it can successfully be used with other data, it must have a spatial reference defined for it, which includes a datum, possibly a projection, and a coordinate system.

The spatial reference determines how the map’s positions should be interpreted for display on the screen.

The spatial reference is described in a standard format that is provided with the data in a file with the extension .prj, and is said to be a part of its metadata (data about data).

Sometimes the .prj file will be missing, and the spatial reference must be manually assigned.


Combining Data with Different Spatial References

In order to simultaneously display two or more sets of GIS data with different spatial references, some of them must be recast to a common spatial reference.

Because each spatial reference is based on a particular datum and possibly also a projection, switching spatial references can involve a complicated mathematical process:

Switching datums is generally more complicated than simply unprojecting and reprojecting, so approximations are usually made that can introduce small errors.


Combining Multiple Spatial References

ArcGIS has full support for multiple spatial references, and will automatically reproject data sets so that they are all displayed with the same reference.

However, because of the complexity of datum transformations, ArcGIS (usually) will not automatically transform one datum to another.

Instead, when data is added to a map that has a different datum, ArcGIS puts up a dialog warning of potential issues and giving you the option to pick a transformation.

The one exception is NAD 1927 to NAD 1983, for which there is an accepted standard.

Procedure 4: Transforming the Datum of a Layer

If you are adding a layer to an existing map that has a different datum, e.g. the  states layer we worked with in the previous class and the world map in UTM coordinates previously selected, you will be warned about transformation issues.

  1. In ArcMap Icon ArcMap, in the toolbar Standard, click on the button Add Data Icon Add Data.
  2. In the dialog Add Data, navigate into the folder  mappingcoordinates.
  3. Add the new layer, e.g. states.shp.
  4. Note that a transformation request appears in the dialog Geographic Coordinate Systems Warning; click on the button Transformations….
  5. In the dialog Geographic Coordinate System Transformations, click on the menu Using:; compare the various transformations, and choose one.

    The numbers in the illustrated case describe the displacement of the datum’s center (dx, dy, dz), its rotation (rx, ry, rz), and the scaling of its size (s); you can see the shift is about 1 meter or so.
  6. Click on the button OK.
  7. Back in the dialog Geographic Coordinate Systems Warning, click on the button Close, and the new layer will appear in the correct location.
  8. Zoom into the edges of one layer, e.g. states.shp, and see how well it lines up with the boundaries of the other layer, e.g. countries.shp(but be aware that the latter is not as detailed a set of data).

Defining the Spatial Reference of a Layer

If a layer’s coordinate system isn’t self-described, ArcMap assumes it is the same as that of the data frame.

Exercise: Adding a Reference-less Layer

Let’s see what happens when you add a layer that doesn’t have a spatial reference defined for it to the current map:

  1. In ArcMap Icon ArcMap, in the toolbar Standard, click on the button Add Data Icon Add Data.
  2. In the dialog Add Data, you should still be in the folder  mappingcoordinates; add the layer masscounties.shp.
  3. The dialog Unknown Spatial Reference will appear and warn you that this layer is "missing spatial reference information" and "cannot be projected". Click on the button OK.

    ArcMap will use this layer’s position data as if it were intended for the current frame’s projection.

    Question: Can you understand this positioning using what you’ve learned about projections?
  4. In order to fix this layer (the next procedure), you must first remove it from your map, by right-clicking on it in the Table of Contents, and in its contextual menu clicking on the menu item  Remove.

Procedure 5: Defining the Spatial Reference of a Layer

Quite often a layer will lack a .prj file, and you’ll need to manually assign it a coordinate system. Ideally the source will provide this information in another format (typically just a text description).

To assign or alter the coordinate system of a layer, you must use the Catalog , which is designed for the management of individual layers, in particular their metadata.

  1. To open the Catalog:
    • CatalogIn ArcMap Icon ArcMap, look for the vertical tab Catalog along the right edge of the ArcMap window and point at it, whence it should automatically pop out;
    • If the vertical tab isn’t present, look in the toolbar Standard and click on the button Catalog.

      The Catalog will appear in its own window but can be “pinned” to the right edge of the ArcMap window, which will keep it out of the way until you need it:
      1. Begin to drag the window and a set of “pinner” buttons will appear; move the cursor on top of the Winder Right Edge Pinner right-edge pinner and release.
      2. Click the button Auto Hide at the top of the window, so that it will go away automatically when you aren’t pointing at it.
  2. The Catalog displays a hierarchy of data sources, starting with your home folder, viz. the folder where the current map document is saved.

    Below the home folder is a list of your connected folders, followed by other resources such as database and GIS servers.

    Navigate to the layer of interest, e.g.  masscounties.shp. If necessary, make a new connection first by going to the toolbar Standard and clicking on the button Connect to Folder Icon Connect to Folder.
  3. In the left pane, click on the file of interest, and the right pane will display information about the layer.
  4. Note the tabs above the right pane; click on the tab Preview, and a map of the layer will appear.
  5. In the left pane, double-click on the layer to review its properties.
  6. In the dialog Shapefile Properties, click on the tab XY Coordinate System, and note that the Current coordinate system is <Unknown>.
  7. To set the layer’s spatial reference, you can select one from a number of different sources:
    • Another layer in the map: in the upper pane of the dialog, open the folder  Layers and then click on the desired spatial reference;
    • Your set of favorite coordinate systems: in the upper pane of the dialog, open the folder  Favorites and then click on the desired spatial reference;
    • Arc’s predefined collection of coordinate systems:
      1. In the upper pane of the dialog, open either  Geographic Coordinate Systems or  Projected Coordinate Systems, as appropriate.
      2. As with data frames, navigate through the collection of geographic and projected coordinate systems, and click on the correct one, e.g. NAD 1983 StatePlane Massachusetts Mainland FIPS 2001 (meters).prj.
    • Any of the above with a search term, e.g. Massachusetts, by clicking and typing in the field Type here to search, and then clicking on the button  Search;
    • Another layer not in the map:
      1. Click on the menu  Add Coordinate System and select the menu item Import….
      2. Navigate through the file hierarchy to find a layer with the desired spatial reference (often a neighbor), and click on it.
      3. Click on the button Add to return to the dialog Shapefile Properties.

    The selected coordinate system will then appear as the Current coordinate system.

  8. If you would like to save this coordinate system as a favorite, click on the button  Add to Favorites.
  9. Click on the button OK.

Feature: You can add any layer in the Catalog to the map by dragging it into the map pane; if you apply the above procedure to  masscounties.shp and then drag it into the map, the Massachusetts counties should be in their correct location.


Displaying Coordinate Information

To locate features and make measurements on a map, you can display both the geographic and projected coordinates.


Cursor Position

As noted above, the location of the cursor on the map in the current map coordinates is displayed in the lower right corner of the map window, and they will change as you move the cursor over the map.

Questions: In what units are the current coordinates? Where on the map are they near zero?

It’s sometimes useful to change the displayed units; as with the map itself, this is controlled by the data frame that holds your layers.

Procedure 6: Changing the Map Display Units

  1. In ArcMap Icon ArcMap , double-click on  Layers .
  2. The dialog Data Frame Properties will now appear. Click on the tab General.
  3. In the area Units , in the menu Display , choose a unit, e.g. Kilometers.
  4. Click on the button OK .

Note that the displayed units will always be referenced to the origin of the coordinate system.


Distances and Areas

ArcGIS also lets you measure the distances between locations and the areas of regions.

Procedure 7: Measuring Distances and Areas

  1. In ArcMap Icon ArcMap , in the toolbar Tools, click on tool ArcMap Icon Measure, and the dialog Measure will appear. Move it around so you can see the map pane.
  2. To measure a distance:
    1. Click on the menu  Choose Units, then point at the menu item Distance , and finally choose a unit, e.g. Kilometers.
    2. Click on the the tool Measure Line.
    3. In the map pane, click at the starting point of your measurement, then click on any intervening points, and finally double-click on the end point.

      The length of each segment will be displayed as you go, and the total length will also be displayed.
  3. To measure an area:
    1. Click on the menu  Choose Units, then point at the menu item Distance , and finally choose a unit, e.g. Hectares.
    2. Click on the the tool Measure an Area.
    3. In the map pane, click at the starting point of your measurement, then click on any intervening points, and finally double-click on the end point (this doesn’t have to be the starting point).

      The length of each segment will be displayed as you go, and the total perimeter will also be displayed, along, of course, with the area.

Warning: Remember that distances and areas are usually distorted by map projections, and can therefore have different values in different projections (often by huge amounts)!

Map distortion is also important when displaying scale bars on a layout; they will usually only be perfectly accurate along standard parallels and meridians, and are best avoided if the map covers a much larger area.


Coordinate Grids

Coordinate grids are common features on maps, helping to describe the locations of their features.

ArcMap can also superimpose a grid on the layout view of a map, corresponding to:

  • geographic coordinates, where the grid is known as a graticule, as in the picture below;
  • the map coordinates used by the current data frame; or,
  • an arbitrary set of coordinates, e.g. "A3", with which you could create an index.

Procedure 8: Displaying a Coordinate Grid on a Layout

  1. In ArcMap Icon ArcMap, in the menu View, select the item Layout View.
  2. In the Table of Contents, double-click on the frame of interest, e.g.  Layers.
  3. In the dialog Data Frame Properties:
    1. Click on the tab Grids.
    2. Click on the button New Grid….
  4. In the dialog page Grids and Graticules Wizard:
    1. In the area Which do you want to create?, click on the button Graticule: divides map by meridians and parallels (the other options are as described above).
    2. In the field Grid name, you can choose a name for the grid, to distinguish it if you create more than one.
    3. Click on the button Next >.
  5. In the dialog page Create a graticule:
    1. In the area Appearance, click on the button Graticule and labels.

      The other options don’t create a full grid but let you have, along the edges, Tick marks and labels or Labels only.
    2. In the area Intervals, type in the spacing of the graticule lines for both parallels of latitude and meridians of longitude (these are initially set to a suggested value based on the map scale).
    3. Click on the button Next >.
  6. In the dialog page Axes and labels:
    1. In the area Axes, you can choose whether to have both major and minor tick marks, and the style of lines.
    2. In the area Labeling, you can select the style of the text along the edges.
    3. Click on the button Next >.
  7. In the dialog page Create a graticule:
    1. in the area Graticule Properties, usually you will want to click on the button Store as a fixed grid that updates with changes to the data frame, at least until you’re certain about the final view of the map.

      The other option, Store as a static graphic that can be edited, won’t update automatically, but you can edit the grid with the graphics tools, e.g. to remove specific grid lines.
    2. In the area Neatline, you can choose to have an additional border outside of the labels by clicking on the button Place a border outside the grid.
    3. Click on the button Finish.
  8. Back in the dialog Data Frame Properties, click on the button OK.
  9. If you later want to change some of these properties, repeat steps (1), (2), and (3a), then click on the button Properties….

Coordinate Data File Formats

Many geographic features are described by data structures that include either geographic or projected coordinates.


Tabular Coordinate Data

Geographic data is commonly in the form of simple text tables describing points on the surface of the Earth. The tables consist of a pair of spatial coordinates (e.g. latitude and longitude) in each row, and possibly a feature label and other data. Such data is common in books and journals in all areas of research, whether archaeology or biology. This is also the simplest format of data downloaded from GPS receivers.

Tables can be in a number of different file formats but all sharing the same simple layout, as described in the document Mapping Place Name Data in the section Place Name Data and also in the section Formatting Tables for Joins. For example, a collection of Massachusetts lighthouses downloaded from the US Geological Survey can be expressed as comma-separated values (CSV):

FeatureName,Class,County,State,Latitude,Longitude,Elev_ft
Annisquam Harbor Light,Locale,Essex,MA,42.6617614,-70.6817122,0
Annisquam Lighthouse,Locale,Essex,MA,42.6620391,-70.6825456,0
Bakers Island Light,Locale,Essex,MA,42.5364846,-70.7858796,59
Boston Lighthouse,Locale,Suffolk,MA,42.3275989,-70.8897686,0
Brant Point Light,Locale,Nantucket,MA,41.2898449,-70.0902937,0
Butler Flats Lighthouse,Locale,Bristol,MA,41.6034382,-70.8944813,0
Cape Ann Light,Locale,Essex,MA,42.6367623,-70.5750424,39
Cape Ann Lighthouse,Locale,Essex,MA,42.6373178,-70.5753201,26
Cape Poge Lighthouse,Building,Dukes,MA,41.420949,-70.4508587,23
...

Like place-name data, however, if tabular data needs to be cleaned up or processed in some other way, it is often easiest to bring it into Excel to work on it.

Important: When you compile tabular coordinate data, make certain you note its spatial reference! After some searching, the source for the data above says “All coordinates in the database are in NAD 83. They were converted from NAD 27 in September 2005.”

For the following procedures, it will be useful to start with a new map.

Set Up: Mapping Tabular Coordinate Data

  1. In  ArcMap, click on the button  New Map Document.
  2. Click on the button Add Data Icon Add Data.
  3. In the dialog Add Data, navigate into the folder  MappingCoordinates.
  4. In the folder  MappingCoordinates, click on the file  masscounties.shp.
  5. Click on the button Add.
  6. Save your map document in the folder  MappingCoordinates, with a name such as Massachusetts.mxd.

This will establish the spacial reference of the map as NAD 1983 StatePlane Massachusetts Mainland FIPS 2001 (meters).

Procedure 9: Mapping Tabular Coordinate Data

  1. Review the table to make sure it meets the requirement described in the document Mapping Place Name Data in its sections Place Name Data and Formatting Tables for Joins.
  2. In  ArcMap, in the toolbar Standard, click on the button Add Data Icon Add Data.
  3. In the dialog Add Data, navigate into the folder with the table to be added, e.g.  mappingcoordinates.
  4. Double-click on the table to be added, e.g the text file MassachusettsLighthouses.csv.

    If ArcMap notices formatting errors in the document, it will at this point complain about them (hopefully in an informative way) and refuse to add the document.
  5. Dialog to Display XY DataIn the menu Tools , select the item Add XY Data….
  6. In the dialog  Add XY Data, in the menu Choose a table from the map or browse for another table:, select the added file.

    Note the adjacent button  Browse, which is an alternative to adding the data as in Steps (2) - (4); however, it won’t do any error checking.
  7. In the area Specify the fields for the X, Y and Z coordinates: , in the menus X Field: and Y Field:, choose the correct columns, e.g. Longitude and Latitude. Optionally, you can specify the Z Field:, e.g. Elev_ft.
  8. In the area Coordinate System of Input Coordinates , click on the button Edit….
  9. In the dialog Spatial Reference Properties, choose the correct spatial reference for the data as described in Procedure 5: Steps (7) and (8) (e.g. NAD 1983).
  10. Back in the dialog Add XY Data, click on the button OK .
  11. ArcMap may complain that The Table Does Not Have Object-ID Field, but you can dismiss this complaint by clicking on the button OK.
  12. Map of Massachusetts LighthousesIn Step (4), the Table of Contents switched its view to Source because the table was initially not mappable.

    Click on the bottom tab Display to see the mappable items, and you’ll see that a new layer was added here with the suffix "Events".
  13. As with geocoded data, an events layer is constructed on the fly, with its details stored in the map document. It is therefore somewhat limited in its abilities, e.g. items are not selectable.

    To save the events layer as an independent shapefile, right-click on the layer to open its contextual menu, point at the menu item Data, then in the submenu that appears click on the menu item Export Data….
  14. In the dialog Export Data, in the menu Export, choose All features .
  15. In the button set Use the same coordinate system as:, choose between retaining this layer’s source data (the default) or using the spatial reference of the data frame.
  16. Near the text field Output shapefile or feature class:
    1. Click on the button Document Open Browse;
    2. In the dialog Saving Data, navigate to an appropriate location for the new data set, e.g. the folder mappingcoordinates;
    3. Give the new layer a descriptive name, e.g. Massachusetts Lighthouses.shp;
    4. Click on the button Save.
  17. Back in the dialog Export Data, click on the button OK.
  18. The dialog ArcMap will now appear, asking if you want to add the exported layer to the map; click your preference Yes or No.

Web Page Data

The United States Geological Survey’s Geographic Name Information Service is a useful source of coordinate-based data, providing an extensive list of domestic features and their coordinates, including many historic sites that no longer exist. Another is the National Geospatial-Intelligence Agency’s Geonet Names Server, which provides a similar service for foreign names. These sites don’t provide their data in an easy-to-use, downloadable format, however, which is also true of many other web sites.

Procedure 10: Extracting Data From Web Pages

Many web pages include embedded geographic data, commonly street addresses and coordinates. Microsoft Excel can help extract this information.

  1. Go to a web site that contains geographic data, for example the USGS’ Geographic Name Information Service.
  2. Look up the information you want to map. For the GNIS, one possible procedure is:
    1. Click on the link Search Domestic Names.
    2. In the web page GNIS Feature Search, on the right side, click on the link Advanced Search.

      This is slower than a basic search but provides one important feature — choice of coordinate display, Degrees-Minutes-Seconds (DMS) versus Decimal (DEC).
    3. In the button group Coordinates Display:, choose DEC (decimal).
    4. Click on the menu State and choose one to limit the output, e.g. Massachusetts.
    5. The menu County will then be populated with a list of counties in that state, so you can pick one if you want to further limit the output.
    6. In the list Feature Class, choose one, e.g. Falls.
    7. In the text field Feature Name you can type some or all of the name of the feature(s) you are looking for; this will also search through alternative/variant names of features.
    8. Click on the button Send Query, and a table like the following will appear:
    9. USGS Geographic Names Search Result

    10. The data is initially sorted by the attribute Map, i.e. the USGS topographic map on which the feature is located; to sort by a another column, click on the header name, e.g. Feature Name.
    11. To display all of the data on a single page, click on the link View & Print all; this may take a while if there are many names.
  3. Depending on the web page, the easiest way to make your own copy of the data is to copy and paste the table directly into an Excel spreadsheet.

    Unfortunately this may not always work, in which case it’s best to save the entire page as an HTML file and then open it with Excel; its table structure will be preserved (for the most part — see step (6)).
  4. Clean up the data and headers as described in Summary: Making an Excel File Compatible with ArcGIS.
  5. Very commonly latitude and longitude will be written in Degrees-Minutes-Seconds notation. However, for ArcGIS to properly interpret them, all longitudes and latitudes must be expressed in decimal degrees, with a minus sign if they are west or south. Excel’s text functions can be used to make this conversion for you. For example:
    • In the USGS example above, if you didn’t use the Advanced Search, latitude and longitude are written in a fixed-width Degrees-Minutes-Seconds notation, e.g. 422215N and 0723058W. In such cases the following expressions can be used to separate the pieces and turn them into decimal degrees:

      = IF(RIGHT(lat, 1) = "S", -1, 1)*(LEFT(lat, 2)+ MID(lat, 3, 2)/60 + MID(lat, 5, 2)/3600)
      = IF(RIGHT(lon, 1) = "W", -1, 1)*(LEFT(lon, 3)+ MID(lon, 4, 2)/60 + MID(lon, 6, 2)/3600)
      1. Enter these formulae into two new cells in the same row as the first feature;
      2. Change the variables lat and lon into cell references by double-clicking on them and then single-clicking the appropriate cell;
      3. Select these two cells and everything below them through the last row of data, and:
        • with Mac Excel or Windows Excel 2004, menu Edit > Fill > Down , or
        • with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.

      For example, if Feature Name is in cell A1, Middlefield School will be in cell A2, its latitude and longitude would be in cells F2 and G2, respectively, and the variables lat and lon should be changed to F2 and G2.

    • Of course DMS coordinates will usually be written with punctuation, deg° min' sec" dir, e.g. 42°22'15" N and 072°30'58" W. To convert such data in Excel:
      1. Select one column of coordinates and copy it to a new column at the end of the table;
      2. Split the coordinate into four columns, one for each part of the coordinate:
        • with Mac Excel or Windows Excel 2004, menu Data > Text to Columns…, or
        • with Windows Excel 2007, menu Data >Data Tools > Text to Columns;
      3. Repeat steps (a) and (b) for the second coordinate;
      4. Remove the punctuation from all of these columns by selecting them and then:
        • with Mac Excel or Windows Excel 2004, menu Edit > Replace or
        • with Windows Excel 2007, menu Home >Editing > Find & Select ▾ > Replace…;
      5. Enter this formulae into each of two new cells in the same row as the first feature:

        = IF(OR(dir = "W", dir = "S"), -1, 1)*(deg + min/60 + sec/3600)
      6. Change the variables deg, min, sec, and dir into cell references to the latitude and longitude components by double-clicking on the former and then single-clicking the appropriate cell;
      7. Select these two cells and everything below them through the last row of data, and:
        • with Mac Excel or Windows Excel 2004, menu Edit > Fill > Down , or
        • with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.
  6. One flaw in Excel’s interpretation of HTML is when a table cell contains certain line-breaking tags such as <br> and <div>, and it introduces new rows instead of its own version of line breaks.

    For example, the data provided by the Geonet International Names Server includes both DMS as well as decimal degree data (though the latter is hidden until one clicks on the cell or loads it into Excel). All four values are stored in one cell, and when it’s imported into Excel what was one row turns into four.

    There are a few ways to fix this problem, one of which is to first edit the html file with a text editor to remove these tags. An Excel-oriented approach follows:
    1. In the first data row, in an empty cell, type = and then click on the cell containing the decimal latitude. Repeat in the next cell over for the decimal longitude.

      For example, if a Geonet file has its feature name in cell A2, but its decimal latitude and longitude are in cells D4 and D5, then cells F2 and G2 would contain the text =D4 and =D5 (but displayed as evaluated in the image below):

    2. To apply these formulae to rest of the data, select these two new cells and everything below them through the last row of data, and:
      • with Mac Excel or Windows Excel 2004, menu Edit > Fill > Down , or
      • with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.
    3. Copy these two columns and replace their formulae with the actual values by:
      • with Mac Excel or Windows Excel 2004, menu Edit > Paste Special…, and in the dialog Paste Special click on the button Values and then the button OK.
      • with Windows Excel 2007, menu Home >Clipboard > Paste ▾ >Paste Values.
    4. Select every data row in the table, including the header, and remove any merging of the cells:
      • with Mac Excel or Windows Excel 2004, menu Format > Cells…, or
      • with Windows Excel 2007, menu Home >Cells > Format ▾ > Format Cells…;

      Then in the dialog Format Cells, click on the tab Alignment, uncheck the boxes Merge Cells and Wrap Text, and click on the button OK.

    5. Then sort by the latitude:
      • with Mac Excel or Windows Excel 2004, menu Data > Sort…, or
      • with Windows Excel 2007, menu Home >Editing > Sort & Filter ▾ > Custom Sort…;

      Then in the dialog Sort, make sure the item My data has headers is selected, and in the menu Sort by, choose the latitude column, e.g. (Column F), and click on the button OK.

    6. All of the feature names should now be together in a group that starts with the correct decimal latitudes, probably in the middle somewhere, and you can delete the other rows (they will be grouped by either the DMS latitude, DMS longitude, or decimal longitude, which are extraneous values for the sort column).

Other Data Formats

You will sometimes find other data formats on the Internet, such as Keyhole Markup Language (KML) files and GPX files, which are also often produced by iPhone and Android apps.

You might also come across KMZ files, which are KML files compressed in the ZIP format —  change their file extension from .kmz to .zip and you can open them and see their contents.

KML and GPX are both text formats, but rather than being tables they are structured in a hierarchical format called eXtensible Markup Language (XML).

For example, the CSV formatted file above, with NAD83 coordinates:

FeatureName,Class,County,State,Latitude,Longitude,Elev_ft
Annisquam Harbor Light,Locale,Essex,MA,42.6617614,-70.6817122,0
...

would be expressed in KML as:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
    <Document id="MassachusettsLighthouses">
        <name>MassachusettsLighthouses</name>
        <Folder id="FeatureLayer0">
            <name>MassachusettsLighthouses</name>
            <Placemark id="ID_00000">
                <name>Annisquam Harbor Light</name>
                <description><![CDATA[...Locale...Essex...MA...]]></description>
                <styleUrl>#IconStyle00</styleUrl>
                <Point>
                    <altitudeMode>absolute</altitudeMode>
                    <coordinates>-70.68171268410313,42.66177014248084,0</coordinates>
                </Point>
            </Placemark>
            ....
        </Folder>
    </Document>
</kml>

KML expects coordinates to be WGS84, hence there are slight differences from the values in the CSV data.

Recent versions of ArcGIS can add KML/KMZ files directly to your map the same as SHP files. To export, you can use the toolbox procedure described in Constructing and Sharing Maps.

Another relatively new format is Geographic JavaScript Object Notation, or GeoJSON, which is also hierarchical but (slightly) less wordy:

{
    "name":"MassachusettsLighthouses",
    "type":"FeatureCollection",
    "crs":{
        "type":"name",
        "properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS83"}
    },
    "features":[
        {
            "type":"Feature",
            "geometry": {
                "type":"Point",
                "coordinates":[-70.6817122,42.6617614,0]
            },
            "properties": {
                "FeatureName":"Annisquam Harbor Light",
                "Class":"Locale",
                "County":"Essex",
                "State":"MA",
                ...
            }
        },
        ...
    ]
}

Here the coordinate reference system used must be expressed in the crs property.

KML, GeoJSON, and many other formats can be read and written with the Data Interoperability Extension.


References

  1. Map Projection, Eric Weisstein’s World of Mathematics, Weisstein, Eric W., http://mathworld.wolfram.com/MapProjection.html.
  2. MassGIS, Office of Geographic and Environmental Information, Commonwealth of Massachusetts Executive Office of Environmental Affairs, http://www.state.ma.us/mgis/massgis.htm.
  3. The Universal Transverse Mercator (UTM) Grid, United States Geological Survey, http://erg.usgs.gov/isb/pubs/factsheets/fs07701.html.
  4. The State Plane Coordinate System of 1983, James E. Stern, National Oceanic and Atmospheric Administration, http://www.ngs.noaa.gov/PUBS_LIB/ManualNOSNGS5.pdf.
  5. Images: Visualizing Data, National Geophysical Data Center, http://www.ngdc.noaa.gov/mgg/image/images.html#relief.
  6. Map Projections, U.S. Geological Survey, http://erg.usgs.gov/isb/pubs/MapProjections/projections.html.

Previous: Mapping Place-Name Data

Mapping Coordinate Data

Following: Mapping Raster Data

Top of Page  | Using IT DocumentationIT Home  |  IT Site Map  |  Search IT