How to use JTileDownloader

Hi all,

I eventually figured out how to use JTileDownloader to download tiles to my GPS (Mio P350). Anyone who wishes to navigate with OSMTracker or similar, without WiFi or cellular connectivity, will probably find this useful.

All information is from http://wiki.openstreetmap.org/wiki/JTileDownloader, and some personal tinkering.

  1. Download the latest version of JTileDownloader from here: http://svn.openstreetmap.org/applications/utils/downloading/JTileDownloader/tags/JTileDownloader-0-4-0/JTileDownloader-0-4-0.zip.

  2. Unzip into a new directory.

  3. In the same directory as the jar file, create a file named appConfig.xml with the following data:

<?xml version="1.0" encoding="UTF-8"?> 10 true false true 50 true false true
  1. Open a command line prompt (WinKey + R, cmd).

  2. cd to the directory of the jar file, and run ‘java -jar JTileDownloader-0-4-0.jar’.

  3. Leave the command prompt open to monitor the program’s logs.

  4. In your browser, open an OSM map around the area you wish to download. Click on the ‘permalink’ in the bottom right corner.

  5. Paste the address field from the browser to the ‘Paste URL’ field of the JTileDownloader application. This will update the lat and lon fields as the center of the area you are interested in.

  6. Select the radius of the area you are looking for.

  7. Select the zoom levels you need. I used 12,13,14,15.

  8. Select the tile server. I used Mapnik.

  9. Select the output folder where the tiles will be saved. You will need to copy them to your device eventually.

  10. Click ‘Download tiles’, and watch the command prompt for details.

  11. Copy the downloaded tiles (there is a dir for each zoom level, keep the structure while copying) to your device (or SD card), and select the tiles directory in OSMTracker’s settings. Should do the trick!

Known issues:

  • I was unable to update the lat/lon values by pasting a new URL. A way around this is to close the app and start it again.

Let me know how this works for you!

I had also the problem with the update of the lat/lon.
My solution was to change the tab (in the top of the app). Than it will be recognized if you open the update tab again.

This post is relevant to anyone who wishes to have Israel tiles synced offline to the GPS.

JTileDownloader has an option to update existing tiles (as OSM maps change very often due to loyal members of this forum). I thought of a way to use this feature as a boot-strap and an ongoing update tool for anyone who wishes to hold a set of tiles covering Israel. Disclaiming again, this is probably useful for people with GPS devices that don’t connect wireless-ly, and have enough storage space to hold the needed data.

If you are reading this with intent to use the directions, you probably played around with JTileDownloader already. In the main tab you can set the directory where the tiles are placed (Output folder). Move on to the “Update Tiles” dialog, and press “Search”. This will scan your tiles dir, and show how many tiles of each zoom level you currently have. Click on “Update” to fetch the latest version of each tile for the selected zoom level.

But you have only the tiles you downloaded so far, and I promised to cover all of Israel… Here is what I did, and how you can use it. Read until the end, including the tips, before trying this out.

I divided our small (thanks God) country into 9 boxes (stating the northern and southern limit of each box):
Metula, Ashdot Yaakov: http://www.openstreetmap.org/?minlon=35.5&minlat=32.64&maxlon=35.896&maxlat=33.355&box=yes
Zar’it, Tamra: http://www.openstreetmap.org/?minlon=35.05&minlat=32.838&maxlon=35.5&maxlat=33.11&box=yes
Kraiyot, Yokne’am: http://www.openstreetmap.org/?minlon=34.92&minlat=32.64&maxlon=35.5&maxlat=32.838&box=yes
Afula, Netanya: http://www.openstreetmap.org/?minlon=34.8&minlat=32.3&maxlon=35.6&maxlat=32.64&box=yes
Netanya, Gedera: http://www.openstreetmap.org/?minlon=34.6&minlat=31.8&maxlon=35.6&maxlat=32.3&box=yes
Jerusalem, Dimona: http://www.openstreetmap.org/?minlon=34.2&minlat=31&maxlon=35.6&maxlat=31.8&box=yes
Negev north: http://www.openstreetmap.org/?minlon=34.33&minlat=30.5&maxlon=35.45&maxlat=31&box=yes
Negev south: http://www.openstreetmap.org/?minlon=34.52&minlat=30&maxlon=35.2&maxlat=30.5&box=yes
Ovda, Eilat: http://www.openstreetmap.org/?minlon=34.72&minlat=29.4&maxlon=35.12&maxlat=30&box=yes

Using the “Export Tilelist” feature, I created a list of all tiles of these boxes, with zoom levels of 12 to 15. Total of 46,897 tiles… More on this later. If you need the list, here it is: http://www.megaupload.com/?d=K11ACY3V

I wanted a boot-strap version that will be as light as possible, so with some scripting I created ‘empty’ tiles - files with no data, but the right names. This is the boot-strap I was talking about, and you can download it here: http://www.megaupload.com/?d=4MW54H4K

Unzip it into your tiles dir. You can use specific zoom levels if you want to, or take all I made. Be sure to create a backup of your tiles in case something goes wrong… It can take some time to unzip zoom 15 - some 35K files there. More on time consumption later on.

So, now that you have the empty tiles you wanted to have, use the “Update” feature of JTileDownloader to update them! It can take quite a while for the 15th zoom level - be sure to have enough time. The unzipping took me some 17 minutes, and all the updates took a few hours to complete.

Juggling so many files is a time hog. Just copying empty files to my SD card took a while, let alone download small files and overwrite the empty ones. Pay attention to the following tips:

  • Use the newest, fastest SD card that you have. In addition to capacity, the latency of these devices improved a lot, and will save you time.
  • Unzip the empty tiles directly to the SD - no need to unzip them and then copy.
  • Update the tiles directly on the SD - again, avoid copying.
  • If you absolutely have to copy files, use TeraCopy (http://www.codesector.com/teracopy.php), at least you will be able to work on your computer during the copy process.
  • Consider space. With tiles, the number of files takes more space on your file system than their data. Here are the numbers I have (FAT32 on my SD card):

Zoom    Files Data size  Size on disk
  12      614     3.4MB    19MB
  13    2,289    10.1MB    71MB
  14    8,899    24.3MB   278MB
  15   35,095    56.7MB     1*GB*

Hope you will find this helpful. Let me know how this works for you, and if you need any additional help.

A richer app that can download tiles and much more - Mobile Atlas Creator - http://sourceforge.net/projects/trekbuddyatlasc/