[KPhotoAlbum] GPS - get info from gpx, not from Exif
johannes at zarl-zierl.at
Sat Feb 25 21:00:51 CET 2017
On Donnerstag, 23. Februar 2017 12:21:57 CET Benny Simonsen wrote:
> If I have understood the GPS mechanism correct, then the GPS location is
> taken from the Exif data.
This is correct.
> But I have also some gpx files that I would like to use for getting GPS
> positions of my images *without* modifying my pictures.
> I know that I can use e.g. gpsprune to embed the GPS data into the exif of
> the images, but I don't like to modify my original images from camera.
> What is the recommended way or how does other use the GPS support?
As Tobias said: the recommended way to use GPS is by embedding the data into
the exif info. Which means altering the image file, unless we add support for
.xmp sidecar files.
Supporting sidecar files is on my long-term todo list, but until then you are
stuck with either modifying your files or using a unsupported, unofficial way.
Which brings us to your approach:
> My approach is to embed the GPS into exif-info.db from a script - but are
> there cases where the data in exif-info.db are flushed, except if I delete
> it; regenerate it from KPhotoAlbum?
Apart from caveat of being unsupported, this method should work. The exif
database is overwritten by the file's exif data on these occasions:
1. when adding a new image
2. when an image was moved
3. when an md5 sum change is detected
4. when the exif data is re-read explicitly (by the user)
5. when the gps fields in the exif db are not set
(just mentioning this for completeness - this does not affect your use-case)
6. when the whole exif db is recreated (by the user)
Since you already know not to press the "re-read exif data" button, and you
are obviously not modifying your own images, 1. and 2. are the important
points for you.
>From 1. follows that you need to import the images first, then modify the exif
More information about the KPhotoAlbum