Changeset rollback required.

I had a huge GPX loaded in JOSM that contains ~1000 tracks of Yosemite. The intention was to upload only a few of those tracks, but it looks like JOSM started uploaded pretty much all the data in there, which was definitely not the intention, so I killed it.

So right now, I have a changeset that added 18000 nodes dangling nodes that aren’t connected to anything.

The changeset is 2345150. I tried to meddle with revert.pl to undo this, but didn’t get far…

If anyone could revert the changeset above, that would be greatly appreciated.

Thanks.

First, while JOSM has the option to convert GPX tracks to ways, this is not a good function to use. But this is not helping the current situation, so:

Have you read the README, especially about the dry-run option? And the Revert wiki page?

I got mail back from Frederik Ramm, who has handled with this type of situation before, stating that he’s working on it…

Actually, in this (rare) particular case, it is a good function to use: the GPX file was actually a .shp file from the National Park Service that I converted. The .shp file itself was created by tracing the trails directly from the USGS topo’s. So they are already cleaned up with just the necessary points.

But this whole situation came to be not because of that: since there are already a lot of trails in OSM, uploading the whole set won’t work anyway. So what I tried to do was to selectively merge tracks from the GPX layer to the main data layer. Then fix them to make them connect nicely with existing trails. And then upload only those particular changes to OSM. I had fixed just a couple of trails that way, but somehow during the upload it also started uploading all the data from the GPX layer. Probably user error…

Definitely! That’s how I got to the revert.pl script in the first place.

But when I ran revert.pl, it gave the following error:

Not enough arguments for Changeset::create at ./revert.pl line 45, near "()"
Execution of ./revert.pl aborted due to compilation errors.

I tried to fix the code at line 45 and got past that initial problem, but then ran into the following error:

Use of uninitialized value in pattern match (m//) at ./revert.pl line 38.
GET http://api06.dev.openstreetmap.org/api/0.6/changeset/2345150/download... 404 Not Found (1b)

Thanks! I appreciate that. Sorry for the trouble.

Which raises a different question: what’s the normal procedure to merge OSM data with a large new dataset? Are there scripts that try to find duplicated by checking if they are spatially correlated? I understand that some manual intervention will always be required, but there must be ways to automate some parts of it?