Newer cameras and phones with built-in GPS can be wonderful tools for data collection, as they help keep track of exactly where and when a picture was taken. However, not all cameras have a built-in GPS. You can add geotags afterwards, either with a GPS log from a separate GPS unit or just using a reference map and your memory or notes.
For this recipe, you'll need a some photos and either a GPS log (*.gpx), reference vector, reference raster, or coordinates. We've provided centerofcalifornia.jpg in the geotag folder, and the coordinates are in the image itself but also included as a point in centerofcalifornia.shp.
You will also need the Geotag photos plugin, which requires the exiftool program to be installed on your system. If exiftool didn't come with your install, you can easily get it from the Web at http://www.sno.phy.queensu.ca/~phil/exiftool/ or at package repositories (Linux).
This particular plugin assigns location per folder, so all photos in a folder will get the same coordinates. This works well for batch assigning of general coordinates:
centerofcalifornia.shp.geotag folder.
Exiftools writes to the built-in metadata of an image file to a section called EXIF. It's a standard in photography to store extra data about photos that many software management tools can easily read from. Latitude and Longitude in WGS 84 coordinates are the standard method of encoding GPS data within the EXIF section.
Now that you have a geotagged photo, you can upload it to sites such as Flickr, which will display it on a map, or skip to the recipe Viewing Geotagged Photos in Chapter 4, Data Exploration, for how to make a map in QGIS.
This plugin is very manual and assigns location per folder as it was created to work specifically with camera traps. Instead, if you were travelling between each photo location and have a GPS log, there are other non-QGIS tools to help you match GPS points with your photos. Digikam (a photography management tool) has a function to geotag based on timestamp matches.