Osmium merge throws out-of-order error even after sort

You can not merge files that have different versions of the same object in them. You say you have overlapping files and have edited one of them. That means you have different versions of the same object. Also, you probably have objects with negative IDs in them, because that’s what JOSM will produce if you edit objects. And that will not work either.

All of this is not due to some problem of Osmium, but due to the OSM data model with objects referring to other objects, you can not easily just merge such OSM files.

1 Like