<div dir="ltr">what is the difference between osm2garmin from frank, and the scripting from mkgmap dev crew ,<div><br></div><div>as the osm2garmin is not rebooting my garmin nuvi 1450lmt</div><div><br></div><div>but the map of australia is rebooting my nuvi </div><div><br></div><div>any ideas </div><div><br></div><div><br></div><div><div>@echo off</div><div><br></div><div>rem --------------------------------------------------</div><div>rem --- CreateIMG.bat - By Marco Certelli - Beta07 ---</div><div>rem --------------------------------------------------</div><div><br></div><div>rem **** Define your default country ****</div><div><br></div><div>set country=australia-latest</div><div><br></div><div>rem *************************************</div><div><br></div><div>rem Available styles: drivemap, kleineisel, masterstyle, default, marine, noname, test</div><div>set style=drivemap</div><div><br></div><div>rem Available TYPfiles: DRIVEMAP.TYP, KLEINEISEL.TYP, MASTER.TYP, TEDDY.TYP, DOM.TYP</div><div>set typfile=here201530.TYP</div><div><br></div><div>rem Put AddTypToIMG=yes to add TYPfile to gmapsupp.img (so it is active in garmin too)</div><div>set AddTypToIMG=yes</div><div><br></div><div>rem MapSource Family-ID: must be a unique (in mapsource) 3 digit number (000 to 999)</div><div>set FID=923</div><div><br></div><div>rem MSDir shall contain the &quot;existing&quot; directory where mapsource installs maps</div><div>rem Next usually results in MSDir=C:\\Garmin</div><div>set MSDir=%systemdrive%\\Garmin</div><div><br></div><div>rem Next usually results in MSDir=C:\\Program Files\\Garmin</div><div>rem set MSDir=%ProgramFiles%</div><div>rem set MSDir=%MSDir:\=\\%</div><div>rem set MSDir=%MSDir%\\Garmin</div><div><br></div><div>rem Available continents: europe, africa, asia, north-america, south-america</div><div>set continent=</div><div><br></div><div>rem Just leave debug=no for production &amp; to delete intermediate temporary files.</div><div>set debug=no</div><div><br></div><div><br></div><div>echo.</div><div>echo ******************************************************</div><div>echo * This script downloads (if needed) and compiles the *</div><div>echo * OSM map data to generate a Garmin IMG routable map *</div><div>echo ******************************************************</div><div>echo.</div><div><br></div><div>rem Override default country if a name is given to the batch as parameter</div><div>if &quot;%1&quot; NEQ &quot;&quot; set country=%1</div><div><br></div><div>rem Ask user for a country name if no default and no parameter is set</div><div>if &quot;%country%&quot; NEQ &quot;&quot; goto :Search4Map </div><div>set /P country=&quot;Enter the country to build: &quot;</div><div>echo.</div><div><br></div><div>:Search4Map</div><div><br></div><div>if NOT EXIST OSM-Data mkdir OSM-Data</div><div>cd OSM-Data</div><div><br></div><div>rem 1) search for xxx.osm file</div><div> rem set osmfile=%country%.osm</div><div> rem if EXIST %osmfile% echo File OSM-Data\%osmfile% found (no download required)</div><div>rem  if EXIST %osmfile% GOTO :SplitMap</div><div><br></div><div>rem 2) search for xxx.osm.bz2 file</div><div> rem set osmfile=%country%.osm.bz2</div><div> rem if EXIST %osmfile% echo File OSM-Data\%osmfile% found: delete it for a new download</div><div> rem if EXIST %osmfile% GOTO :SplitMap</div><div><br></div><div>rem 3) search for xxx.osm.pbf file</div><div> set osmfile=%country%.osm.pbf</div><div> if EXIST %osmfile% echo File OSM-Data\%osmfile% found: delete it for a new download</div><div> if EXIST %osmfile% GOTO :SplitMap</div><div><br></div><div>echo.</div><div>echo Downloading OSM data for %country% </div><div>echo.</div><div><br></div><div>..\bin\wget <a href="http://download.geofabrik.de/openstreetmap/%continent%/%osmfile%">http://download.geofabrik.de/openstreetmap/%continent%/%osmfile%</a></div><div><br></div><div>if EXIST %osmfile% goto :SplitMap</div><div>echo.</div><div>echo *************************************************************</div><div>echo *** SORRY: download of /%continent%/%osmfile% has FAILED!!!</div><div>echo *** Check at <a href="http://download.geofabrik.de/osm/%continent%/">http://download.geofabrik.de/osm/%continent%/</a></div><div>echo *** and manually download %osmfile%</div><div>echo *************************************************************</div><div>echo.</div><div>goto :END</div><div><br></div><div><br></div><div>:SplitMap</div><div><br></div><div>echo.</div><div>echo Start converting %country% OSM data into IMG Map...</div><div><br></div><div>if NOT EXIST ..\IMG-OSM-%country% mkdir ..\IMG-OSM-%country%</div><div>cd ..\IMG-OSM-%country%</div><div><br></div><div>if EXIST template.args goto :Compile</div><div><br></div><div>echo.</div><div>echo Splitting OSM-Data\%osmfile%. Please wait</div><div>echo.</div><div><br></div><div>rem start /low /b /wait java -enableassertions -Xmx1000m -jar ..\bin\splitter.jar --mapid=66%FID%001 --max-nodes=1000000 ..\OSM-Data\%osmfile%</div><div><br></div><div>rem start /low /b /wait java -enableassertions -Xmx1250m -jar ..\bin\splitter.jar --mapid=66%FID%001 --output=xml ..\OSM-Data\%osmfile%</div><div>start /low /b /wait java -enableassertions -Xmx900m -jar ..\bin\splitter.jar --mapid=66%FID%001 ..\OSM-Data\%osmfile% --output=xml   --max-nodes=300000 --problem-report --keep-complete=true  --status-freq=120</div><div><br></div><div>:Compile</div><div><br></div><div>echo.</div><div>echo Compiling OSM-Data\%osmfile% into IMG, FID=%FID%. Please wait</div><div>echo.</div><div><br></div><div>set TypFileToAdd=</div><div>if &quot;%AddTypToIMG%&quot; NEQ &quot;yes&quot; goto :NoTypToAdd</div><div>copy &quot;..\bin\typ\%typfile%&quot; style.typ 2&gt;nul 1&gt;nul</div><div>..\bin\TYPtool %FID% 1 style.typ &gt;nul</div><div>set TypFileToAdd=style.typ</div><div><br></div><div>:NoTypToAdd</div><div><br></div><div>rem start /low /b /wait java -enableassertions -Xmx1000m -jar ..\bin\mkgmap.jar --country-name=&quot;%country%&quot; --family-id=%FID% --mapname=66%FID%001 --overview-mapname=66%FID%000 --series-name=&quot;OSM-%country%&quot; --family-name=&quot;OpenStreetMap: %country%&quot; --style-file=..\bin\styles\ --style=%style% --description=&quot;%country%&quot; -c ..\bin\template_basic.args -c template.args %TypFileToAdd%</div><div>rem start /low /b /wait java -enableassertions -Xmx600m -jar ..\bin\mkgmap.jar  --transparent --check-roundabouts --link-pois-to-ways  --make-poi-index --reduce-point-density=2.6 --reduce-point-density-polygon=8   --index --levels=0:24,1:22,2:20,3:18,4:16,5:14 --make-poi-index --route  --verbose --country-name=&quot;%country%&quot; --family-id=%FID% --mapname=66%FID%001 --overview-mapname=66%FID%000 --series-name=&quot;OSM-%country%&quot; --family-name=&quot;OpenStreetMap: %country%&quot; --style-file=..\bin\styles\ --style=%style% --description=&quot;%country%&quot; -c ..\bin\template_basic.args -c template.args %TypFileToAdd%</div><div>rem start /low /b /wait java -enableassertions -Xmx700m -jar ..\bin\mkgmap.jar  --process-destination  --add-pois-to-areas  --pois-to-areas-placement=tagelist --add-pois-to-lines --tdbfile --transparent --make-poi-index --reduce-point-density=2.6 --reduce-point-density-polygon=4   --index --levels=0:24,1:22,2:20,3:18,4:16,5:14 --make-poi-index  --verbose --route --country-name=&quot;%country%&quot; --family-id=%FID% --mapname=66%FID%001 --overview-mapname=66%FID%000 --series-name=&quot;OSM-%country%&quot; --family-name=&quot;OpenStreetMap: %country%&quot; --style-file=..\bin\styles\ --style=%style% --description=&quot;%country%&quot; -c ..\bin\template_basic.args -c template.args %TypFileToAdd%</div><div><br></div><div>start /low /b /wait java -enableassertions -Xmx800m -jar ..\bin\mkgmap.jar   --bounds=..\boundary\ --housenumbers --overview-levels  --link-pois-to-ways --polygon-size-limits=&quot;24:12, 18:10, 16:8, 14:4, 12:2, 11:0&quot;   --process-exits  --merge-lines --add-pois-to-areas --style=default --pois-to-areas-placement=tagelist --add-pois-to-lines --tdbfile --transparent --reduce-point-density=2.6 --reduce-point-density-polygon=4   --index --levels=0:24,1:22,2:20,3:18,4:16,5:14  --verbose --route --country-name=&quot;%country%&quot; --family-id=%FID% --mapname=66%FID%001 --overview-mapname=66%FID%000 --series-name=&quot;OSM-%country%&quot; --family-name=&quot;OpenStreetMap: %country%&quot; --style-file=..\bin\styles\ --style=%style% --description=&quot;%country%&quot; -c ..\bin\template_basic.args -c template.args %TypFileToAdd%</div><div><br></div><div>if EXIST 66%FID%001.img goto :Cleanup</div><div>echo.</div><div>echo ***********************************************</div><div>echo *** SORRY: IMG compiling task has FAILED!!! ***</div><div>echo ***********************************************</div><div>echo.</div><div>goto :END</div><div><br></div><div><br></div><div>:Cleanup</div><div><br></div><div>if &quot;%debug%&quot; NEQ &quot;no&quot; goto :MSPrepare</div><div>del *.gz 2&gt;nul</div><div>del *.pbf 2&gt;nul</div><div>del areas.list 2&gt;nul</div><div>del template.args 2&gt;nul</div><div><br></div><div>if EXIST %MSDir% goto :MSPrepare</div><div>echo.</div><div>echo MapSource Install files not prepared (&quot;%MSDir%&quot; not existing)</div><div>goto :END</div><div><br></div><div><br></div><div>:MSPrepare</div><div><br></div><div>echo.</div><div>echo Preparing MapSource Install (.reg)</div><div>echo.</div><div><br></div><div>copy ..\bin\typ\%typfile% style.typ 2&gt;nul 1&gt;nul</div><div><br></div><div><br></div><div>rem preparing MapSource installer registry</div><div><br></div><div>echo Windows Registry Editor Version 5.00 &gt; IMG-OSM-%country%_MSInstall.reg</div><div>echo. &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div><br></div><div>echo [HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\Mapsource\Families\IMG-OSM-%country%] &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>rem TYPtool &lt;family_id&gt; &lt;product_id&gt; &lt;stylefile&gt;</div><div>..\bin\TYPtool %FID% 1 style.typ &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>if EXIST style.typ echo &quot;TYP&quot;=&quot;%MSDir%\\IMG-OSM-%country%\\style.typ&quot; &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>echo. &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div><br></div><div>echo [HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\Mapsource\Families\IMG-OSM-%country%\1] &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>echo &quot;BMAP&quot;=&quot;%MSDir%\\IMG-OSM-%country%\\66%FID%000.img&quot; &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>echo &quot;LOC&quot;=&quot;%MSDir%\\IMG-OSM-%country%&quot; &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div>echo &quot;TDB&quot;=&quot;%MSDir%\\IMG-OSM-%country%\\66%FID%000.tdb&quot; &gt;&gt; IMG-OSM-%country%_MSInstall.reg</div><div><br></div><div>rem preparing un-installer registry</div><div><br></div><div>echo Windows Registry Editor Version 5.00 &gt; IMG-OSM-%country%_MSUnInstall.reg</div><div>echo. &gt;&gt; IMG-OSM-%country%_MSUnInstall.reg</div><div><br></div><div>echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Garmin\Mapsource\Families\IMG-OSM-%country%] &gt;&gt; IMG-OSM-%country%_MSUnInstall.reg</div><div><br></div><div><br></div><div>:END</div><div><br></div><div>cd..</div><div><br></div><div>echo.</div><div>echo ********************************************</div><div>echo *** CreateIMG Script End - Press any key ***</div><div>echo ********************************************</div><div><br></div><div>if &quot;%1&quot; EQU &quot;&quot; pause &gt;nul</div></div><div><br></div><div><br></div><div>stephen galowski</div><div><br></div></div>