There are some pretty awesome tools out there to help with the remapping effort after the redaction bot made its sweep across the OpenStreetMap database. (Does this sound like Latin to you? Read up on the license change and the redaction process here.) Geofabrik’s OSM Inspektor shows all the objects affected by the redaction. It is likely the most comprehensive view of the result of the license change redaction. Numerous other tools are listed on the Remapping wiki page. Most of these tools will show you, in some shape or form, the effects of the redaction process: which nodes, ways and relations have been deleted or reverted to a previous, ‘ODbL Clean’ version of the object.
I want to see if we can take it a step further and determine whether an object has already been remapped. This is useful for monitoring remapping progress as well as determining where to focus efforts when you want to contribute to the remapping effort.
For now, I am going to stick with ways. I think maintaining, or reinstating, a good quality routable road network is an important objective for OSM anyway, and especially at this point in time, when many roads are broken due to redaction.
Let’s start by locating a deleted way here in the US using my own Redaction Affected / Deleted Ways Map. That’s easy enough around severely affected Austin, TX:
I am going to use three comparison parameters to determine whether this way is likely to already have been remapped:
- The Hausdorff distance between the deleted geometry and any new geometries in that area
- The highway type of the deleted and any new geometries in that area
- The length of the deleted and any new geometries in that area
For this to work, I will need a table with all the ways deleted by the redaction bot. This is easy enough to compile by looking at the changesets created by the redaction account, but Frederik Ramm was kind enough to send the list of OSM IDs to me, so all I had to do is extract the deleted ways by ID from a pre-redaction database. The comparison can then be run on that table and a ways table from a current planet:
It is immediately clear that this way is very likely already remapped if we look at the top candidate, with object ID 172171755. It has a very small Hausdorff distance compared to the deleted way 30760760, it is tagged with the same highway= type, and the lengths are almost identical.
Sure enough, when fire up JOSM and load this area, it is clear that this area has been remapped:
(Selected objects are version 1 and created after July 18, 2012).
I need to do some more testing and tweaking on the query, but I will soon integrate this in the Redaction Affected / Deleted Ways Map.