Motorcycle Adventures and Free Software
Henri Bergius
Biker, free software consultant, neogeographer

See also my JavaScript blog, The Universal Runtime

There is a total of 861 posts.

Weblog: category "geo"

Finnish MeeGo Summit starts tomorrow

Posted on 2011-04-14 12:45:17 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 2 comments.

This weekend is the first-ever Finnish MeeGo Summit, held in Tampere in the same venue where we had aKademy last summer. Despite some announcements, the conference sold out in a very short time. The program looks very interesting, too.

I'll give two talks:

  • Location awareness in MeeGo, Hacks & Tricks track Friday 15:30
  • Midgard Create - Content Management System without forms, Finhack Saturday 12:00
Finhack is a Finnish free software meetup co-organized with Free Software Foundation Europe and COSS as a one-day track within MeeGo Summit.

If you're not able to attend the Summit, there are also regular MeeGo meetup groups in Helsinki and Tampere.

meego-finland-400.jpg

Sponsored links

save money using, phone card

Towards the geotagged web

Posted on 2010-09-15 11:54:33 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

There was a pretty interesting snippet in Engadget's coverage of yesterday's Nokia World keynote:

"By 2013 800 million people will be using GPS-enabled devices. Soon, everything on the Internet will have a location coordinate. This is a space we intend to own."

Indeed, this is a quite possible future, and one for which we with Midgard are quite well prepared for. Many smartphone browsers (and even desktops) nowadays can transmit their location to web services, more and more geotagged information is being published via microformats, feeds and RDF. From the humble beginnings with Plazes, social web services like Twitter, Qaiku and Facebook can now store and display location where different status updates were made.

The missing piece for a wider-scale geotagged web however is actual usage of geodata. We need easy tools for tagging content with locations, but also web services that actually serve their users better thanks to location information. This can mean helping the user to catch a bus, or recommending them clothes purchases based on local weather. Anything that goes beyond just showing dots on a map.

For that, Midgard has had the necessary infrastructure in place. What we need is your ideas and use cases for how to improve web services through location.

buscatcher: Never miss another tram

Posted on 2010-09-02 16:17:17 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

Opening public data is a hot topic in Finland at the moment. As a small experiment with the data that is available I wrote buscatcher, a simple N900 app that displays Helsinki trams (and some buses) moving on a map in real time. This makes it easy to determine when your next tram is coming to the stop, or where it is stuck.

buscatcher.jpg

Click here to install this application

Updated 2010-09-28: Buscatcher now has a stable release that is available from Maemo Downloads with already more than 10,000 installations.

For other platforms, you can grab and run the application from the GitHub repo. It should run on regular Linux desktops, and there have been reports of working on also platforms like the OpenMoko Freerunner.

Zeitgeist does location: what did I do while in Brussels?

Posted on 2010-07-21 17:16:00 UTC in 60° 9.768 N 24° 55.668 E Helsinki, FI to . 6 comments.

Zeitgeist, the desktop activity logging engine is now becoming geo-aware. From Seif Lotfy's blog:

It allows you to ask Zeitgeist stuff like

  • “Get me the recent files I edited at university”
  • “Who do I contact most when I am at School?”
  • “Which pictures did I take in Brazil?”
  • “Where was I when an Email came in?”
  • “What files did I open during the conference?”
zeitgeist-geoclue.jpg

As I've been advocating since 2006, location is important for making applications smarter. While you might not remember where you stored some file, you probably remember where you were when working on it. Then Zeitgeist's location features, powered by GeoClue, will be able to get it for you.

This is especially cool since Zeitgeist is coming for Maemo as well. My laptop is quite mobile, but the N900 is even more so.

My GeoClue talk from aKademy 2010

Posted on 2010-07-09 14:04:14 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 1 comments.

aKademy 2010 was hosted in the sunny city of Tampere by the Finnish Centre for Open Source Solutions, an organization that I'm a steering group member of. In addition to helping a bit with the arrangements and organizing the Midgard Gathering there, I also gave a talk about GeoClue, the positioning framework for Linux desktops.

bergie-geoclue-akademy2010.png

We initially started the push for location-aware desktops around 2006, and now the efforts are finally starting to bear fruit. Both Zeitgeist and Nepomuk are looking at indexing documents based on where you accessed them, Telepathy can share your location with your friends, and hopefully soon also your desktop clock will switch timezones when you travel.

It is very cool that this development seems to be happening on both GNOME and KDE at a reasonably similar pace. GeoClue is also a service in MeeGo and I've been told another major mobile phone manufacturer uses it. Maybe soon Mac OS X will not be the only platform with location APIs built in?

Photo by Alexey Zakhlestin.

Notes from my first Ubuntu Developer Summit

Posted on 2010-05-15 21:09:47 UTC in 60° 0.000 N 24° 0.000 E 28km S of Lojo, FI to . 0 comments.

