JoshOBrien / exiftoolr

ExifTool Functionality from R
https://joshobrien.github.io/exiftoolr/
23 stars 1 forks source link

Use of exif_call() to geotag photos #2

Closed Bartesto closed 4 years ago

Bartesto commented 4 years ago

Hi Josh,

Firstly thank you for creating this wrapper. We have been keen to add GPS tags to site and drop camera photos for ages and to potentially do it all from R would be brilliant.

I just can't seem to get the exif_call() function to handle this use case, no doubt a syntax issue on my part, and was wondering if you could assist.

I'm using a Windows OS so followed your install instructions and can reproduce your example.

On doing some digging I came across some insight from Phil Harvey which appears to suit my case here.

I attempted to recreate his example by: exif_call(path = "./photos/BHuntley-14-09-19-8310.jpg", args = c("-csv=./photos/position_data.txt", "-gpslatituderef=N", "-gpslongituderef=W"))

The position_data.txt is set up similar to the example but only contains SourceFile, GPSLatitude, and GPSLongitude headers with data for the image specified.

When I run it it gives me the diagnostic "1 image files updated" but when I call exif_read(./photos/BHuntley-14-09-19-8310.jpg, tags = "GPS") it returns no gps related attributes and only the SourceFile name.

I'm doing all of the above within an RStudio project (hence the filepaths).

Any ideas?

Thanks Bart

Bartesto commented 4 years ago

Sorry Josh!

Digging further I found that its working fine. Just needed a wildcard "*" to return all GPS added attributes.

Thanks again.

JoshOBrien commented 4 years ago

@Bartesto

Super! Glad exif_call() ended up working for you and also happy to hear that the package is getting used by others.

-Josh