I essentially have the same question as this poor guy years ago, but it’s more about following on to my own prior question on basically taking a relation, reordering it externally, and uploading to a new relation. I have the relation all nicely sorted in an external XML / OSM file, I’ve changed the relation ID to the documentation-suggested negative number, which theoretically makes it ready to upload to OSM as a brand-new relation with the re-ordered members. And touching NOTHING else, not messing with any of the member components. I have JOSM running and can load the relation file into it, but have no idea how to check the integrity of the data before uploading, if I should even consider uploading this into OSM at all. I absolutely don’t want to trash the original relation all the member data hailed from, I want to get it into the database and then fiddle names and links and whatever else after I make sure it all looks good. How do I do this (safely!) in JOSM?? Note that I am not editing the relation in JOSM itself, I already have that done in a local file and simply want to use JOSM as a tool to stuff the XML up into the database.
If you want to overwrite the existing relation with your reordered relation, then your JOSM XML file should use the original non-negative relation ID instead of a negative number, include all existing tags on the relation as well, and set the version attribute on the relation element correctly. This version number of the relation makes JOSM notify you if someone else has edited the same relation in the meantime, and activates JOSM’s conflict resolution tooling.
No. That’s the whole point. I do not want to overwrite an existing relation, I want to create a duplicate but separate (and reordered) instance of it. Was that not clear?
I’m not certain what your end goal is here. If you want to upload that duplicate relation, it sounds like you’ve figured that out. Assuming the only thing that you changed is the ordering of the members and the ID of the relation, JOSM should recognize that just fine, allowing you to request the unloaded members after you’ve opened your local file. Assuming all the members load correctly and it all passes the validators, you’d be good to upload it.
That does, however, assume that this duplicate relation should be uploaded in the first place. If the only difference is the ordering of the members, it probably should not exist in the OSM database. Also, if you are expecting for some data consumer to rely on a non-standard ordering for the members, I think you’ll find that someone editing it in the future might just sort the members using JOSM, reverting all your work here.
If the changes you want to make to the trail are meant to represent something that you only hope to get implemented at some point then something like uMap may be more suitable.
Maybe the mods should merge this with the 1st part of the mini-drama Cloning/copying a relation or route ? Doesn’t seem as if the current responders are actually reading the 1st bit.
I eventually figured it out; my .OSM file needed ‘’ action=“create” ‘’ along with the negative placeholder ID. Here’s the new relation , in north-to-south order. I found and removed a couple of duplicate ways and stray little “turds” from old routes we’re not including anymore.
I also have a fairly clean GPX of it with mileage waypoints and elevations. An insane assortment of tools has been used on this project, and one lesson on the way is that overpass-api.de seems to be on its last legs these days.
I know this is off topic for this thread, but what was the point of duplicating this particular relation?
For some reason I was under the impression that it was to have a separate route=foot and route=bicycle version, but this seems to be two versions of the exact same thing.
I wanted to just leave the original in place for reference. Yes, I have its XML downloaded, and will go back and fix up the new one appropriately. There are some external references to the original relation link, so I don’t want to just kill it until those have been updated.
Yes, I expect there will be separate route=foot and route=bicycle entities, because there are some places along the primary route where mountain-biking is prohibited. So small bypasses will be needed.