Monday, September 8, 2008

MarbleTalk: The result of my summer of code

I have never really written about my Google Summer of Code project, but now that I got the first really cool and visible feature in, I can't wait anymore.

As you might know Marble is not only a Qt/KDE application but also a widget that you can use in your application to provide the user with geographical data.
You can simply generate a KML document with QDomDocument and then use the addPlaceMarkData to load this file into the widget. You can check the implementation of digikam which has been the first application using this.

This part is not new, it was possible to load and display Placemarks (simple Points which contain a name and a location) before. But in my Summer of Code I reworked the KML parsing so that any KML file could be parsed and saved in an internal data structure and at the very end I made a model and a view for that. This view now went into a plugin (the geodata plugin), the model is now integrated into the structure and thus if you go within Marble to File->Open Map and you choose kdeedu/marble/src/plugins/marble/geodata/Marble writing.kml it will show you this now:



You can of course do a lot more with this, I am pretty sure. Here is a small draft of how to use the marbleWidget:

#include "marble/MarbleWidget.h"

using namespace Marble;
...
MarbleWidget *marble = new MarbleWidget( parent );
QString yourKmlData;
...
marble->addPlaceMarkData( yourKmlData );
...
delete marble;


But, you might ask, what has this todo with Vector Tiles for Marble? The basic idea of vector tiles is to render the data at the client rather than at the server side as it is done now. With the above said, we are ready to do this - rendering basically works and we now need to generate the data, implement some caching algorithms, etc. So you might not see this for 4.2's version of marble, but there is a good chance that this will be ready for 4.3.
p.s.: This all wouldn't have been possible without my mentor Torsten Rahn (tackat), so I want to thank him for this too at this point.

3 comments:

Erlend said...

Wow, very cool!

I just bought a gps logger for use when taking pictures and tested it on a two-day hike this weekend. When I got back i immediately created a KML file for viewing the route on Google Maps/Earth and actually thought to myself that it would be cool if Marble could do that too.
You rock! :-)

Anonymous said...

Well, Marble can load tracks from gpx-files and display them (version 0.6). I use it frequently to display my tracked routes. But you may have to switch to the OpenStreetMap-mapview to be able to zoom in as far as you want. Marble can also load kml-files, but I have never tried that.

Anonymous said...

I like to earn rappelz rupees, because it is very interesting. I think if you meet the rappelz gold, you will like it too. And when you play the game well you can get some cheap rappelz rupees as the rewards from the game. As long as you have a lot of rappelz money in the game you will be strong, and you can go to buy rupees with the other players.