Introducing KGeoTag, a KDE photo geotagging program

Tobias Leupold tobias.leupold at gmx.de
Sat Oct 17 19:54:55 BST 2020


Hi devel mailing list :-)

I'm Tobias Leupold. I have been a KDE developer since 2014. I mostly
participated in KPhotoAlbum. Currently, I'm one of the three active developers
of the project (somewhat a jobbing developer, because I'm the only one not
earning my money with writing code. I'm just a hobby programmer, but I try to
do my best ;-)

I'd like to introduce a new project I recently started. It's KGeoTag, a photo
geotagging program for KDE. The code can be found on
https://invent.kde.org/tleupold/kgeotag .

At the latest since Digikam's geolocation KIPI plugin isn't available anymore,
I think the Linux desktop lacks a decent geotagging program. There are a few
programs able to write coordinates in Exif headers, but some aren't maintained
anymore, some only do it besides and some are only graphical frontends to
console programs without a real added value. At least -- speaking of me -- I
didn't find a straightforward, nice geotagging program. I used GpsPrune
recently, but it's written in Java, not nicely integrated with my desktop and
it's inconvenient for geotagging. Mostly, it's lacking a simple drag-and-drop
interface.

As a KPA tenet is to not alter the images we cataloguize, I decided to write a
small, overseeable new standalone program with the only purpose to geotag
photos. And that's KGeoTag.

Marble is used to display a OpenStreetMap map. One can load geodata from one
or more GPX files which is drawn on the map. Images can be added and then
assigned with coordinates in three ways:

One can search for exact matches between the images' dates and available
points from the GPX data, with a defined maximum deviation.

If no exact data is available, interpolated matches can be calculated, with
both a maximum timespan and distance between the points used for the
interpolation.

Finally, all coordinates can be set or corrected manually by dragging and
dropping the images directly on the map. This is also possible without loaded
geodata.

Missing or incrorrect altitude values can be obtained from opentopodata.org's
API. Either manually or automatically when dropping images on the map. This is
disabled by default (for privacy reasons, as coordinates have to be
transferred to opentopodata.org's servers when asking for a specific
elevation).

If there's a time drift in the images' metadata due to the camera's clock not
being exactly in sync with the GPS data, it can be corrected and considered
when searching for matches. Also, it can be fixed in the images' headers.

Finally, the coordinates (and possibly fixed dates and times) can be written
to the images. KGeoTag uses the libkexiv2 library with it's nicely geared-up
geodata functions. Libkexiv2 being mature, well-tested and documented, I
suppose we can be quite sure that KGeoTag doesn't eat the images it works on.
Nevertheless, by default, a backup of the original files is created before
saving the changes.

I consider this project to be a complementary tool for KPhotoAlbum, and
possibly other geodata-aware programs. It's purpose of application has tight
limits, and consequently, the codebase is overseeable and should be easy to
maintain.

The code is quite new (still lacking even a 0.1 tag); anyhow, it's already
fully functional. I successfully geotagged some real-life datasets of family
vacation photos where I carried a GPS logger most of the time, and it worked
nicely.

Maybe, some of you also think that this would enrich the KDE ecosystem. I'd be
happy to get some feedback. And perhaps, if I'm not the only one who thinks we
need this, it could be moved to graphics/, like KPA? Surely, it's by far not
important enough to be distributed by KDE like Marble or such, but maybe, it
could be a KDE extragear application like KPA one day.

Thanks to anybody having read the whole thing until here, and thanks in
advance for all feedback :-)

Cheers, Tobias





More information about the kde-devel mailing list