SEP
30
2006

MARBLElous times ahead

Yesterday at aKademy I committed Marble to KDE SVN. Marble addresses an issue that exists since long: KDE lacks a generic widget that can be used to display geographical maps. Right now implementation as well as data for maps is duplicated all over SVN.

Examples of Use

  • KDE Control Center ( personalisation, timezones )
  • KDE-EDU ( KGeography, KStars )
  • KDE-PIM ( KAddressbook, Kopete)
  • KDE-GAMES ( Risk ;-) )
  • Others: KWorldWatch, KTraceRoute, KDesktop Wallpaper / Screensaver, ...




What it's not: Marble neither tries to deliver a 200% academically accurate map that can be used to do science (so don't use it to control nuuukelear power plants) nor does it try to be a Google Earth clone - at least in terms of primary focus.

Based on the needs for such a generic widget I imposed the following requirements on the project which should always be kept in mind if you plan to contribute to the project (yes, you are very much welcome to do so):

  • Marble uses a minimal free dataset that can be used offline. Currently the total amount of data that is meant to be shipped is about 5 MB.
  • Marble runs decently without hardware acceleration. It just uses Arthur as a painting backend and does NOT use OpenGL (However it largely benefits from EXA according to some initial testing). Extending it later on to support OpenGL as well shouldn't be hard however I don't consider that the primary focus. Depending on your hardware and the maps being displayed framerate is approximately 5-30 fps.
  • Marble uses vector as well as bitmap data: Currently it uses the very old MWDB II data combined with ETOPO 2, which I will update to current SRTM soon.
  • Marble displays the world map as 3D a sphere, because it's more fun to use and less subject to distortion (So with regard to that it's just like NASA WorldWind, Earth3D and Google Earth)
  • Marble should start up almost instantly. Currently it "cold" starts fully within 2-5 seconds. On each subsequent start it takes about one second.

Beyond those requirements Marble already supports "themes" for different topics. In addition to the primary topograpical atlas map there are two other topics: "Earth at Night" and "Satellite View". It's easy to add further topics - I temporarily added a "Moon Theme" on request within 5 minutes of work (it just takes to create two bitmaps and adjust an XML file - try it).



Initial support for Google Earth KML files is there already, so it's possible to display placemarks easily. However the whole placemark rendering is still under development so don't complain if within the next two weeks it will fail or be slow.

Among the TODO items are:

  • Adding support for downloading data via the internet (that should be a matter of a few hours or days in terms of implementation). This might also offer the chance to display Google Maps data.
  • Making placemarks and polygons accessible, so that they could be referenced to Wikipedia.
  • An "editing mode" which might be used to add placemarks manually or via GPS devices - maybe even working together with efforts like Open Street Map.
  • packaging for different plattforms. As Marble only depends on Qt >=4.1 it's easy to compile it for MS Windows. Daniel Molkentin even created an installable .exe files for it some time ago.




If you want to try it these are the steps that lead to instant success:

  • Make sure you've got SVN and at least Qt 4.1 installed
  • svn co svn://anonsvn.kde.org/home/kde/trunk/playground/base/marble
  • cd marble
  • ./buildqmake qmake (make sure that the parameter refers to Qt4's qmake - on Kubuntu you have to type in buildqmake qmake-qt4 ").
  • make
  • bin/marble

For optimal performance it's recommended to add " -O2 -msse " as compile options in marble/src/Makefile once it's generated and recompile. Any suggestions for how to add those options to src.pro directly are appreciated.

For each map marble needs some initialization to be done which is a one-time procedure and might take a few seconds on the very first startup (could be circumvented by packaging the resulting data if needed).

Have Fun :-)

Comments

Nice work :-) It would be really cool if somebody could integrate this with projects like OpenStreetMap that collect and work on Free geodata, as well as proprietary data from the likes of Google Maps :)


By Tom Chance at Sat, 09/30/2006 - 15:22

Nice work :-) It would be really cool if somebody could integrate this with projects like OpenStreetMap that collect and work on Free geodata, as well as proprietary data from the likes of Google Maps :)


By Tom Chance at Sat, 09/30/2006 - 15:22

Sadly, using Google's data servers is a no-go, their exclusive distribution deals prohibit it, even Nasa's World Wind got slapped down with a C&D letter.

