PostFrontal Forum
PostFrontal Forum
LK8000_Support_Forum | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 LK8000 International Support
 General Support
 LKMAPS Desktop
 New Topic  Reply to Topic
Previous Page
Author Previous Topic Topic Next Topic
Page: of 8

JBlyth
Aquilotto

Australia
229 Posts

Posted - 07/10/2022 :  07:28:19  Show Profile  Visit JBlyth's Homepage  Reply with Quote
I have found a way of generating .osm.pbf files that span multiple countries by using the osmconvert64-0.8.8p.exe utility. https://wiki.openstreetmap.org/wiki/Osmconvert#Parallel_Processing

Here is a batch file that converts them to .o5m files, then joins them together in a single .osm.pbf file for use with LK8000 to generate the OFF-LINE topology file for use with LKmaps. Name the batch file to what ever you like and run it with no parameters to get the correct syntax.

It's crude but effective......

@echo off
IF "%1%"=="" goto Help

set File1=%1%.osm
set File2=%2%.osm

echo osmconvert64-0.8.8p.exe %File1%.pbf -o=%File1%.o5m
start /wait osmconvert64-0.8.8p.exe %File1%.pbf -o=%a%%File1%.o5m
echo osmconvert64-0.8.8p.exe %File2%.pbf -o=%File2%.o5m
start /wait osmconvert64-0.8.8p.exe %File2%.pbf -o=%File2%.o5m

IF NOT "%5%"=="" goto FourFiles
IF NOT "%4%"=="" goto ThreeFiles
goto TwoFiles

:TwoFiles
echo Converting 2 files
set FileOutput=%3%.osm
echo osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m -o=%FileOutput%.pbf
start /wait osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m -o=%FileOutput%.pbf
goto end

:ThreeFiles
echo Converting 3 files
set File3=%3%.osm
set FileOutput=%4%.osm
echo osmconvert64-0.8.8p.exe %File3%.pbf -o=%File3%%.o5m
start /wait osmconvert64-0.8.8p.exe %File3%.pbf -o=%File3%%.o5m
echo osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m %File3%.o5m -o=%FileOutput%.pbf
start /wait osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m %File3%.o5m -o=%FileOutput%.pbf
goto end

:FourFiles
echo Converting 4 files
set File3=%3%.osm
set File4=%4%.osm
set FileOutput=%5%.osm
echo osmconvert64-0.8.8p.exe %File3%.pbf -o=%File3%.o5m
start /wait osmconvert64-0.8.8p.exe %File3%.pbf -o=%File3%.o5m
echo osmconvert64-0.8.8p.exe %File4%.pbf -o=%File4%.o5m
start /wait osmconvert64-0.8.8p.exe %File4%.pbf -o=%File4%.o5m
echo osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m %File3%.o5m %File4%.o5m -o=%FileOutput%.pbf
start /wait osmconvert64-0.8.8p.exe %File1%.o5m %File2%.o5m %File3%.o5m %File4%.o5m -o=%FileOutput%.pbf
goto end

:Help
echo.
echo Usage:- GenerateLK8000File.bat FileNameOne FilenameTwo OutputFileName [DO NOT INCLUDE FILE EXTENSIONS]
echo [DO NOT INCLUDE FILE EXTENSIONS] Up to four .osm.pbf files may be joined
echo.
goto end

:end
set File1=
set File2=
set File3=
set File4=
set FileOutput=
pause

Edited by - JBlyth on 08/10/2022 07:19:35
Go to Top of Page

JBlyth
Aquilotto

Australia
229 Posts

Posted - 09/10/2022 :  06:09:53  Show Profile  Visit JBlyth's Homepage  Reply with Quote
I'm learning a little more about osmconvert64-0.8.8p.exe....

It takes about 18-20 minutes, but may be quicker than waiting for LKMaps Desktop to do it internally. I used this command to extract a fairly large area of France and small sections of Switzerland and Italy using coordinates, then used it for Offline Topology:-

TO EXTRACT AREA FROM LARGE MAP:-
Syntax:- InputFileName.osm.pbf -b=Southwest-Long1,Southwest-Lat1,Northwest-Long2,Northwest-Lat2 -o=Outputfile.osm.pbf

osmconvert64-0.8.8p.exe europe-latest.osm.pbf -b=1.39233,42.99538,6.86295,47.18854 -o=France-Sudx.osm.pbf

Edited by - JBlyth on 09/10/2022 14:19:27
Go to Top of Page

JBlyth
Aquilotto

Australia
229 Posts

Posted - 12/07/2023 :  09:23:04  Show Profile  Visit JBlyth's Homepage  Reply with Quote
The son of LKMaps Desktop is about to be released on Github!

Stand by for more information.....
Go to Top of Page
Page: of 8 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
Jump To:
PostFrontal Forum © PostFrontal - La community del Volo a Vela Go To Top Of Page
This page was generated in 0.14 seconds. Snitz Forums 2000

Since 2006, owned and maintained by PostFrontal S.A.S. di Giuliano Golfieri & c. - VAT ID: IT05264240960
THIS WEBSITE ONLY USES FUNCTIONAL COOKIES
Privacy & Cookie Policy