{"id":1320,"date":"2010-05-08T18:28:34","date_gmt":"2010-05-08T18:28:34","guid":{"rendered":"http:\/\/dalelane.co.uk\/blog\/?p=1320"},"modified":"2010-05-08T18:39:42","modified_gmt":"2010-05-08T18:39:42","slug":"getting-free-routing-data-for-the-uk","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=1320","title":{"rendered":"Getting free routing data for the UK"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/i267.photobucket.com\/albums\/ii311\/dale_lane\/100506-traffic-4.png\" align=\"left\" hspace=\"10\" vspace=\"10\"\/>I wrote this week about <a href=\"http:\/\/dalelane.co.uk\/blog\/?p=1297\">my new Android app<\/a>, which checks for road traffic problems affecting UK routes. I mentioned that it wasn&#8217;t ready for release yet, because there are a few admin issues that I need to sort. <\/p>\n<p>One of the problems is in how I get the routing data. <\/p>\n<p>The app relies on comparing the locations of traffic problems with the user&#8217;s route. <\/p>\n<p>Getting the location of traffic problems isn&#8217;t too hard as there are feeds from the <a href=http:\/\/www.highways.gov.uk\/traffic\/11278.aspx\" target=\"_blank\">Highways Agency<\/a> and the <a href=\"http:\/\/backstage.bbc.co.uk\/data\/TravelFeeds\" target=\"_blank\">BBC<\/a> that offer that.<\/p>\n<p>But getting a detailed description of a route between two places, in a format that I can use to compare against the traffic problems, proved harder. <\/p>\n<p><!--more-->I tried a few places, such as:<\/p>\n<p><a href=\"http:\/\/developer.android.com\/guide\/topics\/location\/\" target=\"_blank\">native Android API<\/a><br \/>\nThere is a maps and geolocation API in Android, but it doesn&#8217;t include any routing abilities. (<em>I found a couple of forum posts that suggest that there used to be, but they were removed?<\/em>)<\/p>\n<p><a href=\"http:\/\/code.google.com\/apis\/maps\/documentation\/v3\/reference.html#DirectionsService\" target=\"_blank\">Google Maps API<\/a><br \/>\nI found the documentation for Google&#8217;s APIs quite obtuse. I couldn&#8217;t find a <a href=\"http:\/\/code.google.com\/apis\/ajaxsearch\/documentation\/#fonje\" target=\"_blank\">REST or HTTP API<\/a> for calculating routes. The JavaScript API doesn&#8217;t look like it returns information in quite the format I require, and I couldn&#8217;t see a straightforward way of accessing it from an Android Java client. I might have to come back to this, though!<\/p>\n<p><a href=\"http:\/\/www.multimap.com\/openapi\/\" target=\"_blank\">Multimap Open API<\/a><br \/>\nThey have an API that would be ideal for my purposes &#8211; technically, the closest fit for my needs for a few boring technical reasons. But the terms of use say that it &#8220;may not be used as part of a mobile or wireless service&#8221;. Damn. <\/p>\n<p><a href=\"http:\/\/developers.cloudmade.com\/\" target=\"_blank\">CloudMade<\/a><br \/>\nThey have a good routing API, and this is the one that the app currently uses. But, my free API key limits me to making 5000 requests per month. That&#8217;s not 5000 requests per user &#8211; it&#8217;s 5000 requests in total for all users of my app. If I want more, I&#8217;d have to pay. This might be enough&#8230; I&#8217;m not sure. It&#8217;d depend on how many users I end up with. <\/p>\n<p>That said, their developer site does say &#8220;If you are doing something really cool and you absolutely need more access to these services please get in touch \u00e2\u20ac\u201c we want to help your innovation&#8221;. I&#8217;ve emailed them to ask. I wonder if they would think my app is really cool? \ud83d\ude42<\/p>\n<p>Watch this space.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote this week about my new Android app, which checks for road traffic problems affecting UK routes. I mentioned that it wasn&#8217;t ready for release yet, because there are a few admin issues that I need to sort. One of the problems is in how I get the routing data. The app relies on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[353,384,158,455,137,454,457,256,456],"class_list":["post-1320","post","type-post","status-publish","format-standard","hentry","category-code","tag-cloudmade","tag-geolocation","tag-google","tag-googlemaps","tag-location","tag-map","tag-multimap","tag-openstreetmap","tag-routing"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1320"}],"version-history":[{"count":0,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1320\/revisions"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}