Difference between revisions of "OpenStreetMap"

From Navit's Wiki
Jump to: navigation, search
m
Line 16: Line 16:
  
 
  navit/src/script/osm2navit < map.osm > mymap.txt
 
  navit/src/script/osm2navit < map.osm > mymap.txt
 +
 +
WARNING ! Since API 0.4, osm2navit isn't up to date. You can use the temporary [http://navit.sourceforge.net/osm2navitv5 osm2navit2v5] until osm2navit is completely available for API 0.5. osm2navitv5 is used exactly like osm2navit.
  
 
Now add a map source to your navit.xml :
 
Now add a map source to your navit.xml :

Revision as of 23:51, 25 October 2007

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.

And you can use their maps in NavIt!

You will need to do the following :

Grab a map from OpenStreetMap :

wget -O map.osm http://www.openstreetmap.org/api/0.5/map?bbox=11.4,48.7,11.6,48.9

Of course, adjust the bbox to the area you want to grab. Use a small area, or the grab may fail.

Once you have the map.osm, parse it. There is a script for that in the navit/src/script folder.

navit/src/script/osm2navit < map.osm > mymap.txt

WARNING ! Since API 0.4, osm2navit isn't up to date. You can use the temporary osm2navit2v5 until osm2navit is completely available for API 0.5. osm2navitv5 is used exactly like osm2navit.

Now add a map source to your navit.xml :

<map type="textfile" enabled="yes" data="/path/to/mymap.txt" />

And navit will now be able to read your OSM maps.

Note that since September 2007, NavIt is provided with a demo map of München.