Opened 6 days ago
#24784 new defect
Misleading error message when using auto-guess for geotagging
| Reported by: | tpongo | Owned by: | team |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Core image mapping | Version: | |
| Keywords: | Cc: |
Description
I tried to use the Correlate images with GPX track option for my imported Geotagged images but when I clicked on the Auto-guess button I got the following error message:
The selected photos do not contain time information.
I checked that my images do indeed have time information in their exif. What turned out to be my mistake is that the imported photos already had geo location data but I did not tick the Override position for Images with geo location in exif data checkbox.
It took quite some time to figure out why this function was not working because I was focusing of the exif time data stored in the photos. So The error message is quite misleading.
The bug is in the /core/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java file. Specifically List<ImageEntry> getSortedImgList() returns an empty list if the above mentioned checkbox is not ticked but all the images have exif geo location data. Then the error message is shown when a IndexOutOfBoundsException is caught due to the empty list. However the exception can have two reasons: one is that the photos do not contain time information as the error message says or that the photos already contaion geo location data but the override checkbox was not selected.


