View Single Post
Posts: 479 | Thanked: 1,284 times | Joined on Jan 2012 @ Enschede, The Netherlands
#8
So I learned some Python and I created FavMan, the N9 Nokia Maps favorite manager. Don't get too excited, there's no nice GUI and undoubtedly full of bugs. It can however export and display the current favorites to a GPX-file and import new favorites from a GPX-file. Conversion from GPX to KML/LMX/whatever can be done using GPSBabel.

Backup your database at /home/user/.cities/NokiaMaps.db before using this tool!

Basic usage:
  1. extract the zip somewhere on your N9/50.
  2. Open a terminal in the directory where you've placed the files.
  3. Run "python favman.py -h" for details.

That last command yields:

Code:
usage: favman.py [-h] (-loaddb [file] | -loadgpx [file]) [-savedb [file] |
                 -savegpx [file]]

FavMan v1.0.0. Manages favorites/POIs in the Nokia N9 Maps database.
Public domain by Randy Simons.

WARNING

This is experimental software. Be sure to backup your Nokia Maps database, located in /home/user/.cities/NokiaMaps.db, before using this tool.

optional arguments:
  -h, --help       show this help message and exit
  -loaddb [file]   Load favorites from database. Default if no file specified:
                   /home/user/.cities/NokiaMaps.db
  -loadgpx [file]  Load favorites from GPX file. Default if no file specified:
                   favorites.gpx
  -savedb [file]   Save favorites to database. Default if no file specified:
                   /home/user/.cities/NokiaMaps.db
  -savegpx [file]  Save favorites to GPX file Default if no file specified:
                   favorites.gpx

Notes:
 * It is yet unknown what will happen if you sync imported favorites. It probably won't blow up your phone, but please do make a backup!

Tips:        
 * Only GPX v1.0 files supported. Favorities must/will be stored as waypoints.
 * Use GPSBabel (gpsbabel.org) to convert various type of geolocation data, including GPX and Nokia's LMX.
 * Nokia Maps database is stored in /home/user/.cities/NokiaMaps.db         
 * Nokia Maps will recreate a fresh datbase if the original database cannot be found. (e.g. renamed, deleted)
 * Use Sqlite3Explorer (http://www.singular.gr/sqlite/, download dll from http://sqlite.org/download.html) to inspect Nokia Maps database.

Examples:
favman.py -loaddb
Opens default database and shows all favorites.

favman.py -loadgpx
Loads waypoints from favorites.gpx and displays them on screen. Use this to verify if the gpx file can be read correctly.

favman.py -loaddb -savegpx
Opens default database and exports favorites to POIs.gpx

favman.py -loaddb NokiaMapsCopy.db -savegpx export.gpx
Opens database NokiaMapsCopy.db and exports favorites to export.gpx

favman.py -loadgpx -savedb 
Loads waypoints from favorites.gpx and stores them as favorites in the database.

favman.py -loadgpx import.gpx -savedb export.db
Loads waypoints from import.gpx and stores them as favorites in the database export.db. The original database will remain unchanged.
Warranty: it works for me, but YMMV. Other caveats: I don't know what syncing with Nokia Maps online will result in. I've only tested on PR1.3, with Python 2.6 which is pre-installed (I think).
Attached Files
File Type: zip FavMan.zip (22.1 KB, 208 views)

Last edited by Fuzzillogic; 2013-02-05 at 21:46. Reason: Attached FavMan.zip to this message instead of hosting it myself.
 

The Following 9 Users Say Thank You to Fuzzillogic For This Useful Post: