Trails App for Pitkin County/Aspen, Colorado

PitkinOutside - Desktop Mapper
The PitkinOutside browser application includes ESRI base maps, the trails and points of interest, fishing easements, and getting directions. If the website is visited on a mobile device, they are redirected to a page offering the mobile app instead.
Client:   Pitkin County

Home to the resort town of Aspen, Pitkin County in Colorado has exceptional recreation landscapes, visited by large numbers of tourists and used by many in the county itself. The county government wanted to serve these users with an application for locating trails and points of interest, and selected GreenInfo Network to build it for them. The Pitkin Outside project consists of both a desktop browser application and downloadable mobile apps for Android and iOS.

Pitkin County, Colorado is small in population, but big in landscape and recreation opportunities. With hundreds of miles of trails, famous skiing resorts, ample fishing, and other recreation spots, there's a lot to do in all seasons.  In late 2013, the County's open space department issued a proposal for development of a web-based, mobile-friendly trail finder (funded by the Etkin Family Advised Fund at the Aspen Community Foundation) and GreenInfo was selected to create this system; in early 2015, GreenInfo and the County worked on revisions the improved function and design of the applications.

This project was matched with a related effort by GreenInfo to develop a printed trails map for just the Aspen area, to support visitors to the town and its surrounding mountains - learn more about this project »

To develop the system, GreenInfo began with an extensive process of wireframing how the site would work, targeting both the desktop browser as well as a mobile application for smartphones. We also developed basic branding and design motifs, and secured the PitkinOutside.org domain.

The County hosts their trails data, as well as points of interest and fishing data, in ArcGIS Server. A primary design goal was that the county continues to develop and maintain trail status and other features in their GIS, and for these changes to be "published" to the web applications with minimal additional effort. Another primary design feature, is the distinction between summer and winter seasons: different trails are open during these two seasons, and many points of interest are also seasonal.

The desktop browser application

The browser-based application is a single web page showing the map, with activity and location selection options. An intuitive filtering interface allows users to show, for example, only dog-friendly trails, ADA-accessible points of interest, or locations which have restrooms. Visible and intuitive toggle buttons, allow the visitors to switch between topographic and satellite basemaps, and between showing summer and winter views.

Selecting a trail or a point of interest, brings up an attractive information panel (as well as visibly highlighting the feature on the map) showing amenities (restrooms, parking) and allowed trail activities (bicycling, hiking). For trails, an interactive elevation profile chart is displayed, indicating the elevation as the trail is traversed; moving the mouse over the elevation profile shows a marker on the map at that location, so one can literally follow the trail with their finger and get a feel for the steep and shallow spots.

The Trail Route Planner allows visitors to begin assembling a hike route along the trails. By selecting a trail segment, then selecting additional adjacent segments, a path can be built. As the path is built, the tool updates to show an elevation profile, the allowed activities along those paths, and total length of the route.

Map features can be downloaded in GPX format, where they may be loaded onto a GPS device.

Lastly, a printing system allows the visitor to download a PDF of the current map view and other information. Printing is context-sensitive -- information for the selected trail, planned trail route, area, or point will be included in the PDF, as well as directions if any had been brought up. This "take-away" capability is valuable for getting away from the  computer, and onto the trails.

The mobile app

The mobile app is available for both iOS (via the App Store) and Android (via Google Play and Amazon App Store).

When the app opens, the user is greeted with the search screen. A search can filter by specific activities (hiking, climbing, camping), and can center on their current GPS-detected location or else on a specific address (e.g. a hotel). The result is a listing, sorted by distance from the target location and also filterable by text keywords. Tapping a result in the listing centers the map on the location, and opens an informational slide-out panel including amenities, allowed activities, and elevation profiles much like the browser-based application.

Much of Pitkin County lacks cellular service, due to the challenging topography. The database file containing trails and points of interest is downloaded onto the device automatically, and will update automatically if a newer version is detected on the server. Searches are performed using this on-device database, and so is always available for offline use. The map imagery may also be downloaded for offline use. The end result, is fully-functional offline capability when cellular service is not available.

