<div dir="ltr"><div>Gerd thanks for the script. I'll give a try. Anyway, when using osmium merge on areas bigger than Malta (Italy + countries around Alps) it works fine and the final img file is the expected one.<br></div><div><br></div><div>On the other side, you wrote:</div><div>> <span class="gmail-im">maybe the two files 70000001.osm.pbf have different bounds?</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">and you hit it!</span></div><div><span class="gmail-im"><b><br></b></span></div><div><span class="gmail-im"><b># Using Osmosis</b><br></span></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ ../osmosis/bin/osmosis --rbf ./malta-latest.osm.pbf --rbf Contours-Malta.pbf --merge --wb all.pbf<br></span></span></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ java -jar ../splitter/splitter.jar --mapid=70000001 all.pbf</span></span><span class="gmail-im"><span style="font-family:monospace"><br>enrico@gling:/opt/osm/tmp$ cat areas.list <br># List of areas<br># Generated Thu Jun 11 23:19:43 CEST 2020<br>#<br>70000001: 1658880,649216 to 1693696,694272<br># : <b>35.595703,13.930664 to 36.342773,14.897461</b></span><br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im"><b>#Using osmium sort</b><br></span></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ osmium sort *.pbf -o all.pbf<br>[======================================================================] 100% <br>enrico@gling:/opt/osm/tmp$ java -jar ../splitter/splitter.jar --mapid=70000001 all.pbf</span></span></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ cat areas.list <br># List of areas<br># Generated Thu Jun 11 22:59:26 CEST 2020<br>#<br>70000001: 1658880,649216 to 1693696,694272<br># : <b>35.595703,13.930664 to 36.342773,14.897461</b></span></span></div><div><span class="gmail-im"><br></span></div><div><b><span class="gmail-im"># While when using "osmium merge"...</span></b></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ osmium merge *.pbf -o all.pbf<br>[======================================================================] 100% <br>enrico@gling:/opt/osm/tmp$ java -jar ../splitter/splitter.jar --mapid=70000001 all.pbf</span></span></div><div><span style="font-family:monospace"><span class="gmail-im">enrico@gling:/opt/osm/tmp$ cat areas.list </span></span></div><div><span style="font-family:monospace"><span class="gmail-im"># List of areas<br># Generated Thu Jun 11 23:17:46 CEST 2020<br>#<br>70000001: 1454080,247808 to 2002944,1394688<br># : <span style="color:rgb(255,0,0)"><b>31.201172,5.317383 to 42.978516,29.926758</b></span><br></span></span></div><div><br></div><div><span class="gmail-im">and thus the latter produces a much bigger img!</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Thus question is...is osmium merge that creates a much bigger area? Or is it splitter that gets confused by something?<br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Attached the logs, around line 40 you can see splitters mentions "Bounding box 13.815377000000002 35.519850000000005 14.856099 36.332958000000005" only when using osmosis or osmium sort. <br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">If anyone is interested to debug this further I can provide the pbf files produced by osmium&osmosis.<br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Enrico<br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 11, 2020 at 6:50 AM Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.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">Hi Enrico,<br>
<br>
I use osmconvert like this in a script:<br>
set input=f:\osm\niedersachsen-latest.osm.pbf<br>
...<br>
rmdir /s/q split<br>
if not exist part.o5m f:\osm\osmconvert --drop-author -B=map.poly %input% -o=part.o5m<br>
if not exist srtm.o5m f:\osm\osmconvert --drop-author -B=map.poly f:\osm\Hoehendaten_Freizeitkarte_EUROPE.osm.pbf -o=srtm.o5m<br>
rem merge<br>
if not exist work.o5m f:\osm\osmconvert part.o5m srtm.o5m -o=work.o5m<br>
java -Xmx4G -jar d:\splitter\dist\splitter.jar --output-dir=split --max-nodes=1000000 --mapid=%mapid%0001 --write-kml=splitter.kml work.o5m > splitter_%dt%-%t%.log<br>
<br>
I create the file map.poly with JOSM (and the poly plugin). Instead of niedersachsen-latest.osm.pbf I can also use a larger file like europe-latest.osm.pbf if needed.<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Enrico Liboni <<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a>><br>
Gesendet: Mittwoch, 10. Juni 2020 23:52<br>
An: Development list for mkgmap<br>
Betreff: Re: [mkgmap-dev] Osmium or Splitter/mkgmap issue?<br>
<br>
Acth...<br>
<br>
* osmium sort "...will take roughly 10 times as much memory as the files take on disk in osm.pbf format" - thus I can't pursue this option when dealing with several countries :(<br>
* osmconvert seems to need o5m, not pbf... I have all pbfs.<br>
<br>
<br>
<br>
On Wed, Jun 10, 2020 at 10:56 PM Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a><mailto:<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>>> wrote:<br>
Hi Enrico,<br>
<br>
I use osmconvert. I am not familar with osmosis and I cannot use osmium on Windows.<br>
sort instead of merge sounds good, but I would expect an error message from splitter when data is not sorted correctly.<br>
You should also check the output from splitter reg. the bounds.<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>>> im Auftrag von Enrico Liboni <<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a><mailto:<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a>>><br>
Gesendet: Mittwoch, 10. Juni 2020 22:49<br>
An: Development list for mkgmap<br>
Betreff: Re: [mkgmap-dev] Osmium or Splitter/mkgmap issue?<br>
<br>
Gerd - however I see no reason why bounds should be different, I use the very same ones. By the way, as per my other email, it seems that usong osmium sort instead of osmium merge does the trick. Perhaps objects are not sorted as osmium merge expects...<br>
<br>
What do you usually use to merge pbfs?<br>
<br>
Thanks!<br>
Enrico<br>
<br>
On Wed, Jun 10, 2020 at 10:27 PM Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a><mailto:<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>><mailto:<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a><mailto:<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>>>> wrote:<br>
Hi Enrico,<br>
<br>
maybe the two files 70000001.osm.pbf have different bounds? If one is much larger the difference could be the additional data for sea and background polygons.<br>
In one command you list the input files, in the other you use *.pbf.<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>><mailto:<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>>>> im Auftrag von Enrico Liboni <<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a><mailto:<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a>><mailto:<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a><mailto:<a href="mailto:eliboni@gmail.com" target="_blank">eliboni@gmail.com</a>>>><br>
Gesendet: Mittwoch, 10. Juni 2020 22:19<br>
An: Development list for mkgmap<br>
Betreff: [mkgmap-dev] Osmium or Splitter/mkgmap issue?<br>
<br>
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.<br>
<br>
Am I doing something wrong? Thanks to anyone that could shed some light on this!<br>
<br>
# input pbfs<br>
-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<br>
# using osmium<br>
$ osmium merge *.pbf -o 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<br>
<br>
-rw-rw-r-- 1 enrico enrico 4695873 Jun 10 21:54 all.pbf<br>
-rw-rw-r-- 1 enrico enrico 4288669 Jun 10 21:54 70000001.osm.pbf<br>
-rw-rw-r-- 1 enrico enrico 7925760 Jun 10 21:55 70000001.img<br>
-rw-rw-r-- 1 enrico enrico 8171520 Jun 10 21:55 gmapsupp.img<br>
<br>
# using osmosis<br>
$ ../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<br>
<br>
-rw-rw-r-- 1 enrico enrico 4680030 Jun 10 22:03 all.pbf<br>
-rw-rw-r-- 1 enrico enrico 4288668 Jun 10 22:04 70000001.osm.pbf<br>
-rw-rw-r-- 1 enrico enrico 3547136 Jun 10 22:04 70000001.img<br>
-rw-rw-r-- 1 enrico enrico 3788800 Jun 10 22:04 gmapsupp.img<br>
<br>
Using very latest splitter, mkgmap, and osmium (tried with 1.10 and 1.12 compiled from source...).<br>
Note both gmapsupp.img seems to work just fine on the garmin device.<br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a>><mailto:<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a>>><br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><mailto:<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a>><br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</blockquote></div>