Convert OSM data to Navit binfile

来源:互联网 发布:centos samba安装配置 编辑:程序博客网 时间:2024/06/06 20:17

Convert OSM data to Navit binfile

The following examples assume that you have installed Navit system-wide. If this is not the case, you will need to provide an absolute path to the maptool executable, which is in the navit/maptool folder.

Please also note, that maptool uses country multipolygon relations. So it's a good idea to include the whole country boundary to your dataset. You can use the josm editor to download the country boundary relation and save it as osm file. Then this file can be concatenated with your sub-country level excerpt.

From .osm
cat my_OSM_map.osm | maptool my_Navit_map.bin

Or

maptool -i my_OSM_map.osm my_Navit_map.bin

Or for multiple OSM data files use the --dedupe-ways option to avoid duplication of way data if a way occurs multiple times in the OSM maps.

cat my_OSM_map1.osm my_OSM_map2.osm my_OSM_map3.osm | maptool --dedupe-ways my_Navit_map.bin
From .bz2
bzcat my_OSM_map.osm.bz2 | maptool my_Navit_map.bin
From .pbf

Functionality only available in SVN versions of Navit later than r3871, which does not include the official Navit release 0.2.0

maptool --protobuf -i my_OSM_map.osm.pbf my_Navit_map.bin
原创粉丝点击