Difference between revisions of "OpenStreetMap"

From Navit's Wiki
Jump to: navigation, search
m (Processing yourself a small area)
m (Removed links to services that don't work anymore)
 
(114 intermediate revisions by 53 users not shown)
Line 1: Line 1:
[http://www.openstreetmap.org/ '''OpenStreetMap'''] is a free editable map of the whole world. It is made by people like you.
+
[http://www.openstreetmap.org OpenStreetMap] is a free editable map of the whole world. It is made by people like you. OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth. Maps from OpenStreetMap can be used in Navit.
  
OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
+
==Quick Start==
 +
# Go to [http://maps.navit-project.org/ Navit Planet Extractor] (http://maps.navit-project.org/)
 +
# Zoom in and select the area that you are interested in. Use the 'Map Controls' on the right to switch between 'Navigation' and 'Select' modes. or use preselected areas:
 +
* [http://maps.navit-project.org/api/map/?bbox=5.185546875,46.845703125,15.46875,55.634765625 Germany]
 +
* [http://maps.navit-project.org/api/map/?bbox=-5.44921875,42.01171875,8.437500000000002,51.6796875 France]
 +
* [http://maps.navit-project.org/api/map/?bbox=2.08740234375,48.8671875,7.778320312500001,54.51416015625 BeNeLux]
 +
* [http://maps.navit-project.org/api/map/?bbox=-11.0302734375,34.87060546875,4.614257812500003,44.40673828125 Spain/Portugal]
 +
* [http://maps.navit-project.org/api/map/?bbox=6.52587890625,36.38671875,18.96240234375,47.197265625 Italy]
 +
* [http://maps.navit-project.org/planet.bin Entire planet] (curr. 10GB!)
 +
# Hit '''Get Map!'''
 +
# Move the downloaded map to the directory of your choice, and add it to the active the mapset (see [[Configuration]]) in navit.xml with a line similar to the following:
  
And you can use their maps in NavIt!
+
<mapset>
 +
  <map type="binfile" enabled="yes" data="/path/to/your/map/osm_bbox.bin" />
 +
</mapset>
  
==Getting a OSM map==
+
===Add OSM map to your mapset===
 +
Move the downloaded map to the directory of your choice, and add it to the active mapset (see [[Configuration]]) in navit.xml with a line similar to the following:
  
If you want to learn more about the format used in conversion, for example to write a tool to extract a specific area, please have a look at [[Navit's binary map driver]].
+
<mapset>
 +
  <map type="binfile" enabled="yes" data="/path/to/your/map/my_downloaded_map.bin" />
 +
</mapset>
  
==Pre-processed OSM Navit Maps==
+
==Topographic Maps==
 +
Navit will display elevation/height lines but the required data is not included in most OSM derived maps.
  
Pre-processed OSM maps in Navit's binary format are available from [http://downloads.cloudmade.com downloads.cloudmade.com].  Files are updated once a week and are available for all countries of the world.
+
Navit compatible maps with height lines can be created by feeding the output of Phyghtmap (http://wiki.openstreetmap.org/wiki/Phyghtmap, http://katze.tfiu.de/projects/phyghtmap/) to Navit's maptool. Alternatively the SRTM data can be downloaded in osm.xml format http://geoweb.hft-stuttgart.de/SRTM/srtm_as_osm/, avoiding the Phygtmap step. The information can be either merged with OSM derived maps or used in a separate layer.
  
===Processing yourself a small area===
+
Many Garmin type maps such as http://www.wanderreitkarte.de/garmin_de.php also have the height lines information but routing will not work with them.
  
You will need to do the following :
+
==Processing OSM Maps Yourself==
 +
You can create your own Navit binfiles from OSM data very easily using [[maptool]], the conversion program which installs alongside Navit. ''maptool'' can process both OpenStreetMap XML Data files (*.osm files) and OpenStreetMap Protobuf Data files (*.pbf files) Follow these steps to process your own maps.
  
Grab a map from [http://www.openstreetmap.org/ OpenStreetMap] :
+
===Download your own OSM data===
 +
{{note
 +
|Navit 0.2.0 cannot process OpenStreetMap Protobuf Data files - for this functionality, please upgrade to one of the [[Download_Navit| latest SVN builds or build from SVN source]]. Functionality was added in {{revision|3871}}.
 +
}}
  
<code>wget -O map.osm http://xapi.openstreetmap.org/api/0.5/map?bbox=11.4,48.7,11.6,48.9</code>
+
OSM data can be downloaded from a variety of sources. OpenStreetMap XML Data files are regular textfiles, easily editable in any text editor. OpenStreetMap Protobuf Data files are binary files, which take up less space (so are quicker to download and process) but are not editable.
  
Of course, adjust the bbox to the area you want to grab. Use a small area, or the grab may fail.
+
* '''OpenStreetMap XML Data'''
To choose the area you can use [http://informationfreeway.org/ The Information Freeway]. After you get the coordinates of the area you want to download, put them in the wget command line. The syntax is:
+
** [http://download.geofabrik.de/osm/ Geofabrik] provides pre-processed OpenStreetMap XML Data files of almost all countries, and all continents. This method is probably the easiest way of downloading OpenStreetMap XML Data for an entire country or continent. Note that the OSM files are bzipped
?bbox=<bllon,bllat,trlon,trlat>, that is lon,lat order which is the inverse of what shown by Information Freeway (lat,lon).
+
** [http://planet.openstreetmap.org planet.openstreetmap.org] hosts the complete data set (the whole world). You can use [http://wiki.openstreetmap.org/index.php/Osmosis Osmosis] to cut it into smaller chunks.
 +
** [http://wiki.openstreetmap.org/wiki/Xapi OpenStreetMap ReadOnly (XAPI)] The API allows to get the data of a specific bounding box, so that download managers can be used. For example:
 +
wget -O map.osm "http://xapi.openstreetmap.org/api/0.6/map?bbox=11.4,48.7,11.6,48.9"
 +
** [http://www.openstreetmap.org/export OpenStreetMap (visual)] allows you to select a small rectangular area and download the selection as OpenStreetMap XML Data.
 +
*'''OpenStreetMap Protobuf Data'''
 +
** [http://download.geofabrik.de/osm/ Geofabrik] provides pre-processed OpenStreetMap Protobuf Data files of almost all countries, and all continents.
  
Once you have the map.osm, parse it. There is a command for that in the navit/ folder after you have built the svn version.
+
===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.
  
<code>cat map.osm | ./osm2navit  mymap.bin</code>
+
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.
  
You can also process more than one map at once, but then you need the option --dedupe-ways for osm2navit to avoid duplication of way data if a way occurs multiple times.
+
=====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 <tt>--dedupe-ways</tt> 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
  
<code>cat map1.osm map2.osm map3.osm | navit/src/osm2navit --dedupe-ways mymap.bin</code>
+
=====From .bz2=====
 +
bzcat my_OSM_map.osm.bz2 | maptool my_Navit_map.bin
  
===Getting a pre-processed planet.osm===
+
=====From .pbf=====
 +
''Functionality only available in SVN versions of Navit later than {{revision|3871}}, which does not include the official Navit release 0.2.0''
 +
maptool --protobuf -i my_OSM_map.osm.pbf my_Navit_map.bin
  
This map should be updated every Saturday. Size is currently around 1.8GB <!-- as of 2009/03/02 -->
+
===Processing the whole Planet===
 +
The OpenStreetMap wiki [http://wiki.openstreetmap.org/index.php/Planet.osm Planet.osm] page lists mirrors where Planet.osm can be downloaded. There are also downloads of smaller areas such as the UK and parts of Europe. These smaller excerpts are a lot quicker to download and process.
  
==== Primary Download Location ====
+
In case you want the whole planet.osm (24GB in December 2012), it is even possible to process planet.osm. It will take about 7 hours , requires > 1GB of main memory and about 30 GB disk space for result and temp files - planet.bin is currently (as of December 2012) 9.6GB:
  
* http://maps.navit-project.org/
+
bzcat planet.osm.bz2 | maptool -6 my_Navit_map.bin
* http://maps.navit-project.org/download/
 
===== Quicklinks =====
 
* Planet (~1.7GiB): wget http://maps.navit-project.org/planet.bin 
 
* Europe (~550MiB): wget -O eu.bin 'http://maps.navit-project.org/api/map/?bbox=-12.963867187500007,33.59619140625,34.1455078125,72.09228515625'
 
* Germany (~250MiB): wget -O germany.bin 'http://maps.navit-project.org/api/map/?bbox=5.185546875,46.845703125,15.46875,55.634765625'
 
* France (~140MiB): wget -O france.bin 'http://maps.navit-project.org/api/map/?bbox=-5.44921875,42.01171875,8.437500000000002,51.6796875'
 
* BeNeLux (~90MiB): wget -O benelux.bin 'http://maps.navit-project.org/api/map/?bbox=2.08740234375,48.8671875,7.778320312500001,54.51416015625'
 
* Spain/Portugal (~41MiB): wget -O spainportugal.bin 'http://maps.navit-project.org/api/map/?bbox=-11.0302734375,34.87060546875,4.614257812500003,44.40673828125'
 
* Italy (~61 Mb <!-- as of 2009/03/02 --> ): wget -O italy.bin 'http://maps.navit-project.org/api/map/?bbox=6.52587890625,36.38671875,18.96240234375,47.197265625'
 
  
 +
Please note -6 option (long name --64bit) used above. It should be used always if output bin file grows above 4GB, or generated file will not work at all. Using that option on smaller files slightly increases their size and makes them unreadable by some unzip versions.
  
==== Other Download Locations ====
+
==Tips==
 +
{{note
 +
|To increase performance of Navit use maps for only the country or state you are interested in.
 +
}}
 +
* To enable a map you have downloaded refer [[OpenStreetMap#Adding_an_OSM_map_to_your_mapset| adding OSM map to navit.xml]]
 +
* If you don't see any map data in Navit (assuming your map is properly specified in navit.xml) using the Internal GUI click anywhere on the screen to bring up the menu. Click on "Actions" and then "Town". Type in the name of a town that should be within your map data. Select your town from the list that appears. This will bring up a sub-menu where you can click "View On Map". Note that if you have a GPS receiver you can also just wait till you get a satellite lock.
 +
* To avoid changing navit.xml if you update your maps and the maps have different file names use the wildcard (*.bin) in your navit.xml file. For example:
 +
<map type="binfile" enabled="yes" data="/media/mmc2/maps/*.bin"/>
  
* http://dev.openstreetmap.org/~deelkar/maps/ has maps for Europe, and several individual European countries
 
* http://downloads.cloudmade.com/ <-- weekly updated OSM XML files
 
  
===Processing yourself the whole world, planet.osm===
+
==See also==
 +
* [[binfile]]
  
In case you want the whole planet.osm, and you can't or don't want to fetch it from the previous link, it is even possible to process planet.osm. It will take about 30 minutes, requires > 1GB of main memory and about 3 GB disk space for result and temp files:
 
  
<code>bzcat planet.osm.bz2 | navit/src/osm2navit mymap.bin</code>
+
==Problems with OSM==
  
The OpenStreetMap wiki [http://wiki.openstreetmap.org/index.php/Planet.osm Planet.osm] page lists mirrors where Planet.osm can be downloaded. There are also downloads of smaller areas such as the UK and parts of Europe. These smaller excepts are a lot quicker to download and process.
+
=== Search doesn't work ===
 +
Now maptool uses country boundary multipolygon relations for detecting town membership. Sometimes this isn't an option, because the boundaries are not closed or wrong.
  
==Adding an OSM map to your mapset==
+
When there's no multipolygon around the town, maptool will attempt to use is_in tags. It only knows about a few OSM [http://wiki.openstreetmap.org/wiki/Key:is_in is_in tags]. Please help the osm community to fix the country boundary.
Once you have your map from one of the 3 methods;
+
=== Search is totally b0rkz0r3d! Or, behaves very strangely vs other navigation software. ===
 +
OK, so the country you're searching '''is''' [[OpenStreetMap/countries |listed in the table]]. Search probably will work. But be aware there are some quirks.
  
Now add a map source to your [[Configuring_NavIt|navit.xml]]:
+
First, there is no "Search" button--searches will '''begin automatically''' as you fill in the gtk dialogue. Note there are minimum string length requirements. For instance the Town search only "activates" after 3 characters are typed, to prevent a huge number of results (which would take a lot of CPU time to find and display). If you really need to search for two character towns, you'll have to modify the navit source code.
  
<code><map type="binfile" enabled="yes" data="/path/to/mymap.bin" /></code>
+
Also, Navit's search process '''is hierarchical'''. Meaning you must search for and select a valid Country, then select a Town, then select a Street. Right now, zipcode and district searches are unimplemented; only Country, Town, Street and Housenumber actually work. Furthermore, there is no US State or County information; when searching for a US town, you may get hits from all over the US with planet.bin, and unfortunately, the states that each hit is in are not displayed. You basically have to use the Map button to examine them one-by-one, until you find the one you want (or, only travel to towns with unique names).
  
And navit will now be able to read your OSM maps.
+
The dialogue sometimes moves the cursor between text boxes automatically. This can be pretty annoying.
  
(Note that since September 2007, NavIt is provided with a demo map of Munich.)
+
Finally, there are a couple ways to crash (segfault) navit inside the search dialogue.
  
==See also==
+
The developers are aware of these issues and plan to improve behaviour (this will happen faster if you send a patch!)
* [http://wiki.openstreetmap.org/index.php/Navit-tilesathome.xml Navit in T@H-Look (modified navit.xml) ]
 
[[category:maps]]
 
  
==Problems with OSM and navit or navigation in general==
+
=== Search for my town works, but I can't find my street ===
  
=== Search doesn't work in most countries ===
+
Maptool since April, 2013 uses polygones and multipolygon relations tagged with place=town/city/village etc to find place border.
This is because osm2navit only knows about a few is_in tags. To fix this, look for a reliable is_in tag in the towns in your country. If there is none, contact us, we have some scripts which can help adding one in this case. Then add the tag (at most 3 per country) to this page. Unfortunately using the country border for detecting the membership of a town also isn't an option, because the boundaries are usually not closed or wrong.
 
  
=== Search is totally b0rkz0r3d! Or, behaves very strangely vs other navigation software. ===
+
Please note, there anyway should be a node tagged with the same name as surrounding [multi]polygon for town to be findable. If town boundary is found, it will be used as a limit for the street search.  
OK, so the country you're searching '''is''' listed in the table below. Search probably will work. But be aware there are some quirks.
 
  
First, there is no "Search" button--searches will begin automatically as you fill in the gtk dialogue. Note there are minimum string length requirements. For instance the Town search only "activates" after 3 characters are typed, to prevent a huge number of results (which would take a lot of CPU time to find and display). If you really need to search for two character towns, you'll have to modify the navit source code.
+
Otherwise, city limit will be guessed by the place rank (city/town/village). This will often lead to streets not being found or found in neighboring places.
  
Also, Navit's search process is hierarchical. Meaning you must search for and select a valid Country, then select a Town, then select a Street. Right now, zipcode, district, and street number (?) searches are unimplemented; only Country, Town, and Street actually work (as of svn r1175). Furthermore, there is no US State or County information; when searching for a US town, you may get hits from all over the US with planet.bin, and unfortunately, the states that each hit is in are not displayed. You basically have to use the Map button to examine them one-by-one, until you find the one you want (or, only travel to towns with unique names).
+
With the code improvements [http://navit.svn.sourceforge.net/viewvc/navit?view=revision&revision=5424] of April 2013, maptool attempts to use admin_level=8 boundary relations in Germany to find town borders, as these are not tagged with place=* tags in Germany. If your country doesn't use place=* tags on place boundaries, please report to trac which admin_level relations can be used to get town boundaries.
  
The dialogue sometimes moves the cursor between text boxes automatically. This can be pretty annoying.
+
For some countries, we have established a correspondence of navit internal "State, county, district" terms to osm admin_level values. It makes it easier to find your town if there are many duplicate names without zip code. Report to trac if you have ideas how to extend this mapping to your country.
  
Finally, there are a couple ways to crash (segfault) navit inside the search dialogue.
+
The following countries have a mapping to OSM admin_level for boundaries :
 
+
Belgium, France, Germany, Poland, Russian federation, Switzerland, the Netherlands
The developers are aware of these issues and plan to improve behaviour (this will happen faster if you send a patch!)
 
  
 
=== Routes go through a city instead around of it ===
 
=== Routes go through a city instead around of it ===
This is because OSM doesn't provide any information whether a street is rural (can be driven with higher speeds) or not. Currently all roads are considered as in a city, which leads to using shorter routes through a city.
+
This is because OSM doesn't provide any information whether a street is rural (can be driven with higher speeds) or not. In that case all roads are considered as in a city, which leads to using shorter routes through a city. The '''issue is in the OSM data''', not Navit routing. You may want to fix the OSM data, in particular the speed limits (tag e.g. maxspeed=50) for inner-city roads, which are e.g. 50 km/h even when they are roads of higher order.
 
 
=== Search for my town works, but I can't find my street ===
 
This is because OSM doesn't provide reliable information which town a street belongs to. We are currently estimating the area of a town (depending on the town type) and are using all streets which fall in this area. This works well most of the time, but of course is no 100% match. But the official OSM approach "A street belongs to its nearest town/village etc." doesn't provide always correct results also and is harder to code.
 
  
 
=== There are strange purple objects on the navit map ===
 
=== There are strange purple objects on the navit map ===
 
These are objects in OSM which have no representation in navit. This includes ways which have no tag and therefore are not visible in osmarender/mapnik maps. If you want to have tagged objects included in navit add an entry to the discussion what tags are used for this object and what item from [[Item_def.h]] should be used (suggest a new one together with how it should be rendered if no appropriate one exists).
 
These are objects in OSM which have no representation in navit. This includes ways which have no tag and therefore are not visible in osmarender/mapnik maps. If you want to have tagged objects included in navit add an entry to the discussion what tags are used for this object and what item from [[Item_def.h]] should be used (suggest a new one together with how it should be rendered if no appropriate one exists).
  
==Known countries by osm2navit==
+
[[Category:Maps]]
Preferred is_in is the official english ISO 3166-1 country name. Local country name is also an option if it is unambiugous. Avoid abbreviations like ISO 3166-1 Alpha-2/-3 or the car country code, because they might be a ambiguous (for example FL might mean florida as well as Liechtenstein)
+
[[Category:OpenStreetMap]]
{| border="1"
 
|-
 
! [http://en.wikipedia.org/wiki/ISO_3166-1_numeric ISO 3166-1 numeric country id] !! is_in matches
 
|-
 
| 40 || Austria,Österreich,AT
 
|-
 
| 124 || Canada
 
|-
 
| 203 || Czech Republic,Česká Republika,CZ
 
|-
 
| 208 || Denmark,Danmark,DK
 
|-
 
| 246 || Finland,Suomi
 
|-
 
| 250 || France,République française
 
|-
 
| 276 || Germany,Deutschland,Bundesrepublik Deutschland
 
|-
 
| 380 || Italy,Italia
 
|-
 
| 528 || Nederland,The Netherlands,Niederlande,NL
 
|-
 
| 578 || Norway,Norge,Noreg,NO
 
|-
 
| 724 || Spain,Espana,Espana,Reino de Espana
 
|-
 
| 752 || Sweden,Sverige,Konungariket Sverige,SE
 
|-
 
| 756 || Schweiz
 
|-
 
| 826 || United Kingdom,UK
 
|-
 
| 840 || USA
 
|-
 
|}
 

Latest revision as of 16:57, 3 November 2017

OpenStreetMap is a free editable map of the whole world. It is made by people like you. OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth. Maps from OpenStreetMap can be used in Navit.

Quick Start

  1. Go to Navit Planet Extractor (http://maps.navit-project.org/)
  2. Zoom in and select the area that you are interested in. Use the 'Map Controls' on the right to switch between 'Navigation' and 'Select' modes. or use preselected areas:
  1. Hit Get Map!
  2. Move the downloaded map to the directory of your choice, and add it to the active the mapset (see Configuration) in navit.xml with a line similar to the following:
<mapset>
 <map type="binfile" enabled="yes" data="/path/to/your/map/osm_bbox.bin" />
</mapset>

Add OSM map to your mapset

Move the downloaded map to the directory of your choice, and add it to the active mapset (see Configuration) in navit.xml with a line similar to the following:

<mapset>
 <map type="binfile" enabled="yes" data="/path/to/your/map/my_downloaded_map.bin" />
</mapset>

Topographic Maps

Navit will display elevation/height lines but the required data is not included in most OSM derived maps.

Navit compatible maps with height lines can be created by feeding the output of Phyghtmap (http://wiki.openstreetmap.org/wiki/Phyghtmap, http://katze.tfiu.de/projects/phyghtmap/) to Navit's maptool. Alternatively the SRTM data can be downloaded in osm.xml format http://geoweb.hft-stuttgart.de/SRTM/srtm_as_osm/, avoiding the Phygtmap step. The information can be either merged with OSM derived maps or used in a separate layer.

Many Garmin type maps such as http://www.wanderreitkarte.de/garmin_de.php also have the height lines information but routing will not work with them.

Processing OSM Maps Yourself

You can create your own Navit binfiles from OSM data very easily using maptool, the conversion program which installs alongside Navit. maptool can process both OpenStreetMap XML Data files (*.osm files) and OpenStreetMap Protobuf Data files (*.pbf files) Follow these steps to process your own maps.

Download your own OSM data

OSM data can be downloaded from a variety of sources. OpenStreetMap XML Data files are regular textfiles, easily editable in any text editor. OpenStreetMap Protobuf Data files are binary files, which take up less space (so are quicker to download and process) but are not editable.

  • OpenStreetMap XML Data
    • Geofabrik provides pre-processed OpenStreetMap XML Data files of almost all countries, and all continents. This method is probably the easiest way of downloading OpenStreetMap XML Data for an entire country or continent. Note that the OSM files are bzipped
    • planet.openstreetmap.org hosts the complete data set (the whole world). You can use Osmosis to cut it into smaller chunks.
    • OpenStreetMap ReadOnly (XAPI) The API allows to get the data of a specific bounding box, so that download managers can be used. For example:
wget -O map.osm "http://xapi.openstreetmap.org/api/0.6/map?bbox=11.4,48.7,11.6,48.9"
    • OpenStreetMap (visual) allows you to select a small rectangular area and download the selection as OpenStreetMap XML Data.
  • OpenStreetMap Protobuf Data
    • Geofabrik provides pre-processed OpenStreetMap Protobuf Data files of almost all countries, and all continents.

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

Processing the whole Planet

The OpenStreetMap wiki Planet.osm page lists mirrors where Planet.osm can be downloaded. There are also downloads of smaller areas such as the UK and parts of Europe. These smaller excerpts are a lot quicker to download and process.

In case you want the whole planet.osm (24GB in December 2012), it is even possible to process planet.osm. It will take about 7 hours , requires > 1GB of main memory and about 30 GB disk space for result and temp files - planet.bin is currently (as of December 2012) 9.6GB:

bzcat planet.osm.bz2 | maptool -6 my_Navit_map.bin

Please note -6 option (long name --64bit) used above. It should be used always if output bin file grows above 4GB, or generated file will not work at all. Using that option on smaller files slightly increases their size and makes them unreadable by some unzip versions.

Tips

  • To enable a map you have downloaded refer adding OSM map to navit.xml
  • If you don't see any map data in Navit (assuming your map is properly specified in navit.xml) using the Internal GUI click anywhere on the screen to bring up the menu. Click on "Actions" and then "Town". Type in the name of a town that should be within your map data. Select your town from the list that appears. This will bring up a sub-menu where you can click "View On Map". Note that if you have a GPS receiver you can also just wait till you get a satellite lock.
  • To avoid changing navit.xml if you update your maps and the maps have different file names use the wildcard (*.bin) in your navit.xml file. For example:
<map type="binfile" enabled="yes" data="/media/mmc2/maps/*.bin"/>


See also


Problems with OSM

Search doesn't work

Now maptool uses country boundary multipolygon relations for detecting town membership. Sometimes this isn't an option, because the boundaries are not closed or wrong.

When there's no multipolygon around the town, maptool will attempt to use is_in tags. It only knows about a few OSM is_in tags. Please help the osm community to fix the country boundary.

Search is totally b0rkz0r3d! Or, behaves very strangely vs other navigation software.

OK, so the country you're searching is listed in the table. Search probably will work. But be aware there are some quirks.

First, there is no "Search" button--searches will begin automatically as you fill in the gtk dialogue. Note there are minimum string length requirements. For instance the Town search only "activates" after 3 characters are typed, to prevent a huge number of results (which would take a lot of CPU time to find and display). If you really need to search for two character towns, you'll have to modify the navit source code.

Also, Navit's search process is hierarchical. Meaning you must search for and select a valid Country, then select a Town, then select a Street. Right now, zipcode and district searches are unimplemented; only Country, Town, Street and Housenumber actually work. Furthermore, there is no US State or County information; when searching for a US town, you may get hits from all over the US with planet.bin, and unfortunately, the states that each hit is in are not displayed. You basically have to use the Map button to examine them one-by-one, until you find the one you want (or, only travel to towns with unique names).

The dialogue sometimes moves the cursor between text boxes automatically. This can be pretty annoying.

Finally, there are a couple ways to crash (segfault) navit inside the search dialogue.

The developers are aware of these issues and plan to improve behaviour (this will happen faster if you send a patch!)

Search for my town works, but I can't find my street

Maptool since April, 2013 uses polygones and multipolygon relations tagged with place=town/city/village etc to find place border.

Please note, there anyway should be a node tagged with the same name as surrounding [multi]polygon for town to be findable. If town boundary is found, it will be used as a limit for the street search.

Otherwise, city limit will be guessed by the place rank (city/town/village). This will often lead to streets not being found or found in neighboring places.

With the code improvements [1] of April 2013, maptool attempts to use admin_level=8 boundary relations in Germany to find town borders, as these are not tagged with place=* tags in Germany. If your country doesn't use place=* tags on place boundaries, please report to trac which admin_level relations can be used to get town boundaries.

For some countries, we have established a correspondence of navit internal "State, county, district" terms to osm admin_level values. It makes it easier to find your town if there are many duplicate names without zip code. Report to trac if you have ideas how to extend this mapping to your country.

The following countries have a mapping to OSM admin_level for boundaries : Belgium, France, Germany, Poland, Russian federation, Switzerland, the Netherlands

Routes go through a city instead around of it

This is because OSM doesn't provide any information whether a street is rural (can be driven with higher speeds) or not. In that case all roads are considered as in a city, which leads to using shorter routes through a city. The issue is in the OSM data, not Navit routing. You may want to fix the OSM data, in particular the speed limits (tag e.g. maxspeed=50) for inner-city roads, which are e.g. 50 km/h even when they are roads of higher order.

There are strange purple objects on the navit map

These are objects in OSM which have no representation in navit. This includes ways which have no tag and therefore are not visible in osmarender/mapnik maps. If you want to have tagged objects included in navit add an entry to the discussion what tags are used for this object and what item from Item_def.h should be used (suggest a new one together with how it should be rendered if no appropriate one exists).