how to obtain image latitude and longitude?
I have images that should and do have latitude and longitude, as confirmed in the OS X finder, but these seemingly aren't in the output of jpeg-dimensions-and-exif.
Is this expected? What would it take for the library to also provide latitude and longitude?
I also noticed that the EXIF output contained some odd-looking tags like
(pixel-x-dimension . 3264)
(pixel-y-dimension . 2448)
(40965 . 24510)
(sensing-method . "One chip color area")
and
(sharpness . "Normal")
(subject-distance-range . "Macro")
(34853 . 24540)
(image-width . 3264)
Thanks!
Weirdly, GPS information is stored in a separate section of the EXIF data -- you'd have to extend https://github.com/wingo/racket-jpeg/blob/master/exif.rkt#L461 to parse tag #x8825. See EXIF spec version 2.3 section 4.6.3 (B). You'd then need to add an equivalent to define-exif-tag for define-gps-tag; see section 4.6.6 for all the tags you can get out.
I don't have time to work on this in the near future but would be happy to merge patches :) Or to give away the package if you want to maintain it. FWIW I found hacking on this to be a delight, almost magic to see this info pop out of my pictures. I hope you have the same experience if you decide to take a look :)
The odd-looking tags are indeed that, btw -- tags present in the EXIF but which the decoder hasn't been made to understand. If it doesn't know the meaning of the tag, it can't decode the value. Sometimes those tags are nonstandard, but support for them is welcome.