Wednesday, February 3rd, 2010

Garmin Topographic Maps for Android Phone

Here is a tutorial how to create topographic maps that can be viewed on your android powered device.  Street navigation software is plentiful for the Android platform but topographic navigation software is between scarce and nonexistent.  After searching Google, forums and the Android Marketplace I finally found a single program capable of accepting maps in the WGS84 format used by all Garmin maps.  This program is called OruxMaps and has received almost no attention even though it is over a year old.  There are multiple advantages of being able to use a Garmin topo map on your Android device with a GPS sensor: No long downloads from the Internet, no data connection required, an abundance of highly detailed maps up to 1:24000 scale or better, etc.  Until Garmin releases an Android version of their software this is the next best thing.

OruxMaps uses maps in PNG graphics format and comes with a tool to convert OzExplorer maps (.map) to .png map tiles.  Using a few specialized programs and a LOT of disk space we can convert vector maps to images and make a custom topo map to take with us.

Hardware Required

  • 1GB free RAM Minimum
  • 40GB free hard drive space
  • USB card reader with 512MB or greater capacity memory card

Software Required

  • Clean script from this website
  • GPSMapEdit (http://www.geopainting.com/en/)
  • A topographic map installed (http://www.gpsfiledepot.com)
  • OruxMaps (Android Marketplace)
  • OruxMapsDesktop (http://oruxmaps.x10hosting.com/index_en.html)
  • Java Runtime Environment (JRE) (http://java.sun.com)
  • MapSource for Windows (http://www.garmin.com)

If you are unfamiliar with MapSource and do not currently use a Garmin product google ‘mapsource without map’ for instructions how to install.


MapSource with an area of Washington State selected using the map tool.

To start, launch MapSource and select the tiles you would like in your map using the map tool.  In this tutorial I am using Washington State in the USA because I happen to live there.  I recommend only doing an area about this size because the graphics take up an enormous amount of disk space later.  Now is the time to plug-in your card reader with memory card and have it ready.


USB card reader folder contents.

From the menus, select ‘Transfer > Send to Device’ and select the drive letter of your memory card. Hit ‘send’.  After a short wait the transfer will be finished.  You can close MapSource. In My Computer, browse to your memory card and find the file called gmapsupp.img and copy it to your desktop.  You can then eject the card reader.


Levels screen before changing the map.

Start GPSMapEdit by running mapedit.exe and open the gmapsupp.img file.  It will notify you that you have a container of maps; hit OK to continue and the map will be loaded.  OziExplorer map format only works with single level maps at the moment so we need to remove some levels from our map.  To do this select ‘File> map properties > Levels’ from the menus.  All levels except the most detailed (500m for me) and the least detailed (20-30km for me) should be removed.


Levels screen after removing unusable map data.

When completed you should see your map in the background.  Switch to the header tab and change ‘Name’ to ‘MAPSET’ (without quotes); hit OK.  Because there is some issues with how maps are drawn in GPSMapEdit we need to go through an extra step to remove some junk from the map.  Select ‘File > Save Map As…’.  The save as type should be Polish format (.mp).  Once this process is completed you will have a .mp file that is roughly 400MB in the folder you specified.  Close the file in GPSMapEdit.


Save the map as Polish format (*.mp) and close.

I had a few issues with the OruxMapsDesktop program that caused map creation to fail so I wrote two small java applications that fix the .map and .mp files and gets them ready for the next steps.  To use them, decompress clean.zip to the same folder as your .map, .bmp, and .mp files. Your folder should look something like the picture below.  Double-click cleanmp.bat and wait for the junk to be removed from your .mp file.  This could take several minutes to run.


Folder contents ready to run cleanmp.bat script.

Now we can open the .mp file in GPSMapEdit and the junk should be gone.  Our next step is to choose a zoom level for our OruxMap.  As a general rule I have found that 1 zoom level above what you think you need works correctly and is readable on the small screen of a smartphone; for my map I chose 200m.  After this we export the map into OziExplorer format (.map).  To do this we select ‘File > Export > OziExplorer map’.  Within this menu it is essential that we select ‘Set Whole Map’ and ‘Tiled Output’ so we can deal with the files created.  In Tiled Output I use Columns: 20, Rows: 10 to give about 200 map sets (~180MB each). As you can see from the image below, I end up with 23,009.8MB of bitmaps.  After this you can hit OK and be prepared to wait a very long time for the maps to render.


OziExplorer export command using GPSMapEdit.

Run cleanmaps.bat to fix the .map files and get them ready for OruxMapsDesktop.  After a second or two the job is done.  We are actually adding a bit of error to the maps (your location may be off by 10m) because of an error in the OruxMapsDesktop program not reading the .map file correctly.  Your folder should appear similar to the image below for everything to work correctly.


Folder contents ready to run cleanmp.bat script.

Finally we can convert the maps to the format used by OruxMaps on Android.  Start OruxMapsDesktop by running OruxMapsDesktop.bat.  Select the option ‘Batch Conversion’.  Within this menu select the folder containing your .map files for ‘Calibration File Directory’ and a new empty folder for ‘Destination Directory’.  We want to use PNG format since topo maps have so few colors jpeg would be a waste of space.  There may be an error about compression not being supported, ignore it.  Hit Go!!!! and prepare to wait an hour for the maps to get created.


Folder contents ready to copy to Android device.

Copy the folders created to sdcard/OruxMaps/mapfiles/ and you are finished!

Now you have a topo map to go along with your street navigation map.  For the Washington map I created the final size was around 300MB.  It’s not as good as a vector format, but excellent for a graphic image of the entire state!  If you are using this tutorial to make a single tile map, do not use the batch conversion option.  Instead, pick ‘Convertor’[sic].  Select the .map calibration file and .bmp image; choose latitude/longitude projection.  The rest should be the same as above.


OruxMaps displaying Hurricane Ridge in Washington State at 100% zoom

Article by Brandon , guest post @ MrFloris.com

Category: blogs
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses

February 3, 2010

Excellent write up :) Thank you for contributing to the web site.


February 9, 2010
Brandon

OruxMaps 2.0 just came out.

On startup it said ‘generating maps database’ for over 6 minutes.

The good part of this is that the program does NOT need to rebuild the maps database every time it starts like the previous version. So, be prepared to wait a bit the first time you start it after upgrading to 2.0.0


You must be logged in to post a comment.