1

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.

asked Jun 24, 2015 at 12:33

1 Answer 1

2

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.

answered Jun 24, 2015 at 14:20
10
  • error: " Node -24 does not have a version attribute as OSM 0.6 are required to have. Is this a 0.5 file?" JOSM saving files without version attribute in new object. Commented Jun 25, 2015 at 7:32
  • That's true. JOSM can't assign a version to a new element. This is done by the main API when uploading the file to the database. I guess you have to add fake versions to your new elements. Commented Jun 25, 2015 at 8:57
  • How add fake version by automatic? Commented Jun 25, 2015 at 12:44
  • I don't know of any existing tool capable of adding fake versions, although there should be other people that run into the same problem in the past. I guess you can add fake versions yourself with a little script in you favorite scripting language. Commented Jun 25, 2015 at 14:10
  • Yes, but i can create little script for set random ID in osm files for OSMCONVERT. :) Commented Jun 26, 2015 at 6:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.