Author |
Topic  |
JBlyth
Aquilotto
  
Australia
239 Posts |
Posted - 07/10/2022 : 07:28:19
|
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 |
 |
|
JBlyth
Aquilotto
  
Australia
239 Posts |
Posted - 09/10/2022 : 06:09:53
|
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 |
 |
|
JBlyth
Aquilotto
  
Australia
239 Posts |
Posted - 12/07/2023 : 09:23:04
|
The son of LKMaps Desktop is about to be released on Github!
Stand by for more information..... |
 |
|
mach02
Pulcino

Czech Republic
36 Posts |
Posted - 07/02/2025 : 10:33:03
|
Dear all, how to merge two files (.LKM) together to one file?
|
 |
|
JBlyth
Aquilotto
  
Australia
239 Posts |
Posted - 15/02/2025 : 13:43:24
|
quote: Originally posted by mach02
Dear all, how to merge two files (.LKM) together to one file?
It may be much easier to use LKMaps Desktop to generate a single area covered by your two .LKM files. |
 |
|
Topic  |
|