Terrain Analysis of GPS Tracks

Every April for the past 15 years I have directed a trail race series in White Clay Creek State Park known as the Triple Crown.  The event is sponsored by the mighty Trail Dawgs with a post-race BBQ put on by the sweet church ladies from Head of Christiana Presbyterian Church.  Runners actually pay us good money to run in a public park where they can run for free any day!  All the money we raise goes to support four local homeless shelter programs.

The feature race is the half-marathon.  Since the trails in WCCSP change over time, I recently recorded new GPS tracks for the entire race course. 

In this lab you will process the raw GPS data into a line layer mapping the entire course, interpolate a single 3D line feature representing the entire course from a 10-meter resolution DEM, and create an elevation profile diagram of the course.

The first map below shows the actual course layout along with a schematic map that we distribute to runners on small laminated cards.  (Of course some people still take wrong turns and get lost.  But nobody has died yet.)

The outbound trails to the top of Possum Hill are marked in red; the return trails to the Carpenter Recreation Area pavilion are marked in blue.  This is the traditional course, with four loops run counter-clockwise, connected by three trail segments run both ways.  (I have been alternating directions on the east and west loops in recent years to keep the course interesting for people who run this every year.)

This isn't a particularly technical trail race, but it's a lot tougher than a road half-marathon.  Runners ford White Clay Creek at miles 3 and 10, and there are four significant hills on the course.

The hillshaded DEM of the course terrain shows where these occur: the climb up Possum Hill at the end of the outbound section; David English and Great Good Place hills east of the creek on the return, and the final hill climb from Hopkins Bridge Rd. in the Carpenter Rec. Area.

The left image below shows the course superimposed on the 2007 digital orthophoto layer from the Delaware DataMil.  The right image shows a georeferenced scan of DNREC's map of WCCSP with the half-marathon course overlaid. 

And here's a graph of the terrain elevation and slope profiles created from a 3D line feature representing the course:

Download the raw GPS tracks and the 10-meter resolution DEM of the area,  Unzip and add the GPS tracks to a blank ArcMap session.

Part one:  Edit the GPS track features to create a complete, connected set of line features covering the entire half-marathon course.  First, merge all the track layers into a single new layer.  Then use the Editor to split track segments at appropriate junction points and snap the end nodes of segments to obtain a connected set of features.  Symbolize the segments with arrows at the ends, and flip any line segments that have the wrong direction.

You will have to draw in the stream crossing (I didn't feel like getting my feet wet!)  You will also need to create copies of the three connector segments, shift the duplicates slightly away from the originals, and flip their directions, so that you have three outbound and three return connectors.  Here's a detail showing the pair of connector segments at the creek crossing:

Once you get all the segments connected correctly, calculate their lengths in miles.  The lengths should sum to just over 13 miles. 

Part two:  Once you get a layer of connected trail segments, Dissolve them all to create a new layer with a single long feature.  Do not let the Dissolve tool create multi-part features.  If the output layer has more than one feature, snap them together with the Editor.  This will ensure you have a truly continuous course feature.  Check that it has the same length at the sum of the segments it was dissolved from. 

Now use the 3D Analyst Interpolate Shape tool with the DEM to create a 3D line feature representing the entire course.  Use Calculate Geometry to calculate the 3D length of the course.  This should be slightly longer than the 2D length, since it accounts for elevation changes.  (I measured an older version of the course years ago with a GPS and with a measuring wheel.  The wheel measure was about five percent longer.)

Finally, select the 3D feature and create an elevation profile of it. 

Part three:   Arc's 3D Analyst just creates simple profile graphs.  To perform fancier analyses, use the Feature Class Z to ASCII tool to export all the X,Y,Z coordinates of the 3D feature to ASCII format.  Then import these to Excel and calculate derivative profiles such as local slope, or moving-average slope and roughness (standard deviation of Z).  I created the example shown above with Excel, using gradient colors for the slope profile to distinguish climbs (red) and descents (bluel).

I am thinking about a research project, perhaps in cooperation with UD's Human Performance Lab, to track runners' pulses as they run next year's race.  Some of our runners already own integrated GPS sport watch/heart monitor systems, such as the Garmin Forerunner 405, which cost about $200.  It would be interesting to analyze recorded pulse records against race pace, cumulative distance, slope and terrain roughness, as well as runner age and gender.

Part four:  The Triple Crown also includes a 10K starting at 10AM and a 5K race starting at 11:15AM.  The "Triple Crown" means running all three races in succession.  The 10K is run on the western half of the half-marathon course, in the reverse (clockwise) direction.  It does not cross the creek.  The 5K uses the first 1.3 miles of the half-marathon course, then cuts west parallel to Thompson Station Rd. to the Arc Corner Monument, and finishes on the final 1.3 miles of the half-marathon course.  It is run entirely within the Carpenter Rec. Area section of WCCSP.

Here are the schematics for each:

Perform equivalent terrain analyses for the 10K and 5K races.  Edit the GPS tracks to create sequences of correctly oriented and snapped segments.  Then Dissolve the sequenced segments to create a single line feature for each course.

Interpolate 3D line features using the DEM.  Calculate the 2D and 3D distances of these courses; they should be close to 10,000 and 5,000 meters respectively.  Finally, create elevation profiles of the two courses.