Difference between revisions of "OpenStreetMap"

From Navit's Wiki
Jump to: navigation, search
 
m
Line 9: Line 9:
 
Grab a map from [http://www.openstreetmap.org/ OpenStreetMap] :
 
Grab a map from [http://www.openstreetmap.org/ OpenStreetMap] :
  
wget -O map.osm http://www.openstreetmap.org/api/0.4/map?bbox=11.4,48.7,11.6,48.9
+
wget -O map.osm http://www.openstreetmap.org/api/0.4/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.
 
Of course, adjust the bbox to the area you want to grab. Use a small area, or the grab may fail.
Line 15: Line 15:
 
Once you have the map.osm, parse it. There is a script for that in the navit/src/script folder.
 
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
+
navit/src/script/osm2navit < map.osm > mymap.txt
  
 
Now add a map source to your navit.xml :
 
Now add a map source to your navit.xml :
  
<map type="textfile" enabled="yes" data="/path/to/mymap.txt" />
+
<map type="textfile" enabled="yes" data="/path/to/mymap.txt" />
  
 
And navit will now be able to read your OSM maps.
 
And navit will now be able to read your OSM maps.
  
Note that since September 2007, NavIt is provided with a demo map of Munchen.
+
Note that since September 2007, NavIt is provided with a demo map of München.

Revision as of 08:42, 21 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.4/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

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.