OpenStreetMap

Pacific Crest Trail

Posted by DanHomerick on 3 September 2009 in English.

For non-Americans, or non-hikers, the Pacific Crest Trail (PCT) is a trail that runs from the Mexico border in California all the way up to the Canadian border in Washington. It's 2,650 miles (4,265 km) long, and as far as I can tell, only exists on the OSM in fragments here and there.

So here's the interesting part, there's a pretty high detail ShapeFile for the whole thing at the US Forest Service page devoted to the trail:

http://www.fs.fed.us/pct/
http://www.fs.fed.us/pct/downloads/PCT_shapefile.zip

If you use the Merkaartor editor, you can easily import, view, and (I think) apply the shapefile to the OSM. As far as I can tell, the data is already broken into subpaths, so it wouldn't come in as one gigantically long path. It would overlap existing ways, however.

So here's a question for your collective wisdom, dear readers: should I add it?
If so, how?

Here's the issues as I see them. First, the PCT is clearly a relation, not just a path. But all we have is the data of where it goes, not what roads, tracks, and paths it's following. Second, the shapefile doesn't give hint of what type of road/track/path it is, so in sections where the road/track/path is missing and needs to be added to the OSM, we can't do any better than using a highway=road tag.
http://wiki.openstreetmap.org/wiki/Tag:highway%3Droad

I think the proper solution is probably to write a script that creates a relation, then traverses the PCT looking for existing 'highway' tagged ways nearby, adding them to the relation if found. If no appropriate way is found nearby, then create a highway=road tagged way from the shapefile data.

I'm a programmer, and would be willing to try it myself, but since I currently know nothing about OSM's API, and relatively little about it's standard practices, the potential for me to mess it up is a little intimidating. Is there a sandbox to play in? For that matter, what's a good algorithm for calculating if two ways are 'close', favoring longer ways, and strongly favoring groups of ways which are close to the shapefile data AND which are connected to each other.

Better yet, does anyone else want to take the data and run with it? Please reply/comment!

Discussion

Comment from acrosscanadatrails on 3 September 2009 at 05:04

Hi, yes!
The trail actualy continue up the coast. ... hopefully over to Vancouver island, and take the VI Spine trail up to the start and connect with the National Hiking trail. vispine.n

I would recommend NOT uploading it, but creating an .osm file, and attach the proper attribution. Just have the file available, so then those who work on it. Attaching the relation to existing trails can do so. (considering that all long distance trails are technically ROUTES that go from one local trail to the next via roads), rather than the traditional meaning of 'trail'.

Feel free to email me acrosscanadatrails@gmail.com and we can chat further About it.

cheers,
Sam

Comment from acrosscanadatrails on 3 September 2009 at 05:06

actually jumping ahead of myself, the PCT connects with the KVR at Midway, BC. ... but still part of my "Across Canada Trails" projects. :)

Comment from nmixter on 4 September 2009 at 22:42

You can convert it to osm with the shp2osm script. It is fairly straight forward for anyone who knows any programming at all. If you can, I would suggest adding the whole thing since it appears most of it hasn't been added yet. Not sure if there anything you can do with the relations. OSM is all about adding data then other people coming along later on and making it better. Sometimes that means erasing the current data and updating it with something better. But that is where it gets tricky with what to remove.

Log in to leave a comment