<div dir="ltr"><div>Umh, it seems I can answer myself: I should use <b>osmium sort</b> rather than <b>osmium merge</b>!?<br></div><div><br></div><div><div>osmium merge<br> Merge several sorted OSM files into one. Objects in all files must be sorted by type, ID, and version. <br><br>osmium sort <br>Merges the content of all input files given on the command line and sort the result.<br></div><div><span style="font-family:monospace"></span><span style="font-family:monospace"><br></span></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 10, 2020 at 10:19 PM Enrico Liboni <<a href="mailto:eliboni@gmail.com">eliboni@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I'm getting a weird behaviour: I merge <5MB pbfs, when using osmium I get a 8MB img file while with osmosis it is less than 4MB! The latter seems fine since the initial pbfs are less than 5MB. I'd like to use osmium in my scripts since it performs better.</div><div><br></div><div>Am I doing something wrong? Thanks to anyone that could shed some light on this!</div><div><br></div><div># input pbfs<br></div><div><span style="font-family:monospace">-r--r----- 1 enrico enrico 4673440 Jun 10 21:50 malta-latest.osm.pbf<br>-r--r----- 1 enrico enrico 15376 Jun 10 21:50 Malta_lon14.03_14.74lat35.65_36.00_view3.osm.pbf<br>-r--r----- 1 enrico enrico 8300 Jun 10 21:50 Malta_lon14.03_14.74lat36.00_36.18_view3.osm.pbf</span><br><div># using osmium<br></div><div><span style="font-family:monospace"></span><span style="font-family:monospace">$ osmium merge *.pbf -o all.pbf</span><br><span style="font-family:monospace"></span></div><span style="font-family:monospace">$ java -jar ../splitter/splitter.jar --mapid=70000001 all.pbf<br>$ java -jar ../mkgmap/mkgmap.jar --family-id=10030 --product-id=1 --route --remove-short-arcs --bounds=../bounds.zip \<br> --precomp-sea=../sea.zip --location-autofill=is_in,nearest --draw-priority=20 --gmapsupp --index --housenumbers 7000*pbf<br><br>-rw-rw-r-- 1 enrico enrico 4695873 Jun 10 21:54 all.pbf<br>-rw-rw-r-- 1 enrico enrico 428866<b>9</b> Jun 10 21:54 70000001.osm.pbf<br>-rw-rw-r-- 1 enrico enrico <b>7925760</b> Jun 10 21:55 70000001.img<br>-rw-rw-r-- 1 enrico enrico <span style="background-color:rgb(255,0,0)"><b>8171520</b></span> Jun 10 21:55 gmapsupp.img<br><br></span><div># using osmosis<br></div><span style="font-family:monospace">$ ../osmosis/bin/osmosis --rbf ./malta-latest.osm.pbf \<br> --rbf ./Malta_lon14.03_14.74lat35.65_36.00_view3.osm.pbf \<br> --rbf ./Malta_lon14.03_14.74lat36.00_36.18_view3.osm.pbf \<br> --merge --merge --wb all.pbf<br>$ java -jar ../splitter/splitter.jar --mapid=70000001 all.pbf<br>$ java -jar ../mkgmap/mkgmap.jar --family-id=10030 --product-id=1 --route --remove-short-arcs --bounds=../bounds.zip \<br> --precomp-sea=../sea.zip --location-autofill=is_in,nearest --draw-priority=20 --gmapsupp --index --housenumbers 7000*pbf</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">-rw-rw-r-- 1 enrico enrico 4680030 Jun 10 22:03 all.pbf<br>-rw-rw-r-- 1 enrico enrico 428866<b>8</b> Jun 10 22:04 70000001.osm.pbf<br>-rw-rw-r-- 1 enrico enrico <b>3547136</b> Jun 10 22:04 70000001.img<br>-rw-rw-r-- 1 enrico enrico <span style="background-color:rgb(147,196,125)"><b>3788800</b></span> Jun 10 22:04 gmapsupp.img</span><br><br></div><div>Using very latest splitter, mkgmap, and osmium (tried with 1.10 and 1.12 compiled from source...).</div><div>Note both gmapsupp.img seems to work just fine on the garmin device.<br></div></div>
</blockquote></div>