Last week was the Ubuntu Developer Summit targeted at planning how the next iteration of the operating system, Maverick Meerkat, targeted at a October 10th 2010 release, would look like. The event was held in a spa resort off in the countryside near Brussels. A place where the developers were comfortably separated from the busy towns by forests and country roads.

I went to the UDS with two goals in my mind: to discuss making the Ubuntu desktop location-aware, and to figure out what sort of role Midgard, our content repository could play in the Ubuntu space. Normally such things would be better approached by talking to upstream projects and distributions, but as Ubuntu is taking an increasingly active role in developing itself to be a comprehensive and unique operating system, it would be a better place to accomplish such wide-ranging changes.

Location-awareness was a area that many were interested in. Ubuntu already had considered GeoClue, our location service, to be a component of the distribution in Lucid Lynx, but that plan had been abandoned due to the low-maintained status of the software. However, now that GeoClue has become the geolocation framework for MeeGo things are about to change, and so there is a significant possibility to get GeoClue into Ubuntu as well.

GeoClue by itself will obviously not do much, and so making applications use it is the important thing. Some applications already support location information and could be changed to include those features by default. This includes Empathy sharing location information with instant messaging buddies, and Getting Things GNOME TODO manager being able to tag action items with location. Zeitgeist is intending to start tagging and searching activity history with location, and Gwibber also wants to include location sharing to interface with social web services like Brightkite, Qaiku and Google Latitude. Another reasonably low-hanging fruit would be to make the Ubuntu panel clock automatically change time zones as you travel.

Midgard in Ubuntu is a bit trickier question. A lot of Ubuntu has now been developed to utilize the CouchDB document database, which provides quite similar storage services as Midgard does. CouchDB's cool map/reduce algorithms and replication capabilities have enabled Ubuntu developers to quickly integrate a content repository into many applications and to provide a cloud storage and synchronization service to users of the operating system.

But at the same time CouchDB introduces some problems:

CouchDB can't seem to handle the load of Gwibber's messages, leading to excessive CPU consumption and poor performance in certain cases. For example, the overhead of computing the views causes lag when the user switches streams after Gwibber refreshes. The cost of pulling the account configuration data out of the database can also sometimes cause a noticeable lag that lasts up to four or five seconds when opening Gwibber's account manager.

CouchDB has been designed with web servers in mind, and in many situations having a constantly-running Erlang process and having to do HTTP roundtrips to access data are undesirable on more constrained computers. We ported CouchDB to Maemo a few years ago and the performance was terrible. I'd imagine the same issues on netbooks and other small hardware that Ubuntu's Light initiative targets.

On such environments Midgard might be a better option. Midgard's recent LTS release uses regular relational databases for fast performance and low footprint, utilizes important pieces of free desktop architecture like D-Bus signalling and GObject Introspection, and has been proven to work well even on low-end devices like the Nokia N900. And yet it provides full content repository APIs comparable to CouchDB, and can even handle replication with Couch. One way to make Midgard possible, then, would be to provide Python DesktopCouch APIs to it.

Another interesting technology discussed much in UDS was Puppet, the  systems administration tool. It enables developers to describe their setups in a object-oriented declarative language, and then just let Puppet to make it so. I attended two Puppet sessions, and picked up a Kindle edition of the Puppet book which I read on the train ride to the Netherlands. As my company manages lots of Midgard web servers for our customers, automating system setup and maintenance on top of Puppet and Ubuntu Server might save us lots of time and effort.

All in all, quite an enlightening two days in the event. If things work out, I hope I'll be able to spend more time in the UDS targeting the N-series of Ubuntu next fall.

GeoClue 0.12 is out: Location awareness over D-Bus

Posted on 2010-03-29 11:26:54 UTC in 60° 11.286 N 24° 49.464 E 6km NW of Helsinki, FI to . 0 comments.

geoclue-200.png

After a long hiatus there was a new GeoClue release 0.12 last week. GeoClue is a D-Bus service that Linux applications can use to obtain user's current position and convert between human-readable addresses and coordinates. As location-aware services are becoming more important and computers more mobile the free desktops should also be aware of where they are.

Dadadi Blog writes:

Geoclue has a really nice feature, the master provider. It means geoclue can handle multiple sources of geoinformations. For example, you can get your position with your gps device, or with OpenCellId, or with webservices that will associate your IP address with a location (such as hostip). Geoclue master provider is able to choose the source with the best accuracy.

Geoclue is used at least in Empathy to publish your location to your contacts, and in WebkitGtk to support html5 geolocation.

It's been the first release in nearly two years, and it's great to see that nice project moving forward again. In this release, Nominatim has been added as a provider for geocoding and reverse/geocoding. It means it's possible to use nominatim service to get the position for a given address, or the opposite. There have been also many bugfixes and code cleaning, including a bug I've helped to resolve that prevented master provider from being usable in some configurations.

