I've donwloaded the following maps:

andorra-latest.osm.pbf       https://download.geofabrik.de/europe/andorra-latest.osm.pbf
azores-latest.osm.pbf        https://download.geofabrik.de/europe/azores-latest.osm.pbf
cyprus-latest.osm.pbf        https://download.geofabrik.de/europe/cyprus-latest.osm.pbf

And I am using osmconvert to merge maps. I read this answer to merge maps. So my command of merging the above maps looks like this:

.\osmconvert andorra-latest.osm.pbf --out-o5m | .\osmconvert - azores-latest.osm.pbf | .\osmconvert - cyprus-latest.osm.pbf -o=all.osm.pbf

However, the osmconvert shows the following errors after running the above command:

osmconvert Error: unknown file format: standard input
osmconvert Error: could not open input file: .osm.pbf

An image: alt text

However, the merging perfectly works in Windows 7 and Windows Server 2016 Standard

Does anybody know how to solve this error?

asked 02 Dec, 09:38

CuriosityBeginner's gravatar image

CuriosityBeg...
112
accept rate: 0%


According to the documentation, merging files can be done in one shot by listing all of the input files. In your case, the command would be simply:

.\osmconvert andorra-latest.osm.pbf azores-latest.osm.pbf cyprus-latest.osm.pbf -o=all.osm.pbf

EDIT: Apparently you can't merge like this with .osm.pbf files. You can with .o5m files.

permanent link

answered 02 Dec, 18:19

alester's gravatar image

alester
5.2k25578
accept rate: 28%

edited 03 Dec, 17:15

thanks for your reply. However, it says osmconvert Error: more than one.pbf input file is not allowed Maybe you have other suggestions?

(02 Dec, 19:51) CuriosityBeg...
1

Looks like merging only works with format o5m and not with pbf. So you have to convert your files to o5m first: osmconvert andorra-latest.osm.pbf -o=andorra-latest.osm.o5m. Afterwards you can merge them. Not sure if the merge process is able to write them as pbf directly or if you need to write o5m again and convert it to pbf during an additional step.

Alternatively just use the more modern and faster osmium-tool: osmium merge andorra-latest.osm.pbf azores-latest.osm.pbf cyprus-latest.osm.pbf -o all.osm.pbf.

(03 Dec, 15:49) scai ♦
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×276
×38
×28
×4

question asked: 02 Dec, 09:38

question was seen: 72 times

last updated: 03 Dec, 17:15

powered by OSQA