Find the id of a deleted node

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Find the id of a deleted node
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

There are several ways to find the id of a deleted node. This may be needed for some approaches to undoing deletions.

Deleted nodes remain in the database forever with unchanged id, but with visible=false instead of visible=true. There are several ways to find the id of a deleted node – based on an explanation by Frederik Ramm on the talk-de mailinglist:

Find the changeset method

If you can find a changeset which created, deleted or edited the node in some way, then browsing within said changeset can reveal the node id. Note that Achavi (graphical tool) often can be very helpful for finding the exact node.

There are several ways of finding the changeset:

  • Use WhoDidIt (OpenStreetMap Changeset Analyzer) and browse to the location to get a list of changesets with local changes. Each changeset is summarized with the number of added (green), modified (yellow) and deleted (red) nodes, ways and relations. If there are not too many changesets, it might be possible to find it.
  • Use OSMCHA and set the bbox (bounding box) of the filter to cover a small area around the deleted node to find any changesets that may have touched it. Works up to a month back.
  • If you know a user who created, deleted or edited the node, go to their user profile on the website and browse their edits to find the changeset. It may help if you know when they did it.
  • The extended API allow you to query user edits in a specific period, between other options. For example:
 https://api.openstreetmap.org/api/0.6/changesets?display_name=yourusername&time=2014-02-01,2014-02-28&closed=true

Overpass API method

Use the Overpass changed filter to find all nodes in a bounding box that have changed/been deleted since a given date. This can be filtered by tags. Appears to be a memory intensive operation, so may not work for all. As an alternative use the date setting to retrieve all data in a bounding box at a certain point of time (up to September 2012) and check if the object existed back then.

Potlatch 1 method

If your node is part of a deleted way, then you can use the old editor Potlatch 1 to find the deleted way (see Change rollback#Potlatch 1).

Old planet file method

If the node was deleted less than 6 months ago, an old GeoFabrik OSM Data Extract is probably available to download, and this will contain the deleted data. Download the right .osm.bz2 file. Alternatively OSM developers may have an older planet file if you ask around.

Even an extract is probably huge. In that case, consider using osmosis to cut out a smaller area around the node. Once you have a small uncompressed .osm file you can open this in a text editor and search for the node, or open the small area in JOSM.

Full history file method

If none of the above works, try to find a full history dump (see Planet.osm/full) including the area of interest. Unlike the GeoFabrik extracts, a full history dump also contains deleted/invisible nodes. Use the osm-history-splitter to cut out the smallest possible area.