The application was developed using Cordova (the open-source version of Phonegap) allowing the application to be developed using HTML, CSS, and JavaScript much as the browser application. In fact, this ability to reuse significant portions of the program code, allowed the application to be designed at a fraction of the cost and a more favorable timeline, than would have been possible with truly native apps written from scratch.

Challenges and solutions

This application presented many challenges, for which solutions were often custom-designed - two major ones were:

1.  The trails and points data are managed by the county using ArcGIS Server, however the data as presented by ArcGIS are not readily usable in the web application, due to variations between summer and winter datasets, and data issues such as field values which are blank or which should be calculated from some other field. Further, it would simplify programming greatly to have one monolithic "database" rather than to manage all five datasets separately. The solution was a facility in the admin interface: one click will query all of the ArcGIS data sources, massage the data into a consistent format, and effectively publish the data to the website. The use of a single, static file in the well-known JSON format, allowed for speed and programming optimizations at almost every step of development.

During early development, the resulting database file was too large to be acceptable: 10-12 MB. This file took significant time to download into the browser, and the high resolution of the trails network caused rendering performance issues on slower PCs. The solution here came in three parts:
  • An encoding technique is used to reduce the names and attributes where possible. For example "Difficulty":"Most Difficult" is encoded as "di":4 After download into the browser these attributes are "decompressed" into their readable forms. Across the hundreds of records, this small savings added up, shaving off about 15% of the transfer volume.
  • The trail lines are simplified via the Ramer–Douglas–Peucker algorithm, trimming off extra vertices when this would not alter the trail by more than 10 feet. This is a custom RDP implementation written in PHP specifically for the job, and ultimately resulted in a 50% reduction in trail volume (8 MB down to 4 MB) with no visible change in the trail paths. Careful inspection was done, with attention to challenging locations where "rounding error" would have been significant, such aqs trails alongside a water body.
  • Apache webserver compression was checked and enabled, allowing the data file to be compressed on the fly. As a result, the actual transfer overhead of the database is 500 kB, significantly less than the 4 MB and dramatically faster than the original 12 MB version.
2.  The Trail Route Planner involved some interesting development:
  • First, to add a new trail segment to your plan, that new segment must have an endpoint "adjacent to" one of the endpoints of your current plan. This involved writing some custom programming to check the multiple endpoints of each multipolyline against the multiple endpoints of the newly-selected multipolyline, and to find whether any such pairing fell within a given snapping tolerance (20 feet). If no endpoint pairing falls within this tolerance, the trail is not added to the list.
  • Upon adding the segment, the whole path must be recalculated as to total mileage, mileage which allows dogs, which allows bicycles, which allows motorized vehicles, etc. and also the elevation profile must be recalculated.
  • The elevation profile proved challenging, as the vertices within these trail segments are not necessarily"sorted" such that each vertex is in fact the next one you would traverse as you walk the trail end-to-end. An algorithm had to be invented for untangling the paths from the multipolylines, then "flipping" the paths so they are internally laid out end-to-end. A version of this same theme had previously been implemented by GreenInfo for Cleveland Metroparks, also for the purpose of generating elevation profiles from possibly-mixed-up sets of line segments.

Focus:   Environment, Government Agencies, Recreation  

Services:  Interactive Solutions, GIS Services, Cartography, Applications Development, Web Mapping, Mobile Applications 

Tags:   Colorado, Esri ArcGIS, hiking, parks, skiing, tourism, Trail finder, trails  

“ I've had experience with other web developers and really think what your team produced and how well you responded was pretty amazing. You took our requirements and developed an intuitive, fast, functional and very popular public recreation application and website. Throughout the process the GreenInfo team was responsive, knowledgeable, and worked with us to deliver what we needed. We will certainty return to you for our future application development needs.”

—  Mary Lackner, Pitkin County Geospatial Technology Lead

Project Years: 2014-2015

GreenInfo Network creates, analyzes, visualizes and communicates information in the public interest. We specialize in mapping and related technology for nonprofits and public agencies, focusing on using it for conservation, social equity, public health, environment and foundation grant making.
2201 Broadway, Suite M5
Oakland
CA
94612
United States of America