Trailforks Custom Basemap

Apr 8, 2016 at 12:10
Apr 8, 2016
by Todd Neumarker  
You must login to Pinkbike.
Don't have an account? Sign up

Join Pinkbike  Login

Trailforks basemap

Trailforks is now providing its own background terrain map. It’s homegrown and built from the ground up to highlight all things mountain biking. Online map sources have come a long way in recent years, as has the technology and hardware necessary to process and make them widely available. At Trailforks we have a pretty simple goal: arm riders with all the information they need to find that next epic bike adventure. Up until now we have only been providing widely available online background maps to give geographic context to the trail data. Each of these background layers have strengths and weaknesses, some have stricter usage licensing then others, but they are all good maps. As good as these background maps are for their intended audience, that audience is wide... really wide, like everyone in every user group. But our focus is narrow, primarily mountain bikers. To build a map that is very specific, even to virtually one use case, we decided to create a thematic background that we can more easily control, remove unnecessary visual distractions, illuminate important map locations and geographic features. Our goal in building this map is the same as in building Trailforks; to provide all the information you need to find your way onto the trails, quick and simple.

1. 1.6 billion tile images stored
2. 7 terabytes SSD storage
3. 34 million km of road/track/contour data

BASEMAP by Trailforks
Images of the Trailforks Custom Basemap

The first thing we did was to filter out unnecessary map items that tend to obscure the mountain bike information. We think that paved roads and highways are over-emphasized on most maps. Even maps that profess to be "Bike Maps" often display the main freeway as a center-piece. Of course, we do believe they serve a purpose, like to help navigate you to the trailhead or when doing a shuttle, and as a visual reference to help orient yourself to a location. But for the most part paved roads themselves as compared to trails are ancillary, and on our map they are rendered accordingly, in plain white, visible, but insignificant as compared to mountain bike trails, as they should be.

Contours with elevation and terrain shading
Images of the Trailforks Custom Basemap

Mountain gradients and elevation data is very important, but not so much that it detracts from the trail map itself.

This is another area we decided to start from a blank canvas and build up the terrain to provide only what we need to know when planning a ride. Things like how steep up, how steep down, when does the climb start, will I get caught in a valley and have to climb out before it gets dark. We didn't want the terrain shaded too dark, because again that obscures the trail data and doesn't print well. With a terrain map of our own design we have the freedom to provide printed copies, even provide other mountain bike organizations a basis on which to build a trail map or create beautiful printed race course maps to hand out on race-day.

When we started toying around with terrains and contours, providing a map like this that would cover the globe was a daunting task. To process large groups of files that would reach as big as 30 gigabytes for one single file initially took days to process. We initially thought multiple computers running in parallel would be required. To overcome this we built a specific computer, 12-cores, 64 gigabytes of RAM and a 1.3 terabyte NVMe drive that could be used as a graphics buffer. Then we had to add (4x) 4 terabyte drives to optimize IO and serve as a source for SRTM raw elevation data, contour vector files, completed terrain files and all the intermediate files. The speed of disks was the primary limiting factor. Using the Intel 750 NVMe drive enabled us to accomplish the pre-processing all one computer.

Images of the Trailforks Custom Basemap

First, to process the terrains we did not want to use the SRTM elevation data raw without smoothing elevations and doing some scripted graphics work to pretty it up. The contour lines also needed to be smoothed and cleaned up using some custom scripts. Imagine every contour line on every hill and mountain everywhere in the world, that's like trillions of kilometers of vector length. Even for a liquid cooled 12-core overclocked machine the processing time was significant. On top of that our little workhorse would perform a gaussian blur to smooth out the terrain shading on massive files which would take up to 500Gig of work space on our NVMe drive as it worked on one of many files waiting in the pipeline. I had to install some extra fans on top of the liquid cooling radiator to pick up the excess heat. These new LED fans would kick on whenever the cores reached a high enough temperature. This way I could tell if there was a failure or crash, because the fans would stop if any part of the processing pipeline failed and the server room would look just a little bit darker. So I could just look down the hallway and say "Yep, still cranking!"

Images of the Trailforks Custom Basemap

