27 November 2008

Interesting product, but…

So Nikon has a geotagger in its sleeves and it is soon to be available.  Unfortunately it won’t be compatible with my D40.  Reading the review and the technical specifications, I am not so sorry.

The device seems small, fast and it doesn’t required its own power source.  That’s the pros.  The con is that you need to use a software to geotag your pictures afterwards.  I mean: come on, you can easily put that directly into the EXIF data right at the moment your are taking the picture!  No need to do that afterwards!

So while this is a very interesting products, we’ll have to wait a bit more to have something that just works and isn’t a more work.

On a side note, this means that my EOG Map plug-in will be much more useful in the next years!

24 November 2008

Designing libchamplain 0.4

As more and more people are using and asking for features in libchamplain, I face a difficult challenge getting the current design to do new extraordinary things.

Here are the top features that can (or can’t) only be hacked into the current design:

  1. To be able to replace the Clutter front end;
  2. To have a global state for the library (ie. loading or done);
  3. To have the tiles rendered on demand;
  4. To have our own map sources;
  5. To have a smooth animation when recentering the map;
  6. To have a zoom in/out animation.

The first feature is really the one that calls for a new architecture.  The current design relays heavily on Clutter, even for internal data representation.  This breaks the golden MVC rule and it is my first goal in this redesign.

Having the tile loading code interweaved with the model really makes it more ugly to have feature #2 and #3.  With a controler actually building the model, the tiles could come from elsewhere without making the model much more complex and the loading code can be placed together resulting in less places where the states change.

And finaly, since the view is also the controler which modifies the model, having the animations code inside the view makes some animations tricky.

While at it, why not take into account some special requirements, such a non blocking calls.  Clicking on the zoom in button should call the zoom in function, which should return as fast as possible not to block the UI.

First design steps

First I thought about the visibility of each objects.  Since I want minimal impact on the current API, I will keep the View as the main interaction point between an application and libchamplain.  To fulfill feature #4, a ChamplainMapSource interface will be created.  This is how it works internally right now, but instead of an interface, there is a struct of function pointers.

The whole data model will be available to an application wishing to implement its own map source. It will have helper controler classes such as a map loader, and eventually a map renderer.

The view should be sending the user’s actions to the main controler, which will be called ChamplainEngine.  This engine will be in charge of keeping the global settings, state and a reference to the model.  When the model changes, the view will be informe through different signals and notifications on properties’ changes.

Trying the design on paper

So I went on use this very good online sequence diagram generator to define precisely who will be responsible for instanciating objects, notifying the view and loading stuff.  I tried to stick to this rule: all model changes should happen from ChamplainEngine.

So here some of the diagrams I created.

Those diagrams enabled me to test the task division and define very precisely how the view will get informed of the model’s changes.  Implementing this design should now be very fast, granted I don’t run into unattended issues!

16 November 2008

libchamplain 0.2.7

I am announcing the release of libchamplain 0.2.7. Libchamplain is a ClutterActor to display maps.  Libchamplain-gtk is a Gtk+ widget wrapping it.

This is a screenshot of the demo launcher displaying OpenStreetMap data for Helsinki (Finland).

This is a screenshot of the demo launcher displaying OpenStreetMap data for Helsinki (Finland).


Enhancements:

  • Double clicking on the map will now zoom and recenter.
  • When resizing a ChamplainView, the centered content will still be centered after the resizing.  Can be disabled.
  • The Map’s license is displayed by default on the lower right corner. Can be hidden.

Fixes:

  • Fix a memory leak
  • Some code clean-up
  • Fix Bug 558026 – zoom in + center_on != center_on + zoom in
  • Fix missing zoom level in OpenStreetMap Mapnik

libchamplain-gtk has been version bumped to 0.2.7 – no changes since 0.2.6.

This should be the last release of the 0.2 series.  I plan to rewrite part of the internals to better follow the MVC principle, which will improve the code’s readability and allow for more complex features to be introducted in the future.

More info on the project page.

14 November 2008

12 months

I did miss my anniversary too, but only by 2 days :)   On November 12 last year, I joined Collabora in the Montréal office.  It has been a very interesting year.  While there is half a ton of things I can’t discuss here, I can talk about why I like being at Collabora ;)

While my task did change a lot during the last year, the nature of my job didn’t.  I am still writing Open Source software.  Everything I do is available to the public and licensed in a proper way.  This is a very important aspect of my job and I like it.  But how do they make money, you ask? By finding and convincing customers that contributing to open source software is for their best.

With Collabora, I was able to travel across Western Europe (and more very soon) and meeting really interesting people.  If I had stayed at my previous job, I’d never have been to FOSDEM, GUADEC, the Maemo Summit and more.  This is one very important advantage of working for Collabora.

I was also offered chances I wouldn’t have everywhere like presenting at conferences and working on big projects.  This all makes me very glad of my decision 12 months ago, but most of all, I’m very happy to work with such a great team.