OpenStreetMap

Amending an open OSM changeset on command line (by hand)

Posted by mikini on 25 July 2020 in English (English)

I ended up having some API-fun today.

Comment from mmd on 25 July 2020 at 17:20

For the rest of us: you can do the same thing in JOSM without any command line fiddling:

  1. Download respective area
  2. Change objects as needed
  3. Hit the Upload button, upload dialog opens up.
    • Go to “Changesets” tab
    • Press the refresh button next to “Upload to an existing changeset”. This will populate the dropdown control with a list of currently open changesets
    • Click on “Upload to an existing changeset”, and pick your changeset in the dropdown list
    • Continue uploading changes like you’re used to

Comment from mmd on 25 July 2020 at 17:28

Also, I would recommend to try this sort of thing on the dev instance first and get familiar with how this API stuff works -> https://master.apis.dev.openstreetmap.org

There’s some real danger of creating a huge mess, if you don’t know what you’re doing. So don’t try this at home on the prod instance :)

Comment from mikini on 31 July 2020 at 00:14

Hi mmd, thanks for reading.

Nice that JOSM can do this (see also help page about choosing changeset to upload to). Had the hopes that it would also be possible for mere mortals to continue a changeset, but couldn’t let such a fine chance to dive into the API slip by. I deliberately chose a simple change to reduce the chance of messing up ;).

I’m sure JOSM wasn’t capable of this the first time I needed it. But that must be a long time ago, help history indicate it’s 11 years since the feature was added. I’m afraid I mostly use iD and Vespucci these days for more ad-hoc mapping sessions so I don’t dabble much in JOSM anymore. I have, however, always been very conscious about grouping changes and not burning up changeset ids. To that end I always turn off the default to close after upload (making my changeset stats suffer, yours at zero is impressive, though!).

This sort of stuff should of course only be done with the utmost caution, wearing safety helmet, goggles, gloves, and the reverter plugin standing by. Will update the post with a warning and mention of the testing instances.

Mikkel

Login to leave a comment