Horizons Unlimited - The HUBB

Horizons Unlimited - The HUBB (https://www.horizonsunlimited.com/hubb/)
-   Navigation - Maps, Compass, GPS (https://www.horizonsunlimited.com/hubb/navigation-maps-compass-gps/)
-   -   HowTo: OpenStreetMap Offline Use (https://www.horizonsunlimited.com/hubb/navigation-maps-compass-gps/howto-openstreetmap-offline-use-47374)

mj 30 Dec 2009 10:57

HowTo: OpenStreetMap Offline Use
 
In addition to Ulrich's excellent Google Earth Campsites Worldwide thread and his Google Earth Offline use thread I'd like to present a third possibility to take advantage of digital maps: OpenStreetMap offline.

For those of you who have never heard of OpenStreetMap before here's a short intro: while Google Maps and Google Earth are certainly terrific and free to use they're not free. Google has rather strict terms of use, e.g. that one is only allowed to use it within a web browser. The OSM project aims at mapping the entire world and create a free to use map for everybody. It's sort of like Wikipedia: everybody can contribute. The maps are already great and very detailed, especially in cities - take a look yourself: OpenStreetMap
And the best part: just like Wikipedia they're absolutely free.

To use these maps offline you need to things: Navit and a map (duh).

Linux
The following instructions should be valid for all Linux distros. However, since there are new ones every day and support for others is dropped at the very same rate these instructions may or may not work. I have sucessfully installed Navit on openSUSE and Ubuntu.

1. Install Navit
You can grab prebuilt packages for openSUSE and Ubuntu. For openSUSE go to Software.openSUSE.org and grab the proper RPM. For Ubuntu follow these instructions. All other distributions: look for prebuilt packages (for example on rpmseek.net) or build Navit from source

2. Grab Maps
Next grab the maps you need:Unfortunately, Navit cannot handle raw OSM files and requires a conversion into its native .bin format. This task can take a while, especially on slower computers. To give you a rough estimate: my 1.6 GHz Atom Netbook has been processing the map of Europe for the past 2 hours and it doesn't look like it'll finish anytime soon. My AMD quadcore took 52 minutes to process the map of Europe.

3. Convert maps
To convert simply type:
bzcat /path/to/europe.osm.bz2 | maptool europe.bin
This will convert the compressed OSM file and put a europe.bin file to your current directory. I recommend using ~/Maps for converted maps. Once you've started maptool go grab a coffee. Or two. And continue with the next step.

Note: for some weird reason the openSUSE RPM named this tool osm2navit instead of maptool

4. Configure Navit

Navit creates a ~/.navit directory on first start but fails to copy the include its own navit.xml config file.

openSUSE: cp /usr/share/navit/navit.xml ~./navit/
Ubuntu: cp /usr/navit/navit.xml ~/.navit/
Built from source: same directory as navit binary, no need to copy it
All other distros: find / -name "navit.xml" then copy accordingly


Open the newly copied file and modify the following settings:

Code:

<!-- If you dont want to use the sample map, either set enabled="no" in the next line or remove the xml file from the maps directory -->
<mapset enabled="no">
  <xi:include href="$NAVIT_SHAREDIR/maps/*.xml"/>
</mapset>

Code:

<!-- Mapset template for openstreetmaps -->
<mapset enabled="yes">
 <map type="binfile" enabled="yes" data="/path/to/your/converted/map.bin"/>
</mapset>

5. Pick a user interface
Navit offers two different user interfaces (GUI). For netbooks and devices with small screens I would recommend internal. For devices with larger screens you can also use gtk. By default navit starts with internal

Internal:
http://www.planet3dnow.de/mj/navit/navit-internal.png

GTK:

http://www.planet3dnow.de/mj/navit/navit-gtk.png

To configure the GUI:
Code:

<gui type="gtk" enabled="yes/no" menubar="1" toolbar="1" statusbar="1"/>
  <!-- In case of the internal GUI, you can even influence the size of the text and of the icons in the toolbar and the viewport. Here's an example for a freerunner: -->
  <!-- <gui type="internal" font_size="350" icon_xs="32" icon_s="96" icon_l="96"/> -->
<gui type="internal" enabled="yes/no"><![CDATA[

If you decide to go with the internal GUI then I would recommend to edit the following setting, too. It'll give you zoom in / zoom out buttons on the bottom left and right, and a toggle fullscreen button on the top left:

Code:

<osd enabled="yes" type="button" x="0" y="0" command="gui.fullscreen()" src="toggle_fullscreen.xpm"/>
<osd enabled="no" type="button" x="-96" y="0" command="gui.menu()" src="menu.xpm"/>
<osd enabled="yes" type="button" x="-96" y="-96" command="zoom_in()" src="zoom_in.xpm"/>
<osd enabled="yes" type="button" x="0" y="-96" command="zoom_out()" src="zoom_out.xpm"/>

The GUI menu button is not necessary since clicking anywhere will get you the menu either way.

6. Done
Enjoy your free and incredibly detailed maps.


Windows
If you, like many other people, think that Linux is too complicated, and the Linux instructions have cemented your opinion, then you're in for a big surprise. Compared to Linux the Windows version of Navit is just as complicated.

1. Install Navit
Two possibilities:Whichever way you chose, you're not done yet. If you chose the installer go to C:\Program Files\Navit\bin and move navit.exe and maptool.exe to C:\Program Files\Navit\share\navit. Don't forget to adjust your start menu shortcuts accordingly. If you chose the all-in-one zip package extract it and move the two files accordingly.

2. Grab Maps
See above

3. Convert Maps
First, since bzcat is not available on Windows and you most probably do not have CygWIN installed, you need to uncompress the compressed osm.bz2 file. I recommend 7-Zip.

Next open a command line (Start - Run - cmd) and type:
cd C:\Program Files\Navit\share\navit
maptool -i C:\PATH\TO\UNCOMPRESSED\europe.osm C:\PATH\TO\CONVERTED\europe.bin
Make sure you have enough disk space available - you'll need several gigabytes.

4. Configure Navit
See above. The config file can be found in C:\Program Files\Navit\share\navit and is also named navit.xml

5. Pick a user interface
See above. I haven't figured out how to use the GTK Gui on Windows. I know it's possible, because I've seen screenshots of GTK Windows versions of Navit, but I'll leave that to a Windows pro. Also, the zoom buttons will only appear once you've opened the menu (left-click anywhere) and returned to map view (globe on top left).

6. Done
Enjoy your free and incredibly detailed maps.

http://www.planet3dnow.de/mj/navit/navit-windows.png







Don't hesitate to ask if you have questions.

apapadop 10 Feb 2010 07:31

Ahh, good stuff MJ. I'd like to add a note to this thread that if people want to use maps of specific areas only, the easiest bet seems to be http://garmin.na1400.info/routable.php

Over a web interface, that site provides:

Quote:

* Installer for Garmin MapSource (Windows).
* Installer for Garmin RoadTrip (Mac OSX)
* Combined image for direct manual placement on the GPS device (gmapsupp.img)
* A zip file just containing all the Garmin map tiles as selected on this website. This is useful for Linux users (e.g. Qlandkarte)
Thanks for the tutorial, will certainly check it out when I get back home.

Alex

mj 10 Feb 2010 10:07

Thanks for your note regarding the links for map downloads, apapadop. I have edited my initial post and replaced the link for "Continent or country" to point to the correct place now.

Not having a Garmin/Falk/TomTom/etc. GPS I'd be interested if it's actually possible to use OSM data in these devices. Currently I use Copilot for Android as GPS, and I cannot use OSM data with Copilot. There are a few GPS tools that do use OSM maps, but none of them is an Offline GPS so they all require a constant internet connection. Which, as we probably all know, can get quite expensive once you've left your home country...

seizetheday 11 Feb 2010 00:34

Thx for this mj, I do have a quick question when you get a moment.

Do you (or anyone) have any experience with OSM as compared to the routable (paid for) garmin maps. I'm thinking Russia/Mongolia/Kazekhstan in particular. I'll most likely have the new baby Garmin, the Zumo 220, available next month according to my source (google). I'm looking for the usual flexibility and ease of use.

apapadop 11 Feb 2010 06:47

Quote:

Originally Posted by mj (Post 275916)
<snip>
Not having a Garmin/Falk/TomTom/etc. GPS I'd be interested if it's actually possible to use OSM data in these devices.
<snip>

Indeed it is, but obviously the OSM data need to be converted to the respective format each manufacturer likes.

For instance, the processing needed to produce Garmin-digestible maps is very kindly done for you by http://garmin.na1400.info/routable.php

Magellan maps seem to be pre-fabbed here: http://maps4me.net/

Similarly, http://wiki.openstreetmap.org and/or Google should have the rest of the answers - I have only researched the Garmin option as this is what I use.

HTH

Alexandros


All times are GMT +1. The time now is 17:16.


vB.Sponsors