Table of Contents
Welcome to GCLiveMapGen
As a addicted geocacher I'm really fancy about the new geocaching application from Geocaching.com called Geocaching Live, also called GCL. It runs on nearly every J2ME enabled device, that's modern smartphones, either Symbian, Windows Mobile or Android-powered. There's also a PC-enabled version supplied via Java Webstart. This PC version of GCL also has special feature which is the generation of offline maps for usage on the mobile. This is great for people without a data flat rate for their mobile phone or for caching in regions without a mobile phone net coverage. But there's also a problem with this feature! :-( Especially the generation of the higher zoom levels is very slow because of a pause of 10 (!) seconds before fetching a new map tile from the map server.
There comes my application, called GCLiveMapGen! ;-)
It is a Python script I've written after some Reengineering of the map database used by GCL. You need to have Python installed on your PC, at least in version 2.5 or 2.6, and the Python QT bindings called PyQT4.
Note for Windows users: You may also need to install the MSVC2008 C++ runtime DLLs from here.
Usage
GCLiveMapGen supports the following modes:
- fetch is used for fetching map tiles from one of the public available map tile servers like OpenStreetMap.
- generate is used to generate a GCL Map Database from map tiles downloaded with the fetch mode.
- tiles-count is used to estimate the tile count when downloading a given area in the fetch mode.
- auto-radius is used to estimated the max. supported radius for a position. (Note: GCL currently supports only max. 65535 tiles.)
- gui is used to start the script with a graphical user interface (GUI).
Some examples for the usage of GCLiveMapGen:
GCLiveMapGen.py fetch Osmarender_Tiles Osmarender 47.5:9.5:48.5:10.5
This will fetch map tiles from the Osmarender map tile server and store the tiles retrieved in the directory Osmarender_Tiles. The map tiles are only fetched from the area which is described by the bounding box with the lower left coordinates N 47.5° E 9.5° and the upper right coordinates N 48.5° E 10.5°.
GCLiveMapGen.py generate Osmarender_Tiles GCL_Map_Database
This will generate a GCL Map Database in the directory GCL_Map_Database from the map tiles we have downloaded into the directory Osmarender_Tiles in the first part of our example.
Important Note: GCL currently only supports max. 65535 tiles in the map database. Therefore GCLiveMapGen will stop the generation if it reaches that limit. I've generated a map database with that max. number of tiles and it didn't crash GCL, but sadly also the map didn't shown up.
GCLiveMapGen.py tiles-count 48.25:9.5:48.75:10.5
Estimate the tiles count if fetching the given area.
GCLiveMapGen.py auto-radius 48.25:9.55
Estimate the max. supported radius (in km) for the given coordinate.
GCLiveMapGen.py gui
Start the program in GUI mode.
GCLiveMapGen supports a lot of more options. Just call it in the following way and it will tell you all options it supports:
GCLiveMapGen.py --help
Usage:
GCLiveMapGen.py Mode Param1 ... ParamN [options]
Modes and Params:
GCLiveMapGen.py fetch <OSM tiles directory> <OSM Map Tile Server> <Bounding Box>
- Fetch map tiles from the following OSM Map Tile Servers:
'Mapnik' - http://www.openstreetmap.org/
'Osmarender' - http://www.openstreetmap.org/
'CycleMap' - http://www.opencyclemap.org/
'OSMCTopo' - http://osmc.broadbox.de/
Example:
GCLiveMapGen.py fetch OSM_Tiles Osmarender 48.25:9.5:48.75:10.5
GCLiveMapGen.py generate <OSM tiles directory> <GC Live Map directory>
- Generates the GC Live Map Database.
Example:
GCLiveMapGen.py generate OSM_Tiles GCLiveMapDB
GCLiveMapGen.py tiles-count <Bounding Box>
- Estimate the tiles count if fetching the given area.
Example:
GCLiveMapGen.py tiles-count 48.25:9.5:48.75:10.5
GCLiveMapGen.py auto-radius <Coordinate>
- Estimate the max. supported radius (in km) for the given coordinate.
Example:
GCLiveMapGen.py auto-radius 48.25:9.55
GCLiveMapGen.py gui
- Start the program in GUI mode.
Example:
GCLiveMapGen.py gui
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-b LAT1:LON1:LAT2:LON2, --bounding-box=LAT1:LON1:LAT2:LON2
Generate only: Bounding box with lower left and upper
right coords LAT1:LON1:LAT2:LON2.
-s ZOOM, --start-zoom=ZOOM
Start with zoom level ZOOM [Default = 6].
-e ZOOM, --end-zoom=ZOOM
End with zoom level ZOOM [Default = 17].
-u, --update-tiles Fetch only: Update already existing tiles [Default =
False].
-p COUNT:TIME, --pausing=COUNT:TIME
After fetching COUNT tiles pause for TIME seconds
[Default = 100:5].
-v, --verbosity Set verbosity level [Default = 1].
-m MAXTILES, --max-tiles=MAXTILES
Generate only: Add MAXTILES to Map Database [Default =
65535].
-q, --quiet Disables all output from the script except errors and
warnings.
GCLiveMapGen is a quick 'hack' I've written for my own needs, so if you are missing something from it I'm open for your suggestions! ;-)
And always remember, GCLiveMapGen is freeware and therefore without any warranty! Use it at your own risk! ;-)
HD Stich <hd@…> - 2009 - Ulm - Germany
Starting Points
Donate
And if you like GCLiveMapGen, please consider a small donation! Even the smallest amount is highly appriciated and will support the further development!