[Talk-GB] TfL Cycle Infrastructure Database - matching against OSM
richard at systemed.net
Sun Apr 26 19:12:21 UTC 2020
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.
I’ve now pushed the in-progress code to github:
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.
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:
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:
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 https://osm.cycle.travel for details and a browsable map.
So, where next?
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.
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.
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.
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 ;) ).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Talk-GB