/ index
I have several digital cameras and a Nokia N73 mobile. The mobile knows where it is at all times because the network tells it the ID of the cell in which it is sitting. The mobile also has a camera which is very handy because, unlike my other cameras, it is always with me so whenever I see something interesting I can snap it.
This means I take more pictures than before so now I have an even greater problem of identifying the locations, or will have in the future.
But if I can write a simple program to log the names of the cells I can surely write another program that can look at the dates and times of the photographs and match them with entries in the log. then I can add the cell ids to the IPTC data of the photographs.
I can make another list that can translate between cell ids and locations so that the actual location can be added to the photograph as well.
The rest of this page contains notes about what the application suite should do. Example code will be found in CellTrackingCode.
To make this work I need several pieces of sofware and some data files:
The tagger runs on the computer so that it can tag phographs not taken by the mobile. If it were written in Python it should be possible to run it on the mobile as well so that the pictures are tagged immediately after being taken.
The cell tracker must:
The cell location database must be:
The tagger must:
To comply with the requirements I need to know how to:
Details of API calls, web services, IPTC and EXIF tags etc.
See http://wiki.forum.nokia.com/index.php/Python_debugging_techniques
try:
# Actual program is here.
1 / 0
except:
import sys
import traceback
import e32
import appuifw
appuifw.app.screen="normal" # Restore screen to normal size.
appuifw.app.focus=None # Disable focus callback.
body=appuifw.Text()
appuifw.app.body=body # Create and use a text control.
applock=e32.Ao_lock()
def quit():applock.signal()
appuifw.app.exit_key_handler=quit # Override softkey handler.
appuifw.app.menu=[(u"Exit", quit)] # Override application menu.
body.set(unicode("\n".join(traceback.format_exception(*sys.exc_info()))))
applock.wait() # Wait for exit key to be pressed.
appuifw.app.set_exit()
Rumour has it that Open Signed Online applications can't do this. I'll set the flag next time I try Ensymble.
Nokia don't even provide proper repeating calendar entries so this might be difficult.
Use e32.ao_sleep(interval_seconds). See API_Reference_for_Python.pdf.
From: http://snippets.dzone.com/posts/show/738
This could be used to create a repeat loop for every interval. I show this in a previous snippet.
import e32, time def showtime(): print time.clock() e32.ao_sleep(1, showtime) # sleep then call itself again showtime() # start the loop
Thanks to http://akuaku.org/archives/2003/05/gps_tagged_jpeg.shtml for a useful link.
Use pyexif.
Just assume that they are in c:\DATA\Images.
Initially the simplest thing to do will be to use a text file with the cell id,mnc, mcc, lac as the first fields and the rest of the line the cell description.
There are many public cell location resources but there appears to be no common API or file format and the coverage is extremely variable
Yahoo has a webservice for retrieving and updating a cell location database: ZoneTag Web Services.
To retrieve the data for a cell it is enough to construct a URL containing the cellid, mcc, lac, and mnc values returned by gsm_location(). The web service will send back an xml document containing one or more location elements the child elements of which contain the information you want (name, country, coordinates, post code, etc.).
Unfortunately coverage is sparse. Still this is worthwhile.
This generates some secondary requirements:
At http://janus.liebregts.nl/cellid/index_en.html there are links to xml files containing some data for UK, NL, and FR.
The xml holds cellid, network id, and free text description
The page also has links for other resources.
At http://kbs.cs.tu-berlin.de/~jutta/gsm/gsm-list.html is a list of network operator codes.
Another list of operators is at http://www.nobbi.com/netw_country.htm.
Sites listing themselves as member of senderliste.de use the same format for their pages.
Cells in Rhein-Main: http://www.senderlisteffm.de/
At http://cellspotting.com/thick/browse.php. Unfortunately the database is not downloadable.
At http://www.antennasearch.com/sitestart.asp is a service that does a lookup of cells given the street address (USA only).
This service could be used to populate the database for areas you have visited or intend to visit. Unfortunately the reports it provides do not give enough information to decide if an antenna is a cell or not let alone the cell id, mnc, mcc, and lac.
To retrieve data from ZoneTag Web Services we must be able issue a REST query and parse the returned document.