Friday, 1 May 2009

Where am I?

One of the up-and-coming features in Plasma, thanks particularly to Petri Damstén, is the geolocation DataEngine - a backend for determining where in the world the user is. Right now, there are two mechanisms used: GPS (great if you have it, and are outdoors) and IP.

IP geolocation is neat, as anyone online has an IP which we can hope might tell us something about where they are. The hard bit is getting a good database with accurate location fixes, as the data is continually changing. One of the best services going for this is They provide an XML API for giving location data for IPs, so as my first foray into Plasma development, I set about hooking this up into the IP geolocation backend.

The result? IP geolocation for this computer, right now, gives:

Try it for yourself - grab the geolocation dataengine from kdereview, run plasmaengineviewer, and select geolocation.

Now, the weak link in the first implementation was that the API took an IP and returned location data - whereas what we really want is just data for the user's world-visible IP. A stop-gap measure was to use, which was sadly not too reliable. As of today, though, after chatting to the guys (thanks!), calling the API without an IP, returns the location of the visiting IP. Perfect!

So that's IP geolocation, next step is to work on geolocation based on wireless access points. Two neat advantages of this:

i) Better coarse-level geolocation - record APs visible at home/in the office/parents'/etc., and be able to geolocate at least down to a few km from that.

ii) In a building with a whole bunch of visible APs, geolocation down to a few metres. And, unlike GPS, works indoors.

What to do with this data is left as exercise for the reader's imagination. For me, I intend to have my power management settings changed to 'Presentation' and my Kopete message notifications turned off when I go to give a talk, without having to remember to do it myself. Knowing where I am in the building should be clue enough, right?


  1. Out of curiosity, what's the unit on that accuracy? Meters?

  2. At the moment, the accuracy is just a big number, so the data from the GPS geolocation backend is preferred (if available).

  3. This comment has been removed by the author.

  4. Hi,

    It would be nice if this kind of functionality would be offered for all applications that "just" want to have this kind of service and are not so keen on linking against plasma.
    We over in the Marble project would like to move the marble map component into kdesupport soonish.
    It would be nice if we could have a qt-library of various geo services implemented on that level as well.
    That way a much wider range of people would be able to make use of this kind of functionality.

  5. replica louis vuitton handbags is attractive in outer appearance and exquisite in inner side. There are flat handles that are adjustable, a removable padded shoulder strap, an address holder which can be stamped with baby or mother’s initials, and a key ring holder. In addition, compared with the traditional diaper bag, lv handbag has more functions, such as a change purse, a board which could print the address of the holders by hot-stamping and the designer adds an extra band on both sides, which could save labor when you carry louis vuitton bag on