For those of you familiar with the iconic Slickrock Trail in Moab, you know that like many trails in Moab, it shares a popular 4x4 route. Even dirt roads on a mountain bike map are generally more important or of greater use when connecting to trail systems or finding a quick way to drop off the mountain. Most maps do not contain dirt roads, if they do they rarely differentiate between paved and dirt, much less color them by how rough or primitive they are. When a map is mostly black and white, anything on the map with color will stand out. We paint the dirt roads in a dirty brown, and fade them out as the road quality diminishes, similar to the way you may experience such a road in person, as the weeds and overgrowth reclaim old double track. We believe all of this is important information to a rider, and we wanted to emphasize it. Or more accurately provide a theme that will represent it when the data is tagged with the necessary attributes.

Creating our own basemap gives us all kinds of flexibility we did not have in the past. Our vector data is derived from the OpenStreetMap project and the terrains/contour are of our own design sourced from SRTM data. The list of items we wanted to remove from the map is lengthy, so for the purpose of this document I will enumerate a few of the more important things:


1) Ski Trails - A lot of great trails are up at ski resorts, so the first thing to remove was ski tracks. They often use the same difficulty ratings/colors as MTB trails and make any summer trail map overlay virtually useless in these areas. They were the first to go. We did not want to get rid of ski lifts entirely because we do use some of these during the summer. So we toned down the ski lifts, and if they are marked as summer or bike access, we actually emphasize them more by giving them a little orange halo.

Images of the Trailforks Custom Basemap

2) Trails - This may not sound correct, but yes, we filtered out trails. Trailforks trails are interactive and provided on top of the basemap, so we do not need trails that exist as part of any basemap. Most background trail data is often fragmented, incorrect, and/or inaccurate. We are still in the process of adding and completing trail systems in Trailforks as well, but to display two sources of trail data is confusing. In some cases the trail data in the background is very good, like OSM trail data is excellent in many areas of world. We simply don't want the confusion of overlapping. Unfortunately the tagging of trails within OpenStreetMap can be inconsistent, so our filters are very strict. We are making every effort to display hike trails to use as a reference, cross-training, and to know where not to ride, but they must be marked in OSM (we will post more info on this later).

3) Large Land Borders - All of the land on this blue marble is sliced, diced and marked in what are commonly known as political boundaries or better known as "Land Ownership". If you are making a map for everyone that is to display everything, you probably need a complicated coloring system with all kinds of different shades, patterns and borders to indicate forests, protected areas, military boundaries, wilderness, private land, mining claims, etc, etc. ad nauseum. For the purpose of this map, most of those colors and shades simply obscure our important data. We really don't care, all that matters is "Can I ride my bike here or not?" Wow, that makes our map colors pretty simple. We take it one step further, by painting military boundaries in our "Black Ops" theme (We don't want to find ourselves on a practice range) and Wilderness/Protected areas in a light green shade, where both have distinctive borders. Military boundaries are marked accurately and consistent within the OSM dataset, whereas the forestry and protected area attributes in OSM are not as consistent. But we did our best to highlight areas that are often considered sensitive, and will provide guides on how to fix OSM data to be more consistent, so that we can all make the data there better.

Images of the Trailforks Custom Basemap
In the image above you can see the "Timpanogos Wilderness" border as it cuts right through the Dry Canyon Trail. Although the trail is not really ride-able up, legally you must walk your bike to the saddle. There is no signage up there, but the border is clear on our map.


Images of the Trailforks Custom Basemap

Hospitals and pubs. You know, for emergencies and that sort of thing. You know you are riding in a great place if all trails lead to a cold one, and to a lesser extent the emergency room.

There is a lot of tech behind creating and serving our own world-wide basemap. Large database servers hosting all the OpenStreemMap data for the planet. Servers to generate the map tiles using the OSM data, contours and shading. Servers to then host the generated map tiles and finally a CDN to serve the tiles to you the end user. Our servers generate over 1 billion of these custom map tiles!

Trailforks GIS basemap network map

Trailforks GIS basemap network map


All seriousness aside, this is a work in progress and we need help in crafting it. We have been testing it for some time now as we tweak the theme and try it in various locations, both in the office and out on the trails. We hope that Trailforks users will provide input and suggest changes that we can add to our growing list of theme tweaks.

Our custom basemap is already live on the website as the default map choice for most regions. The basemap will also be an option in the mobile app soon!

We already have a list of changes coming in a couple weeks, such as highlighting bike lanes in cities leading to the trails. We are also improving the filtering of the OSM tracks that underlay our trails which tend to look a bit messy. An upcoming article will explain how to edit OpenStreetMap with proper tagging to best work with Trailforks.

We would also like to hear about how you may be able to use our basemap to help promote riding in your area. Having our own basemap opens up new possibilities and we have more cool features coming that will utilize it.