[KPhotoAlbum] About geolocation

Salvador Eduardo Tropea stropea at inti.gob.ar
Tue Sep 17 16:43:40 BST 2019

Hi Tobias!

On 6/9/19 08:37, Tobias Leupold wrote:
> Hi Salvador!
>> 1) Is it possible to associate elements from a category (i.e. Places)
>> with a GPS coordinate?
> No, this isn't possible (yet), but I actually thought about this. Problem is
> that those coordinates would have to be written to the images, and
> principally, KPA itself does not change image files ... you could do this via
> a script, get all images having tag x from the xml db and add the coordiantes
> via exiftool or something else. You can also get a list on all file names
> shown in the preview with "Run with own command line" (or so).
>> 2) Can I add geolocation information to index.xml? (Is the EXIF database
>> the only source?)
> The coordinates are read from the images's EXIF header and cached in the EXIF
> db. So they don't appear in index.xml.

I hacked it in the following way:

1) To avoid touching the images I'm modifying the EXIF db. Of course it 
means that I need to patch it again if the db is recreated/updated.

2) Took a list of places from the index.xml

3) Used a script to look for the places in OpenCage, extracting possible 
coordinates. I then selected the matches that I was confident. Note: 
Google has a better service, but you must provide a credit card ...

4) Completed the place to coordinates translation table (a simple text 
file) using Google Maps (and my notes about some of the places), by 
hand. Just looking for the place and doing Copy&Paste of the coordinates.

5) Applied the translation to the EXIF db. For this my script parses the 
index.xml looking for all the images and their place, then I do the 
translation and finally I update the database.

The bad things:

1) I added a third information element, the table to translate places 
into coordinates

2) The synchronization must be done by hand. After adding a new place to 
index.xml you must add a new translation entry. After adding new images 
you must run the script to patch the EXIF db

The good thing:

1) I don't have to modify the images.

2) I fixed a bunch of errors in my tags ;-)

If anyone is interested in the scripts (ougly Perl code ;-) they can be 
found at GitHub: https://github.com/set-soft/KPA_geotag

Regards, Salvador

Ing. Salvador Eduardo Tropea          http://utic.inti.gob.ar/
INTI - Micro y Nanoelectrónica (CMNB) http://www.inti.gob.ar/
                                       Av. General Paz 5445
Tel: (+54 11) 4724 6300 ext. 6919     San Martín - B1650KNA
FAX: (+54 11) 4754 5194               Buenos Aires * Argentina

More information about the Kphotoalbum mailing list