I've donwloaded the following maps:
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:
However, the osmconvert shows the following errors after running the above command:
An image: However, the merging perfectly works in Windows 7 and Windows Server 2016 Standard Does anybody know how to solve this error? asked 02 Dec '19, 09:38 CuriosityBeg... |
One Answer:
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:
EDIT: Apparently you can't merge like this with .osm.pbf files. You can with .o5m files. answered 02 Dec '19, 18:19 alester edited 03 Dec '19, 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?Looks like merging only works with format
o5m
and not withpbf
. So you have to convert your files too5m
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
.@scai how can I get exe of osmium-tool? Thanks in advance.
@CuriosityBeginner As far as I know there are no official Windows builds available. Also see related discussions at https://github.com/osmcode/osmium-tool/issues/59 and https://github.com/osmcode/osmium-tool/pull/105. https://github.com/osmcode/osmium-tool#building explains how to build it yourself using Visual Studio C++. On Linux, osmium-tool is available via the package manager on various distributions.
@scai: I would not recommend osmium tool for Windows users. Here the sensible approach is to convert each osm.pbf file into an o5m file (perhaps in a temporary working directory) & then merge them as @alester says.