Opened 10 years ago
Closed 10 years ago
#10853 closed enhancement (fixed)
[patch] Save GPS image direction, use NewGpsData flag
Reported by: | holgermappt | Owned by: | bastiK |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin photo_geotagging | Version: | |
Keywords: | Cc: |
Description
Two enhancement requests:
1) Please save the GPS image direction in addition to the other GPS data. This is the variable exifImgDir of org.openstreetmap.josm.gui.layer.geoimage.ImageEntry. Query with getExifImgDir(). The EXIF field is GPSImgDirection. Requires the second EXIF field GPSImgDirectionRef with value T.
2) Please use the ImageEntry flag isNewGpsData (query with hasNewGpsData()) to decide which photo needs to be saved. That flag was added about a year ago, rev. 6392. The idea is to have a generic "modified GPS data" indication. Until now the GPS time must be present, which is a problem if that time is unknown. The current workaround is to make up a GPS time. You could check with (e.hasNewGpsData() || e.hasGpsTime())
.
I can help and write some code, if you wish.
Thanks,
Holger
Attachments (4)
Change History (13)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
exifImgDir
: I'm working on an enhancement of the PhotoAdjustPlugin that allows to set or change the image direction. Or someone could implement ticket:10235.
I will prepare example photos and attach them to this ticket. I will also prepare a patch with the code changes.
comment:3 by , 10 years ago
The file modification time can be set to the GPS time, to the old file time, or to the current time. But what should happen if GPS time was selected and there is no GPS time? The closest would be the EXIF time, that's what happens now (in ImageEntry). Is that fallback acceptable?
by , 10 years ago
Attachment: | exifgps.jos added |
---|
JOSM session file with photos and modified positions and directions
comment:5 by , 10 years ago
The patch is ready. I couldn't resist to add the speed too. The session file includes some modifications that need to be saved with the plugin (position, image direction). The photos must be in the directory where JOSM is started (relative paths in the session file). The GPS time is not set, but the isNewGpsData flag is.
There are some very long lines. I'm not sure what your maximum line length is.
comment:6 by , 10 years ago
Milestone: | → 15.01 |
---|---|
Summary: | Save GPS image direction, use NewGpsData flag → [patch] Save GPS image direction, use NewGpsData flag |
comment:8 by , 10 years ago
In [o30887]: see #josm10853 - Save GPS image direction, use NewGpsData? flag (patch by holgermappt)
comment:9 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Looks good, thanks for the patch!
Sounds good and I would appreciate some help!
Could you give some background, where the
exifImgDir
info comes from if not from the photo exif? Is this related to upcoming changes of the PhotoAdjustPlugin? Some example images for testing would be nice, e.g. one without GPS time, etc.You can just commit your changes and link them in this ticket. Or attach a patch if you like to discuss it first.