Opened 8 years ago
Last modified 8 years ago
#16681 closed enhancement
[Patch] Various enhancements for GPX correlation — at Initial Version
| Reported by: | Bjoeni | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 18.09 |
| Component: | Core image mapping | Version: | |
| Keywords: | gpx, correlate, geoimage, image mapping, tag | Cc: | stoecker |
Description
I recently started tagging lots of my photos with existing GPX tracks and wanted to do this with JOSM. Since I combined my tracks from different sources, I wanted to interpolate between the tracks and had to modify the method a bit. Well... then I ran into some more trouble (mainly because of messed up, but according to the TopoGrafix standard perfectly correct GPX files) and decided to put all the modifications in a patch. Even though that is not the main purpose of JOSM (and I would be perfectly fine with the whole tagging stuff being in a plugin), I think that the GPX correlation should work properly (and be usable with all kinds of valid GPX files) if it's a part of JOSM core after all.
So here's what I ended up changing:
- Interpolation of timestamps within segments, if missing (mainly for manually modified GPX tracks)
- Options to interpolate between tracks/segments, depending on distance/time
- Options to determine whether images close to the end of a track should be tagged (instead of a hardcoded value only applying *before* segments)
- Sort tracks and segments in the file by timestamps (and therefore allow correct tagging and interpolation if that's messed up)
- Option to temporarily force tagging of all pictures (by applying the settings above)
- fixed bug that caused problems with empty segments or entire segments without waypoints
- Set elevation and speed only when photo is actually within a track segment
- fixed bug that didn't show a preview of the currently tagged photos when the dialog was first opened
- inverted the way timezones are applied (the set timezone must be substracted from the EXIF time in order to get ZULU time, not added and that's also conform with what the setOffset dialog returns)
- use regex to parse timezone and allow more than ±12h, e.g. DST in New Zealand is UTC+13, Samoa can have UTC+14
- add GPX files to the Combobox in the dialog if they are added (as a layer) while the dialog is opened
Ideas that could implemented in the future (by me or anyone else)...
- try to determine the timezone from the loaded pictures by the EXIF 2.31 OffsetTime tags, difference of UTC EXIF tags and timezone specific EXIF tags or the timezone of the modification date, if applicable (i.e. if modification date equals DateTimeOriginal except for the offset)
- allow existing timestamps to be overwritten without removing all existing ones that are not covered by the current track
- allow multiple tracks to be processed and prioritized (from different sources, e.g. GPS + phone + Google Timeline) [cut overlapping parts of less important tracks and replace by more important ones -> merge before handling]
These are quite a lot of changes and I tested everything as far as I could... but GPX files can be quite messed up and I'm open to feedback (regarding bugs, style, whether these changes make sense at all, whatever...).
Because of the JSpinners in the JCheckboxes, I had to split up the strings. Any idea how to handle that for translation? Use trc and copy the other half in the context? Or use a sign inside the string to split it up after translation?
And it might be a good idea to split up the CorrelateGpxWithImages.java, I left it in one file for the time being to keep the patch smaller.
This is the advanced options dialog with the default settings at the moment:

Change History (3)
by , 8 years ago
| Attachment: | AdvancedDialog.png added |
|---|
by , 8 years ago
| Attachment: | GeoimageSettings.png added |
|---|
by , 8 years ago
| Attachment: | GPXCorrelate.patch added |
|---|



