Mapping Hiking Trails in OpenStreetMap

I’m by no means an OpenStreetMap power editor, but I really enjoy making casual edits here and there. I typically add obscure features that relatively few people will ever likely care much about- things like small parking spots and park features around my neighborhood. Occasionally I’ll map out a new business, or confirm my dentist office is “on the map” while waiting around with nothing better to do, but what I enjoy most is mapping local hiking trails.

I’m fortunate to live in an area full of small but excellent parks, preserves, and recreational areas. When the weather is decent, we try to get the family out for a hike every weekend if possible. My kids are 6 and 4, so most of these hikes end up being fairly quick and easy, but you don’t have to get far off the beaten path to enjoy some amazing scenery and funky terrain.

Helderhills Lean To at the Christman Sanctuary

Most of the local parks are maintained by the County or Town and we have quite a few nearby preserves and natural areas maintained by The Nature Conservancy. Before heading out for a hike in a new area, I like to do some research and see if there are any trail maps available. I always check OpenStreetMap and Google Maps first to see what’s available, but even if the trails are already mapped in OSM, I like to do some more digging to see if there may be any official maps out there.

Finding Trail Maps

You can typically find some type of map for most public parks with maintained hiking trails. County and municipal websites are a great place to start, and nothing beats a good old fashioned Google search. Sometimes, the only map readily available is a large print posted in a kiosk at the park entrance. You can always snap a photo of that map with your camera or check the legend for additional information regarding where the map came from. If you are fortunate, you’ll be able to download a decent PDF map, which is often clearly an export out of a GIS. You may be able to hunt down the source data files, but I’ve never had much luck with that.

Christman Sanctuary Map courtesy of The Nature Conservancy

Once you’ve located a usable map, you’ll typically have to georeference it. Georeferencing simply means associating points on the map with real-world coordinates so that everything is in alignment in your mapping software. There are several options for georeferencing maps, but I’m going to walk you through my preferred workflow for turning a downloaded image into a usable map, with extractable data.

Start With MapTiler

MapTiler is a free, easy to use application for turning dumb images into modern map tiles. This software does two things: 1) it provides a georeferencing tool to place your map image in the proper location, and 2) it slices your map into smaller map tiles, which can be loaded into most modern web and mobile mapping applications.

MapTiler Georeferencing Interface

Georeferencing is as easy as matching up a few common features between your map and the reference map or aerial image. In this case, we are matching up some road intersections (look for the orange dots). The more points you can match across all areas of your map, the better alignment you will have.

MapTiler Export Options

Once you’ve georeferenced your map, you can either export the raw map tile images to a folder on your computer, or package them up as a single MBTiles raster file.

If you just want to load the map on your phone to take with you while hiking, you can choose MBTiles to use with one of the many mapping apps that supports that format. There’s actually a MapTiler companion mobile app for both iOS and Android, but my go-to mobile mapping app for Android has always been Locus Map, which has excellent support for MBTiles.

Viewing Your Map In OSM

If you have permission to use the map for derivative products and you want to use it as a source to digitize features into OSM, choose the Folder export option. This folder of map tiles can easily be used as a custom background map in the standard OSM iD editor. If you have Python installed on your computer, pop open your terminal, cd into your tile directory and run the following command: python -m SimpleHTTPServer. This will fire up a local web server from within your tile folder. Open the Background Settings in the iD editor and click to edit the Custom background. You can now view your map by referencing the local server at: http://localhost:8000/{z}/{x}/{y}.png.

Custom Background Map in OSM iD Editor

You can now digitize features such as hiking trails and park boundaries from your map directly in OSM! I like to load the MBTiles version of the map on my phone and do a little ground truthing before actually digitizing the trails in OSM, but this is a great way to add some local context to your editing session.

Like what you read? Give Bryan McBride a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.