jauharshaikh / metadata-extractor

Automatically exported from code.google.com/p/metadata-extractor
0 stars 0 forks source link

GPS metadata retrieval #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, I shot a photo with an HTC Android smartphone.

The metadata extraction library correctly shows GPS values but does not for 
all. Actually there are problems with fields name, "GPS Img Direction Ref" and 
"GPS Img Direction". Problems occurs also for tag 27 (0x001B) 
GPSProcessingMethod or "Name of GPS processing method" and tag (0x001D) 
GPSDateStamp or "GPS date".

Sincerely
Antonio Merola

Original issue reported on code.google.com by amerolas...@gmail.com on 4 May 2011 at 2:36

GoogleCodeExporter commented 8 years ago
Hi Antonio,

Can you confirm whether you are using the current SVN head or version 
2.4.0-beta1?  The SVN head has a bunch of improvements to GPS (and other areas.)

Also, do you have a sample image you could attach to this issue that you're 
happy to include in the (public) test suite?  That would really help me fix 
this bug if it's still there, or at least make sure it doesn't appear in future 
:)

Many thanks,

Drew.

Original comment by drewnoakes on 4 May 2011 at 2:47

GoogleCodeExporter commented 8 years ago
To be more precise, in the photo I sent you have:

GPS Img Direction:      True direction
Unknown tag (0x0011):   35334/199 degrees

Actually the first is "GPS Img Direction ref" and the 2nd is "GPS Img Direction"

Original comment by amerolas...@gmail.com on 4 May 2011 at 4:46

GoogleCodeExporter commented 8 years ago
I don't see any image attached to this issue or in my email.  Could you let me 
know where you sent it, or attach another to this issue?  I can't really do 
much about this problem without an image that reproduces the problem.  Thanks.

Original comment by drewnoakes on 4 May 2011 at 7:31

GoogleCodeExporter commented 8 years ago
Drew, the first issue is just a copy and paste problem. File GPSDirectory.java 
lines

112. tagNameMap.put(new Integer(TAG_GPS_IMG_DIRECTION_REF), "GPS Img Direction 
Ref");
113. tagNameMap.put(new Integer(TAG_GPS_IMG_DIRECTION_REF), "GPS Img 
Direction");

I suppose line 113 should be:
113. tagNameMap.put(new Integer(TAG_GPS_IMG_DIRECTION), "GPS Img Direction");

Am I right?

Thanks
Antonio

PS. Did u receive my email?

Original comment by amerolas...@gmail.com on 5 May 2011 at 2:31

GoogleCodeExporter commented 8 years ago
However if you have problem getting my email. Please get in attach the picture.
Bye
Antonio

Original comment by amerolas...@gmail.com on 5 May 2011 at 2:35

Attachments:

GoogleCodeExporter commented 8 years ago
Drew, you need also to add missing tags into file GpsDirectory.java; here you 
go:

   /** Name of GPS processing method GPSProcessingMethod 27 1B UNDEFINITE Any */
    public static final int TAG_GPS_PROCESSING_METHOD = 0x001B;
   /** Name of GPS area GPSAreaInformation 28 1C UNDEFINITE Any */
    public static final int TAG_GPS_AREA_INFORMATION = 0x001C;
   /** GPS date GPSDateStamp 29 1D ASCII 11 */
    public static final int TAG_GPS_DATE_STAMP = 0x001D;
   /** GPS differential correction GPSDifferential 30 1E SHORT 1 */
    public static final int TAG_GPS_DIFFERENTIAL = 0x001E;

and

    tagNameMap.put(new Integer(TAG_GPS_PROCESSING_METHOD), "GPS processing method ");
    tagNameMap.put(new Integer(TAG_GPS_AREA_INFORMATION, "GPS area");
    tagNameMap.put(new Integer(TAG_GPS_DATE_STAMP, "GPS date");
    tagNameMap.put(new Integer(TAG_GPS_DIFFERENTIAL, "GPS differential correction");        

I suppose you should also modify GpsDescriptor.java. 
Let me know.
Ciao
Antonio

Original comment by amerolas...@gmail.com on 5 May 2011 at 2:49

GoogleCodeExporter commented 8 years ago
Hi Antonio,

Thanks very much for this.  The first bug was fixed a few days ago [1], and I 
will add these new tags when I get home later today.

If you get a chance to test the code in SVN head it'd be great to hear how you 
find it.  I'd like to get some feedback before I bundle the next version for 
release, and it's pretty stable now after the recent flurry of activity.

All the best,

Drew.

[1] 
http://code.google.com/p/metadata-extractor/source/browse/trunk/Source/com/drew/
metadata/exif/GpsDirectory.java

Original comment by drewnoakes on 5 May 2011 at 3:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ok, the svn already includes the tags. You just need to modify line

92. public static final int TAG_GPS_AREA_INFORMATION = 0x001D;

with

public static final int TAG_GPS_DATE_STAMP = 0x001C;

;)
bye
Antonio

Original comment by amerolas...@gmail.com on 5 May 2011 at 4:04

GoogleCodeExporter commented 8 years ago
Actually according to this site [1] there is an error, but it's on a different 
tag.

TAG_GPS_AREA_INFORMATION should be 0x001C

Does that differ with what you have observed?

[1] http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html

Original comment by drewnoakes on 5 May 2011 at 4:10

GoogleCodeExporter commented 8 years ago
I've checked the fix for this in.  Does this look right for you?

http://code.google.com/p/metadata-extractor/source/diff?spec=svn81&r=81&format=s
ide&path=/trunk/Source/com/drew/metadata/exif/GpsDirectory.java

Original comment by drewnoakes on 5 May 2011 at 4:11

GoogleCodeExporter commented 8 years ago
Hi Drew, 
yes look right. Please also get in attach another pictures with GPS data.

Cheers
Antonio

Original comment by amerolas...@gmail.com on 6 May 2011 at 8:46

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you again Antonio.  I have added these to the sample image library in 
revision 82.

Original comment by drewnoakes on 6 May 2011 at 3:03