Perversely, M$ actually allows other projects to freely use their Virtual Earth data servers, nay even brags about it as a reason why they're better than GE. Now there's a classic ethics versus pragmatism conundrum to figure out :-) Of course, we all know what the long term consequences of that would be...

Using the Nasa World Wind data looks to be the most free option available from the big boys, but it is older and less sexy at times.

But hey, I don't think that's really Torstans aim here, he's not aiming for Virtual Earth status, just a good solid simple light-weight Globe widget for other KDE apps to build upon. Lord knows there's enough other fully featured FOSS Qt/C++ Virtual Earth projects out there that one more is needed. I think he's hit the sweet spot for the majority needs here.

John.


By odysseus at Mon, 10/02/2006 - 06:07

Right. Of course Marble for me is just a hobby, won't be big and professional like google earth. Seriously: Your comments about my primary aim match my thoughts exactly.


By Torsten Rahn at Mon, 10/02/2006 - 17:12

> just a hobby, won't be big and professional like google earth.

You sure about that? I seem to remember [http:http://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044b| someone else] saying that at one point about his hobby.

j


By pedahzur at Mon, 10/02/2006 - 19:08

You can get very nice maps from openstreetmap, i.e. you can get great maps of London for free.


By test muffin at Thu, 08/16/2007 - 14:23

This looks great. I'd definitely like to use this in KStars. Will you be including a locations database in marble? If so, I humbly offer up the 3000 places that we've built up over the years. It would be great to have a single locations database for all of KDE.

BTW, I got a compilation error:

katlaswindrose.cpp:63: error: cannot use `::' in parameter declaration
katlaswindrose.cpp:70: error: no matching function for call to `QPainter::setBrush(QBrush (&)(QColor))'

I fixed it by changing katlaswindrose.cpp:63 from:
QBrush outlinebrush( QColor( Qt::black ) );
to:
QBrush outlinebrush( Qt::black );

--
KStars: A desktop planetarium for KDE


By Jason Harris at Sat, 09/30/2006 - 15:53

> Will you be including a locations database in marble?

Yes, I forgot about committing the respective data. Please update and look for marble/data/placemarks/cities.txt

Does that satisfy your needs (I guess we could add some height data there, but then again that could be taken directly from the DEM data in the map)?

If you want to see the cities displayed in the map do the following (adjust the paths as needed):

./tools/asc2kml/asc2kml -o ./data/placemarks/stdplacemarks.kml ./data/placemarks/cities.txt

./bin/marble ./data/placemarks/stdplacemarks.kml

This command will make marble display 22610 cities at once. As placemarks haven't been optimized yet this will be really SLOW. But with a little bit of patience you'll be able to zoom in and will be able to navigate faster after that.

> I fixed it by changing katlaswindrose.cpp:63 from:

Thanks, fix applied & committed.

--
Marble: A desktop globe for KDE


By Torsten Rahn at Sat, 09/30/2006 - 16:44

Congratulations! That looks very cool and is something long overdue in KDE. You've certainly got a lot further than I did when I tried to write a very similar program back in 2002 also using MWDBII, something I called Kartographer, but eventually gave up as my OpenGL coding skills were lacking. You can see the old website at http://www.kartographer.org/ .

I'm working on a post-grad diploma in GIS, so my time is currently restricted, but after exams finish next month I'll have a look and see if there's anything I can do to help out. GUI stuff, data sources, and integration with Wikipedia and CIA World Fact Book would probably be within my coding reach :-)

Good luck!

John.


By odysseus at Sat, 09/30/2006 - 21:06

> Kartographer,

Choosing names was tough. After a long time of brain storming I chose "Marble" for the following reasons:

- it refers to earth as the "Blue Marble". beautiful icon certainly ahead ...
- the name is easy to remember and not yet another C->K conversion (those K names raise negative Karma in some people and sound cheesy to others)
- it's short, sexy and easy to remember.
- it doesn't sound scientifically but rather playful instead (and "visualizes" what the user does to the sphere in an exploring addictive way)
- it rhymes with marvelous ;-)

For maximum success and brand recognition I'd like to see the name "Marble" used for the widget as well as the application :-)

> integration with Wikipedia and CIA World Fact Book
> would probably be within my coding reach

I'd appreciate your help concerning Marble. Welcome to the project!

Torsten


By Torsten Rahn at Mon, 10/02/2006 - 17:28

Pages