2

I have a bunch of Geotagged pictures that I'm accessing in python using pyexiv2. It's working great except I don't understand what the "GPSImgDirection" value is giving. Basically, it's two great big numbers, for example:

2147483647/8613474

What does that mean? I think it's a "rational" data type. What does that mean? How can I turn the number into something people could understand, such as "5 degrees East of North"?

Thanks! Alex

Alex S
  • 4,726
  • 7
  • 39
  • 67
  • 1
    I make that 249 degrees, or roughly South West. The specification doesn't like floating point numbers because different computers represent them differently. I think it's the direction the camera was looking. – Mark Setchell Sep 11 '14 at 20:14
  • Ok thanks, so it's just the one number divided by the other? It's just a big fraction? – Alex S Sep 11 '14 at 21:36
  • I believe so, but would suggest you do a quick check with a few test shots facing a couple of different directions. – Mark Setchell Sep 12 '14 at 06:29
  • Seems to work! Thanks a lot. If you make it an answer I'll tick it – Alex S Sep 12 '14 at 16:45

1 Answers1

8

Mark correctly informed me that this is just a big fraction. So:

2147483647/8613474 = 249.3 degrees

So starting from due North as 0 degrees and going clockwise, it's saying it's roughly SW or W.

Alex S
  • 4,726
  • 7
  • 39
  • 67