OSM History Viewer

From OpenStreetMap Wiki
Jump to navigation Jump to search

OSM History Viewer (available on http://osmhv.openstreetmap.de/) is a change monitoring and debugging tool

  • to visualise the changes in a single changeset and
  • to analyse the history of a relation.

Features

Changeset visualisation

This is how Changeset 6798641 looks in OSM History Viewer (view the live one!).

With OSM History Viewer, you can visualise the changes that were made in one changeset compared to what things looked like before. It shows all tags that have been removed or added to elements and visualises how nodes and ways have been modified, moved, created or removed. Later it will also be possible to see how a relation was changed in the changeset.

To visualise the changes, all ways affected by the changeset are turned into 'segments', where one segment represents the connection of two nodes. Each segment is then analysed to determine whether it was moved, created or deleted in that changeset. If a segment, or its location only existed before the commit, it is marked red on a map. If a segment, or its location only exists after the commit, it will be marked green. If a segment did not change, it will be marked blue.

This method has the following effects on the visualisation:

  • If you moved a way, the old way will be on the map in red, the new way in green.
  • If you only move one node in a very long way, only the part that you actually have changed will be marked modified.
  • If you split a way or combine multiple ways, they will be visualised as unmodified (blue), as you have not changed their position on the map.
  • If you have only changed the tag of a way, it will also be shown blue.
  • If you see something brown on the map (green and red mixed together) you might have moved a node only by a small distance. Zoom in to see that the green line will be distinct from red one instead of being at the same position.

This method has the great advantage over the simple displaying of the changeset content that you can see how the objects on the map actually have changed (and not how their data representation in the OSM database has changed).

See also: Achavi#Changeset Viewer – another, similar changeset viewer (linked by WhoDidIt)

Relation Blame

With “Relation Blame” you can find out which part of a relation has been added to it by whom. The relation (including all its sub-relations) is split into segments (segments being connections between two nodes) and then the history is searched for the first occurrence of these segments in the relation. By this you can find out who added a certain part to the relation in which changeset (and then “blame” them ;-)). This segment-based method has the big advantage that people just splitting ways will not appear to have added a way to the relation (even though they technically did). A “wrong” author might still be displayed though if someone added some nodes to a way of the relation (for example by connecting another way to it or by improving its accuracy).

Easy ways to use

Greasemonkey script

On [1] there is a Greasemonkey script that adds links to OSM History Viewer to the relation and changeset pages on www.openstreetmap.org. That script is currently broken in opera/chrome. Fixed version

Bookmarklet

Use a bookmarklet to conveniently access the tool! By clicking on the bookmarklet (or opening it via a keyword) while visiting a changeset page such as 18986223, you will get a new tab/window with the analysis page for that changeset.

javascript:(function(){ id=location.href.match(/www\.openstreetmap\.org\/changeset\/(\d+)/); if(id!=null){window.open('https://osmhv.openstreetmap.de/changeset.jsp?id='+id[1]);} else{alert('This is not a valid OSM changeset page.')} })()

(Credits to Eugene and The knife)

The bookmarklet above opens the OSMHV page in a new window/tab, which allows you to switch back and forth between browser tabs for the changeset and OSMHV view. To replace the changeset page with the OSMHV analysis page, use following code instead:

javascript:(function(){ id=location.href.match(/www\.openstreetmap\.org\/changeset\/(\d+)/); if(id!=null){document.location.href('https://osmhv.openstreetmap.de/changeset.jsp?id='+id[1]);} else{alert('This is not a valid OSM changeset page.')} })()

TODO: One for the "relation blame" feature.

Source code

The source code is available under AGPL-3 on GitHub. The project is maintained by User:Candid Dauth.

Bugs

  • When you moved a node in a changeset that was part of a way and is not part of that way any more during analysis, the way might not be shown as affected. This cannot be fixed due to restrictions of the OSM API.
  • When two objects belonging to a relation have been changed in the same second in different changesets, only one of these changesets will be considered. So the wrong user might be displayed in the Relation Blame mode. As two things changing in one second are problematic anyway (because you cannot tell which one changed first) and the effect of this is very low, it is not planned to be fixed.
  • Hovering over changed property list is jumpy (dead link; archived version here). Workaround: start hovering on bottom of the list instead of the top and move subsequently up the list towards the top.

Bug Reports and Features Requests can be submitted on GitHub.