I'm also really happy to see GeoClue again moving on. It is important for the free desktop infrastructure to have such critical tools available as vendor-neutral D-Bus services instead of platform-specific libraries.

Update: ran into python-geoclue, a very handy Python convenience library for dealing with GeoClue that is a result from last summer's GSoC. Seems to work pretty well.

Halti.com provides contextual product recommendations

Posted on 2010-02-10 15:33:05 UTC in 60° 9.984 N 24° 55.050 E Helsinki, FI to . 0 comments.

Last week the Finnish outdoor brand Halti launched a pretty interesting web service. While many outdoor brands focus on extreme sports that don't really have much to do with the reality of most of their customers, Halti connects their product lineup to the needs of the site visitor by utilizing both weather and location. This means where ever they are or are planning to go, they can get product recommendations personalized to their needs:

halti-small.png

This is another case of location context being used to serve users better. To figure out where the user is coming from the site uses a combination of IP positioning and browser geolocation, while weather information comes from Foreca's feeds. Map visualization uses CloudMade's OpenStreetMap-based maps. And of course the whole thing runs on the stable Ragnaroek series of Midgard.

In other news, Jos et jaksa is another pretty interesting recent site launch, especially for the fact that it is the first-ever website running on the legacy-free Midgard2 platform and Midgard MVC.

Google's Near Me Now: not quite there

Posted on 2010-01-08 11:50:11 UTC in 60° 10.290 N 24° 56.796 E Helsinki, FI to . 0 comments.

Google launched a new mobile web service called Near Me Now that can recommend things like restaurants, bars and ATMs near you. This uses browser geolocation to provide only results relevant to where you are.

googlenearme.jpg

The idea is quite good: to replace business directories like Yelp or eat.fi with something that is easily accessible from Google's homepage and uses Google's great relevancy algorithms.

However, the implementation is not quite there yet. My main gripe is that they implemented this using browser sniffing so that the feature can be accessed only with iPhones and Android devices. Even though I'm using N900, a mobile device that has GPS and provides geolocation through the browser I cannot access that site. That reeks of the bad old times of IE-only websites.

Lesson: if you need browser sniffing to provide some feature, implement it based on browser capabilities, not the user agent (which can anyway be spoofed easily).

Easy user location with Midgard

Posted on 2009-12-02 14:08:41 UTC in 60° 9.798 N 24° 55.674 E Helsinki, FI to . 0 comments.

Location is an important context that web services can utilize for fun or smarter user interaction. In past getting location used to be difficult, but now thanks to good IP locationing databases and browser geolocation capabilities it is becoming a lot easier.

But to be really easy, the framework you're using should provide user's location built-in, without you as an application developer having to think about it. This is the reason for Midgard's geolocation features to exist, after all. With Midgard, getting user's location is quite easy:

Midgard MVC (Midgard 9.09)

// Read location from session or user's location log
$user_location = midgardmvc_helper_location_user::get_location();
if (is_null($user_location))
{
    // No location found, try to geocode based on user IP via the GeoPlugin service
    $geocoder = new new midgardmvc_helper_location_geocoder_geoplugin()
    $location_parameters = array('ip' => $_SERVER['REMOTE_ADDR']);
    try
    {
        $user_location = $geocoder->geocode($location_parameters);
        midgardmvc_helper_location_user::set_location($user_location);
    }
    catch (Exception $e)
    {
        // Couldn't get location from IP
    }
}

if (!is_null($user_location))
{
    echo sprintf('You\'re in %s, %s', $user_location->latitude, $user_location->longitude);
    // Will print "You're in 60.1633, 24.9279"
}

MidCOM (Midgard 8.09)

<?php
// Read location from session or user's location log
$user_location = org_routamc_positioning_user::get_location();
if (is_null($user_location))
{
    // No location found, try to geocode based on user IP
    $geocoder = org_routamc_positioning_geocoder::create('geoplugin');
    $location_parameters = array('ip' => $_SERVER['REMOTE_ADDR']);
    $user_location = $geocoder->geocode($location_parameters);
    if (!is_null($user_location))
    {
        // Store geocoded location to session or user's location log
        org_routamc_positioning_user::set_location($user_location);
    }
}

if (!is_null($user_location))
{
    echo sprintf('You\'re in %s, %s', $user_location['latitude'], $user_location['longitude']);
    // Will print "You're in 60.1633, 24.9279"
}
?>

The examples above will work with both anonymous site visitors (using sessions) and registered users (using Midgard's position log). In this example we check if location is already available via browser geolocation or some importer like Qaiku or Fire Eagle, and if not we fall back to IP-based positioning using the GeoPlugin service. The resulting user location array or object (depending on Midgard used) contains a textual description of the place and accuracy information in addition to WGS-84 coordinates.