<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Robert Naylor &#187; GPX</title>
	<atom:link href="http://robert.pobice.co.uk/tags/gpx/feed/" rel="self" type="application/rss+xml" />
	<link>http://robert.pobice.co.uk</link>
	<description>Random thoughts and tech tips</description>
	<lastBuildDate>Sun, 08 Jan 2012 12:20:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Naptan to GPX Waypoints (OSM)</title>
		<link>http://robert.pobice.co.uk/2009/09/naptan-to-gpx-waypoints-osm/</link>
		<comments>http://robert.pobice.co.uk/2009/09/naptan-to-gpx-waypoints-osm/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 20:42:31 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[OSM]]></category>
		<category><![CDATA[BGT-31]]></category>
		<category><![CDATA[GPX]]></category>
		<category><![CDATA[Naptan]]></category>

		<guid isPermaLink="false">http://robert.pobice.co.uk/?p=70</guid>
		<description><![CDATA[If anyone has been following the goings on of OpenStreetMap of the uk you may have noticed the appearance of a load of Bus Stops (or duplicate bus stops if they where already in OSM). These have come from a database called NaPTAN kindly supplied to OSM by the UK Department for Transport and Traveline. [...]]]></description>
			<content:encoded><![CDATA[<p>If anyone has been following the goings on of <a href=http://openstreetmap.org>OpenStreetMap</a> of the uk you may have noticed the appearance of a load of Bus Stops (or duplicate bus stops if they where already in OSM).  These have come from a database called NaPTAN kindly supplied to OSM by the UK Department for Transport and Traveline. See the OSM <a href="http://wiki.openstreetmap.org/wiki/Naptan">Wiki</a> for more details.</p>
<p>These new points now need confirming/merging.  I&#8217;ve also got a new GPS (BGT-31) which can alert me when I get near a waypoint &#8211; so I though why not load up the new data as waypoints into my GPS?</p>
<p>Heres the rough script I&#8217;ve written to download the data and convert it to the right format for my GPS.  It also delete the name field, and changes the local_ref field to be the name, dropping the prefix 450.  This is because the GPS only shows 6 characters for the name of a waypoint and in my area the last 6 characters are probably the easiest way to identify individual bus stops in 6 characters.</p>
<pre lang=sh>
#!/bin/bash
wget http://www.informationfreeway.org/api/0.6/node[naptan:verified][bbox=-......] -O /tmp/naptan.osm
xmlstarlet ed -d "//tag[@k='name']" < naptan.osm | xmlstarlet ed -u "//tag[@k='local_ref']/@k" -v 'name' > naptan2.osm
sed 's/450//' < naptan2.osm > naptan.osm
gpsbabel -i osm -f naptan.osm -o ozi -F naptan.wpt
</pre>
<p>Just change the bbox to the area you want and it will generate the waypoint file which can then be uploaded to the GPS.  It is a but rushed but it does the job.</p>
]]></content:encoded>
			<wfw:commentRss>http://robert.pobice.co.uk/2009/09/naptan-to-gpx-waypoints-osm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

