[GIS] How merge osm files with same ID objects

mergeopenstreetmap

How merge many OSM files with same ID(between files) to one OSM file? I trying OSMCONVERT but he not add object with same ID in other OSM file.

Best Answer

osmconvert, according to the OSM wiki, supports only change files (.osc or .o5c) but can't merge regular .osm files.

You can use osmium for merging:

osmium merge file1.osm file2.osm -o merged.osm.

Or alternatively osmosis:

osmosis --rx 1.osm --rx 2.osm --rx 3.osm --merge --merge --wx merged.osm

Note that for n files you will need n-1 merge commands.

However you should keep in mind that merging files from different dates might not work as expected and can lead to conflicts. I don't know how good these tools can handle this, if at all.

Related Question