Use Geofix to Geotag Photos in digiKam

Geofix is a simple Python script that lets you use an Android device to record the geographical coordinates of your current position. The clever part is that the script stores the obtained latitude and longitude values in the digiKam-compatible format, so you can copy the saved coordinates and use them to geotag photos in digiKam’s Geo-location module.


To deploy Geofix on your Android device, install the SL4A and PythonForAndroid APK packages from the Scripting Layer for Android website. Copy then the script to the sl4a/scripts directory on the internal storage of your Android device. Open the SL4A app, and launch the script. For faster access, you can add to the homescreen an SL4A widget that links to the script.

Instead of using SL4A and Python for Android, which are all but abandoned by Google, you can opt for QPython. In this case, you need to use the script. Copy it to the com.hipipal.qpyplus/scripts directory, and use the QPython app to launch the script.

Both scripts save obtained data in the geofix.tsv tab-separated file and the geofix.sqlite database. You can use a spreadsheet application like LibreOffice Calc to open the former, or you can run the supplied web app to display data from the geofix.sqlite database in the browser. To do this, run the script in the geofix-web directory by issuing the ./ command in the Terminal.

To geotag photos in digiKam using the data from Geofix, copy the desired coordinates in the digiKam format (e.g., geo:56.1831455,10.1182492). Select the photos you want to geotag and choose Image → Geo-location. Select the photos, right-click on the selection, and choose Paste coordinates.

Tech writer covering Linux and open source software

Tagged with: , , ,
Posted in Open Source, Scribbles, Software
4 comments on “Use Geofix to Geotag Photos in digiKam
  1. Diego says:

    Hi Dmitri,

    I am trying to run Geofix in my android device but I wonder how the script actually works. Should I run the script every time I want to get a location? or could I keep the script running and get several coordinates? If so, how does it work? Is there any key combination I could use to ask for the script capturing new coordinates? If not, it would be possible to automatically close the script after capturing the coordinates?

    Thank you for developing the tool 😀


    • Dmitri Popov says:

      Hi Diego,

      Thank you for your feedback! You need to run the script every time you want to record coordinates. To launch the script faster, you might want to create a shortcut for it on the homescreen of your Android device.


  2. rob says:

    Hi, I really like Python and think you should use it everywhere, but where exactly is the advantage of using geofix instead of Osmand or GPSLogger, store to GPX and load that into the Geo location module?
    Thanks for the QPython hint anyway.

    • Dmitri Popov says:

      Probably none. It just offers a slightly different (and more convenient for me personally) way to perform the same task. 🙂

Comments are closed.

Recipes for automated and streamlined photographic workflow on Linux

Use digiKam? Get this book!

Practical advice for nighttime photography

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: