OpenStreetMap

OSM History Viewer

Posted by Candid Dauth on 12 June 2009 in English (English).

The first part of OSM History Viewer, the changeset visualisation tool, is ready for testing on http://osm.cdauth.de/history-viewer/ (I haven’t tested it much yet, so it could be really buggy).

During the analysis of the changeset, all ways that were changed are split into segments (connections of two nodes). Then the versions before and after the changeset are checked if they contain the segment. Segments that only exist in the old version are marked red, those that only exist in the new version are marked green, segments that exist in both versions (and thus were not changed) are marked blue. This way, you can see what exactly has changed, if someone only combined or split a way, this will not be marked as a changed (instead, it will be coloured blue).

One problem I am facing right now is that a single node movement can cause a way to change without the way being mentioned in the changeset. There is no way in the current API to find out which ways a node belonged to at a specified point in time. I can only guess this at the moment, maybe I will parse the history view on the OSM homepage in the future, as the way membership seems to be listed there.

A tag change visualisation will also be part of the changeset visualisation in the future, visualising which tags have been added, removed or changed on which way or node.

The second feature coming with OSM History Viewer will be a relation history analysis tool. It will be possible to show the changes on a relation (with all its members and sub-members) in a specified changeset as well as displaying who added which part to the current version of the relation (“blame” view).

In reply to davidearl, who suggested to use the planet diff files instead of the OSM API in my last diary entry about this: As the hard disk space on my web server is very limited, I would not be able to keep many versions of the diff files. A want the changeset visualisation tool to work with all changesets, no matter how long ago they were commited, and that is only possible by using the API.

Comment from IgnoredAmbience on 13 June 2009 at 09:31

"One problem I am facing right now is that a single node movement can cause a way to change without the way being mentioned in the changeset. There is no way in the current API to find out which ways a node belonged to at a specified point in time. I can only guess this at the moment, maybe I will parse the history view on the OSM homepage in the future, as the way membership seems to be listed there."

Unfortunately, although its listed there, it is not correct, it always lists the current version, since the version of the node is not stored in the way's history table. (Since a node can be changed without a new version of a way being created (potlatch ignores this, and creates a new way version anyway))

Comment from Candid Dauth on 13 June 2009 at 20:17

I almost suspected it to work incorrectly, thanks for the tip and for saving me the time to find it out myself.

Comment from Biogenesis_ on 14 June 2009 at 10:44

I would love to play with this tool but can't work out how to use it. I keep getting "Changeset could not be analysed." messages. What exactly goes in the text box? Entering in the "ID" of an edit from my edits page (http://www.openstreetmap.org/user/Biogenesis_/edits) gives the error above.

Comment from Candid Dauth on 14 June 2009 at 12:46

Now you can also enter changeset IDs with a #.

Comment from Biogenesis_ on 15 June 2009 at 01:29

Thanks :) Starting the number with a # worked! It's really picky though, like if there's any whitespace on the end of the number it won't work. Well, at least when I copy+paste from a changeset list there tends to be an extra non-printable character on the end that needs to be ^H'ed before it'll work.


Login to leave a comment