Opened 6 years ago
Closed 6 years ago
#16465 closed defect (othersoftware)
Error when writing new coordinates
Reported by: | StephaneP | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Plugin photo_geotagging | Version: | latest |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Load a group of .jpg pictures
- Move one picture
- Try to write new coordinates inside the exif data
What happens instead?
The process stopped with java.io.IOException: Not a valid TIFF File
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2018-07-01 23:07:04 +0200 (Sun, 01 Jul 2018) Revision:13996 Build-Date:2018-07-01 21:10:23 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (13996 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 1803 (17134) Memory Usage: 627 MB / 6144 MB (12 MB allocated, but free) Java version: 9.0.4+11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1200 Maximum Screen Size: 1920x1200 Plugins: + DirectUpload (34389) + ImportImagePlugin (34389) + Mapillary (v1.5.14+post13733) + OpeningHoursEditor (34389) + PicLayer (34389) + SimplifyArea (34109) + apache-commons (34389) + apache-http (34389) + areaselector (1529684353) + austriaaddresshelper (1525848529) + buildings_tools (34212) + cadastre-fr (34389) + changeset-viewer (15) + continuosDownload (1530471163) + contourmerge (1033) + download_along (34389) + editgpx (34206) + ejml (34389) + geojson (84) + geotools (34125) + jts (34206) + livegps (34206) + log4j (34038) + merge-overlap (34389) + opendata (34389) + photo_geotagging (34206) + photoadjust (34389) + reverter (34271) + tag2link (34109) + tageditor (34109) + turnlanes-tagging (263) + turnrestrictions (34129) + undelete (34274) + utilsplugin2 (34389) Tagging presets: + E:\OsmIndoor\Dossiers Persos\Antoine\Train_Station-preset.xml + E:\OsmIndoor\200 gares\200gares-preset.xml Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1 - https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss Last errors/warnings: - W: Connexion RATP: Could not get presets icon presets/underground.png - E: Failed to locate image 'presets/toll_station.png' - W: CAB way: Could not get presets icon presets/toll_station.png - E: Failed to locate image 'presets/bollard.png' - W: CAB node: Could not get presets icon presets/bollard.png - E: Failed to locate image 'presets/toilet.png' - W: [NODE, CLOSEDWAY] Toilets: Could not get presets icon presets/toilet.png - W: No configuration settings found. Using hardcoded default values for all pools. - W: Warning: Failed to scan file 'site-svn.openstreetmap.org-_applications_editors_josm_plugins_opendata_modules.txt' for module information. Skipping. - W: Warning: Failed to scan file 'fr.datagouvfr.jar' for module information. Skipping.
Attachments (5)
Change History (19)
by , 6 years ago
Attachment: | photo_geotagging.JPG added |
---|
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:2 by , 6 years ago
Description: | modified (diff) |
---|
comment:3 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:4 by , 6 years ago
Please also share the image file that is mentioned in the error message. Did this work before for the same image source (looks like a tool that converts a movie into images) or is this the first time you try to do this?
comment:5 by , 6 years ago
Here is the .jos session and the picture.
The picture is a real one, and I've already managed a lot of pictures with Josm and these plugins.
I think it's related to the pictures, perhaps with something in the exif metadata.
by , 6 years ago
Attachment: | geotagging_test.zip added |
---|
comment:6 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:7 by , 6 years ago
It's not the same picture than on your screenshot. Does it happen with all files? Also, this picture already has EXIF geolocation, has it been modified with JOSM? If so we would need the original file.
by , 6 years ago
Attachment: | 2018-05-31_09H25mn11s-Cam_avant-YDXJ0476-original.jpg added |
---|
comment:8 by , 6 years ago
Yes it happens with all the files I've modified with my scripts. These scripts use the Mapillary python tools to read and write exif DateTime and gps data.
I just noticed that exiftool warn me for a minor error in the file : Bad InteropIFD directory.
I'll try to investigate tomorrow.
comment:9 by , 6 years ago
Here are the results of my tests:
- With an unedited image, I can write new exif data in the jpg with my scripts as many time as I want without any problem.
- With an unedited image, I can write new exif data in the jpg with Josm as many time as I want without any problem.
But!
My script can calculate the coordinate for a set of images, then write and send a session to Josm, to do a visual inspection before I decide to write the new exif data.
I can reproduce the bug with these steps:
- I load an unedited picture inside Josm with the .jos session.
- I write the new coordinate inside Josm.
- I rewrite the coordinates another time with my script.
Then, some exif data are corrupted.
If I follow these steps:
- I load an unedited picture inside Josm (drag and drop).
- I write the new coordinate inside Josm after a gpx correlation.
- I rewrite the coordinates another time with my script.
Then the exif data are ok.
So it seems there is something wrong with the .jos session, but I don't understand where is the problem.
I've attached a jos and a the jpg file during the various steps with this ticket.
I've already tried to truncate the longitude value in the .jos file. It doesn't correct the bug.
by , 6 years ago
Attachment: | session and jpg.zip added |
---|
comment:10 by , 6 years ago
Can you please launch JOSM in command line and copy/paste the displayed stacktrace when the error happens?
comment:11 by , 6 years ago
Sure, here it is!
But with this file, exiftool is unable to write in the exif too.
2018-07-07 15:23:35.016 INFO: Open 1 files 2018-07-07 15:23:35.375 INFO: Loading E:\sotm_journey\velo\2018-06-01 samedi\test2\droite\2018-06-01_08H18mn13s-Cam_droite-YDXJ0666.jpg using default toolkit 2018-07-07 15:23:35.921 INFO: Loaded E:\sotm_journey\velo\2018-06-01 samedi\test2\droite\2018-06-01_08H18mn13s-Cam_droite-YDXJ0666.jpg with dimensions 3?264x2?448 memoryTaken=30m exifOrientationSwitchedDimension=false 2018-07-07 15:23:39.957 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261148/189010.jpg -> 200 (13.5 kB) 2018-07-07 15:23:40.241 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261141/189015.jpg -> 200 (12.8 kB) 2018-07-07 15:23:40.241 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261142/189010.jpg -> 200 (12.3 kB) 2018-07-07 15:23:40.241 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261141/189010.jpg -> 200 (12.8 kB) 2018-07-07 15:23:40.285 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261141/189011.jpg -> 200 (13.0 kB) 2018-07-07 15:23:40.313 INFO: GET http://proxy-ign.openstreetmap.fr/bdortho/19/261148/189015.jpg -> 200 (13.5 kB) java.io.IOException: Not a Valid TIFF File at org.apache.commons.imaging.common.BinaryFunctions.read4Bytes(BinaryFunctions.java:193) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:154) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:249) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:249) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:118) at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectories(TiffReader.java:111) at org.apache.commons.imaging.formats.tiff.TiffReader.read(TiffReader.java:416) at org.apache.commons.imaging.formats.tiff.TiffReader.readContents(TiffReader.java:408) at org.apache.commons.imaging.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:123) at org.apache.commons.imaging.ImageParser.getMetadata(ImageParser.java:220) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:358) at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:315) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1086) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1079) at org.apache.commons.imaging.Imaging.getMetadata(Imaging.java:1054) at org.openstreetmap.josm.plugins.photo_geotagging.ExifGPSTagger.setExifGPSTagWorker(ExifGPSTagger.java:56) at org.openstreetmap.josm.plugins.photo_geotagging.ExifGPSTagger.setExifGPSTag(ExifGPSTagger.java:44) at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.processEntry(GeotaggingAction.java:222) at org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingAction$GeoTaggingRunnable.realRun(GeotaggingAction.java:249) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)
by , 6 years ago
Attachment: | exif dump.zip added |
---|
comment:12 by , 6 years ago
Here are the exif dump from exiftool.
https://josm.openstreetmap.de/attachment/ticket/16465/exif%20dump.zip
If someone know how to understand this, perhaps it could be useful.
comment:13 by , 6 years ago
I just made some modification in my script to use the latest mapillary_tools' release which doesn't use pexif anymore, but piexif.
And now Josm doesn't complain anymore if I try the same previous steps.
I don't know if switching to piexif is only a workaround and there is still something weird in the way Josm write the exif tags, but it's a so special case that I think we can close this ticket.
comment:14 by , 6 years ago
Resolution: | → othersoftware |
---|---|
Status: | new → closed |
Can you please share your JOSM session file when the error occurs? Thanks.