Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geotag images does nothing when using KML files #65

Closed
rwesson opened this issue Jan 17, 2019 · 5 comments
Closed

Geotag images does nothing when using KML files #65

rwesson opened this issue Jan 17, 2019 · 5 comments

Comments

@rwesson
Copy link

rwesson commented Jan 17, 2019

I'm using v1.6, installed from the Linux Mint repositories. Regardless of what settings I apply when trying to use "Geotag images...", nothing happens. There is no indication of success or failure. I load a kml file, select a bunch of images with timestamps, click "OK", and nothing happens.

It's hard to tell if this is a bug or if I'm just doing something wrong. Would you be able to describe the expected behaviour and perhaps provide a working example?

@rnorris
Copy link
Collaborator

rnorris commented Jan 18, 2019

I think that by default when using KML files, the tracks don't have any timestamp information.

When geotagging Viking uses tracks to work out where a timestamped image would be located.
Hence in this circumstance there is no timestamps in the track, so it can't determine where any image would be.

Thus I would recommend converting the information in a KML file into a suitable GPX file that Viking can use e.g.:

gpsbabel -i kml -f file.kml -x transform,trk=wpt -o gpx -F file.gpx

More detailed info:

Viking uses gpsbabel to open KML files, by using the default file conversion from KML to GPX.
This seems to convert KML Paths into GPX tracks.
Paths seem to just be a list of coordinates and hence have no timestamp information.
And converts KML Placemarks into GPX Waypoints (which may have timestamps).
https://developers.google.com/kml/documentation/kml_tut

Note that one can geotag against a single waypoint - this is more for a use case of having created a waypoint for the location of something, which you've taken pictures at - and doesn't care about timestamps - since you're effectively saying these photos are at this position.

Potentially Viking could attempt to interpolate against all waypoints if there is no timestamp information in tracks.
Here I think it would need to (temporarily at least) sort the waypoints by time (as waypoints don't have any guaranteed sort order) to make the interpolation method work more reliably.

@rnorris rnorris changed the title Geotag images does nothing Geotag images does nothing when using KML files Jan 18, 2019
@rwesson
Copy link
Author

rwesson commented Feb 19, 2019

Thanks very much for this information! I'm probably not clear on the terminology but I have KML files that contain time information. And exiftool will tag the images directly from the KML file, eg exiftool -geotag track.kml *.JPG works perfectly. But if I convert the file with gpsbabel as you suggest, Viking will tag it. So I think it would be very useful for it to give an error message suggesting the user convert to GPX when they try to tag using a KML file, instead of the current case where nothing happens.

@rnorris
Copy link
Collaborator

rnorris commented May 12, 2020

I'm making progress on writing my own KML parser as part of #90 which would also address this issue; so I'm asking if it would be possible you could provide one of your KML files as an example, either attach it to here or if you prefer to email it directly to me - rw_norris at hotmail dot com - thanks.

@rwesson
Copy link
Author

rwesson commented May 14, 2020

Here is one (renamed from .kml to .txt to allow it to be attached). As before, exiftool -geotag tagged the images correctly.
BA630-20b98300.txt

@rnorris
Copy link
Collaborator

rnorris commented May 14, 2020

Thanks for that.
It appears this source KML file only has formal timestamps against the waypoints.
It contains time span descriptions for the lines (but these don't appear to be in a defined exchange schema format).

So I don't think my KML parser will help geotagging in this specific instance, so really Viking needs to automatically try against the waypoints (as I previously mentioned). Another job to go on to my TODO list.

rnorris added a commit that referenced this issue Jun 15, 2020
Fallback in trying to geotag against all waypoints of a layer if no match was found against any of the tracks.
Waypoints may have timestamps, so these are converted into a temporary track to geolocate against.
@rnorris rnorris closed this as completed Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants