Undoing Deletions

From OpenStreetMap

Jump to: navigation, search

So, you deleted a large chunk of the map, and then uploaded by mistake?! What can be done to get the data back on the server again?

The following methods assume that you are using JOSM, and that you have a saved copy of the data on your local machine (let's say, "data.osm"). When you saved the data is important. If it was before you deleted the items, then this is the easiest to recover. If it was after you deleted the items, but before you uploaded, then it is still possible. If the only copy you have is after you uploaded, then you cannot recover using these methods.

There is an important lesson here: as with any computer application, save locally as you go along, as well as uploading to the central server.


Method 1: I have a copy saved from before I deleted stuff

This should be fairly straightforward to recover. We want to tell the server that the items IDs that have been deleted are now modified. This will undelete them on the server.

1. Start JOSM and download the affected area from the server. You can do this in small areas if you like.

2. Load your "data.osm" from the local disk. Hopefully you will now see all data back again.

3. Try and upload. Nothing should be available for upload, but if it is you will need to work out what it is and whether you really want to upload it.

4. Use the select tool to select the area that was affected.

5. Add a new tag to all this data, that does not clash with any existing tags. Maybe something like "ignore=me".

6. Delete this new tag. All items you added this tag to are now marked as "modified" in JOSM, and are candidates for upload.

7. Upload the data.

8. Restart JOSM and download the affected area to check it has uploaded correctly.

9. Repeat from 1 for any additional areas that need to be corrected.

Warning: this will set the items that you upload to the server to be the same as you have on disk. If your local copy is quite old, then by doing this you may revert changes that other people had made to the data on the server. This is another reason to keep saving locally as you are editing!

Method 2: I have a copy saved after I deleted, but before I uploaded

Personal tools
recent changes