Skip to content

Reading latitude longitude data from geotags

2 messages · Proosdij, Andre van, Michael Sumner

#
You can get a start at this with rgdal, I used GDALinfo to read in
EXIF metadata from one of the example files here:

http://owl.phy.queensu.ca/~phil/exiftool/sample_images.html

library(rgdal)
x <- GDALinfo("AcerCE-5330.jpg")
 attr(x, "mdata")
[1] "EXIF_ColorSpace=1"
"EXIF_ComponentsConfiguration=0x1 0x2 0x3 00"       "EXIF_Contrast=0"
 [4] "EXIF_CustomRendered=0"
"EXIF_DateTime=2009:10:10 22:58:22"
"EXIF_DateTimeDigitized=2009:10:10 22:58:22"  ...
...

I'm not familiar with this system so I don't know whether other files
have the position informationm but it might be worth a look on your
file and you could parse those strings easily enough.

A search for "exif" using sos pulled up a few more possible leads too:

library(sos)
findFn("exif")

(I'm not sure if the name of the "sos" "findFn" function is mean to be
ironic somehow, but I often type it incorrectly and have to look it up
again).

Cheers, Mike.



On Wed, Jun 12, 2013 at 11:11 PM, Proosdij, Andre van
<andre.vanproosdij at wur.nl> wrote: