Some time ago I have downloaded pbf map (MAP-1) from geofabrik. Since then I have edited this map for my own purposes (mostly added some ways). Now I have downloaded a new map (MAP-2) of a different region and I would like to merge those maps (to further edit them locally).
The problem is, that after using osmosis merge, some of the ways that I have edited in MAP-1 suddenly lead to MAP-2 and back.

What I think happened is that there are node ID conflicts because both maps have a common source, but were later developed independently - I have added some nodes, they got own IDs and official osm MAP-2 was edited at the same time, and nodes with the same IDs were created but in different places. That way depending on the conflict resolution method in osmosis merge command, either the way on the MAP-2 leads to the MAP-1 or vice versa.

Solutions that I have thought about:

  1. Extract changes done by me (either by finding author, or using timestamp) from local MAP-1, download new MAP-1-new, merge MAP-1-new with MAP-2 and add the changes back

  2. Increase IDs of objects that were created by me by a huge number, so that no conflict occurs

Extra suggestions are most welcome.

I have no idea how to implement any of the solutions nor if they are correct. I will be grateful for any hints.

asked 06 May, 13:33

JacekDAC's gravatar image

accept rate: 0%

Are the ways that you have added in some way unsuitable for inclusion in OpenStreetMap?

I think that the strategy used by some of the editing software is to use negative IDs for items that hanve't yet been uploaded to avoid conflicts, but my experience is restricted to user-side stuff, not anything on the backend.

(06 May, 16:09) InsertUser

Yes, the changes are not suitable to be included in OpenStreetMap.

Unfortunately, this is not a case. I run my own OpenStreetMap server and I have published the data there - this means that IDs are not negative.

I think that osmosis --read-apidb-change intervalBegin would be suitable but I need to read file not database. I need something like --read-pbf-change. Of filter by the author

(07 May, 08:07) JacekDAC

I would simply renumber one of the datasets see https://docs.osmcode.org/osmium/latest/osmium-renumber.html (starting with ids that are guaranteed to not conflict with what you have used).

permanent link

answered 07 May, 12:04

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 19%

edited 07 May, 12:04

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 May, 13:33

question was seen: 145 times

last updated: 07 May, 12:04

powered by OSQA