1

I have installed nominatim for Maldives and now I want to install for Sri Lanka in the same db. According to lonvia i found it is fast that i merge below both files and then do the import.

I have sri-lanka-latest.osm.pbf and maldives-latest.osm.pbf two pbf files and i tried to merge these two with osmconvert command. I have read Osmconvert in the wiki and osm help questions but could not find the answer.

Then i converted these two files to .o5m files separately using osmconvert and then merged those both files. Is that what I should do?

Thanks in Advance.

asked 25 Mar '16, 09:54

Tharaka%20Rajith's gravatar image

Tharaka Rajith
26235
accept rate: 0%

edited 28 Mar '16, 08:08


3 Answers:
7

Merging two PBF files can be done in one run, using concatenated processes:

osmconvert region1.pbf --out-o5m | osmconvert - region2.pbf -o=all.pbf

Further examples and explanations can be found at OSM Wiki page:

https://wiki.openstreetmap.org/wiki/Osmconvert#Parallel_Processing

permanent link

answered 26 Mar '16, 07:57

Marqqs's gravatar image

Marqqs
448510
accept rate: 22%

Even better, thanks. I added a link from the Nominatim documentation to this thread.

(27 Mar '16, 19:08) mtmail
2

this is the answer i was looking for, works like a charm, thanks

(28 Mar '16, 07:12) Tharaka Rajith
4

This should work:

  1. osmconvert country1.osm.pbf -o=country1.o5m
  2. osmconvert country2.osm.pbf -o=country2.o5m
  3. osmconvert country1.o5m country2.o5m -o=together.o5m
  4. osmconvert together.o5m -o=together.osm.pbf

and then import together.osm.pbf with Nominatim.

permanent link

answered 25 Mar '16, 15:27

mtmail's gravatar image

mtmail
3.8k1059
accept rate: 30%

If you want to merge more than one file, the most voted option isn't really working for me. It only stores the content of the last 2 files.

You could make this shorter by converting all your .osm.pbf to .o5m and then do osmconvert *.o5m -o=together.osm.pbf so it gets all .o5m files.

(30 Nov '18, 13:36) xarly89

This answer should be treated with more love!:)

(03 Dec '19, 15:14) CuriosityBeg...
4

Or you can use osmium-tool:

osmium merge country1.osm.pbf country2.osm.pbf -o together.osm.pbf.

permanent link

answered 25 May '17, 07:11

Jochen%20Topf's gravatar image

Jochen Topf
4.6k54665
accept rate: 32%

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:

×591
×51
×41
×32
×2

question asked: 25 Mar '16, 09:54

question was seen: 13,722 times

last updated: 03 Dec '19, 15:18

powered by OSQA