Using Exiftool to match pics up with trips taken

Started by mindful crew, March 14, 2019, 01:21:32 PM

Previous topic - Next topic

mindful crew

Hi there,

I am leading a development team looking to use EXIF information on photos in order to match the images to trips already logged on a web app. The trips have date ranges, and we would like the users to be able to upload pics via there iPhones/ipads etc to the app and have the images matched with the trips they have already taken/logged.  Could Exiftool be used for this?

Any help or advice would be greatly appreciated!!

StarGeek

As long as the exif data is correct and intact, then exiftool could be used to check if an image is in a date range.  The basic command would be along the lines of
exiftool -if "$DateTimeOriginal gt '2018:01:01' and $DateTimeOriginal lt '2018:02:01'" -DateTimeOriginal FILE

That command checks to see if the DateTimeOriginal value is between the string values of 2018:01:01 and 2018:02:01.  This is just a general example and you can manipulate things further as needed.  For example, using the -d (dateFormat) option with %s argument (-d %s), then the time stamp would be returned in epoch time and you could do exact numerical check.

This all would depend upon accurate data embedded in the image, of course.  If someone takes a screen shot of an image and then uploads that, there isn't going to be any data for you to check.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).