<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hi folks,
<div dir="auto"><br /></div>
<div dir="auto">You’ll remember that a couple of weeks ago I posted about the work I’m doing to look at getting the relevant bits of Transport for London’s openly licensed Cycle Infrastructure Database into OSM.</div>
<div dir="auto"><br /></div>
<div dir="auto">I’ve now pushed the in-progress code to github:</div>
<div dir="auto"><br /></div>
<div dir="auto"><a href="https://github.com/cyclestreets/tflcid-conversion">https://github.com/cyclestreets/tflcid-conversion</a><br /></div>
<div dir="auto"><br /></div>
<div dir="auto">It takes the TfL CID files, compares them against OSM (by making queries against a freshly loaded Postgres database), and outputs a series of files for each datatype, all categorised by the type of editing that will be required to get them into OSM. So, for example, there’s a script that takes TfL’s cycle parking data and compares it against OSM, then outputs three files: one of TfL locations that aren’t in OSM, one of those which are in both, and one of those which are in OSM only.</div>
<div dir="auto"><br /></div>
<div dir="auto">It’s pretty in-depth stuff. The cycle parking alone is a 300+ line script. There are five separate scripts for different types of traffic calming, another 300-line script for cycle lanes, and so on. The matching logic is distinct for each type of data - because, for example, speed bumps aren’t at junctions, but raised tables often are. There’s a script (.rb) and a readme (.md) for each one at:</div>
<div dir="auto"><br /></div>
<div dir="auto"><a href="https://github.com/cyclestreets/tflcid-conversion/tree/master/readers">https://github.com/cyclestreets/tflcid-conversion/tree/master/readers</a><br /></div>
<div dir="auto"><br /></div>
<div dir="auto">But if you don’t fancy delving into complex Ruby/PostGIS scripts, then just have a look at the readmes there, and then go straight to the output data:</div>
<div dir="auto"><br /></div>
<div dir="auto"><a href="https://github.com/cyclestreets/tflcid-conversion/tree/master/output">https://github.com/cyclestreets/tflcid-conversion/tree/master/output</a><br /></div>
<div dir="auto"><br /></div>
<div dir="auto">It’s all in GeoJSON format (for now) for ease of loading into QGIS or similar tools. Plus there’s a raster tileset of the cycle lanes/tracks for easy reference in your editor of choice - see <a href="https://osm.cycle.travel">https://osm.cycle.travel</a> for details and a browsable map.</div>
<div dir="auto"><br /></div>
<div dir="auto">So, where next?</div>
<div dir="auto"><br /></div>
<div dir="auto">As you’ll see, I’ve generally split the output between simple, uncontentious additions which can go into OSM fairly simply, and those objects that will require more work to integrate.</div>
<div dir="auto"><br /></div>
<div dir="auto">Much of the data can obviously only be integrated into OSM with serious manual editing work. This is particularly true of the cycle lanes and tracks, which will require adding extra tags to existing roads, splitting at start/end points, and so on. TfL have committed to some staff time to get much of this done (yay!) and Martin at CycleStreets has been training them up on OSM, but obviously work patterns are a bit disrupted at the moment so this won’t necessarily happen too soon.</div>
<div dir="auto"><br /></div>
<div dir="auto">Some of it can go into OSM in a more-or-less automated fashion. This is particularly true of the cycle parking, and of most speed bumps. Some crossings, chicanes, barriers, and continuous pavements (sidewalks) at side-roads could potentially go in. I’ll be doing a bit more work on these to get them into a format which could perhaps form an automated edit and would welcome views.</div>
<div dir="auto"><br /></div>
<div dir="auto">And, obviously, if you’d like to get involved in bringing the data into OSM, that’s great! I’m very happy to put more work in to get it into a format that’ll be useful for people (not really being a JOSMite myself ;) ).</div>
</div>
</div>
<div name="messageSignatureSection"><br />
<div class="matchFont">cheers</div>
<div class="matchFont" dir="auto">Richard</div>
</div>
</body>
</html>