Simple reverse geocoding with Python and ExifTool
ExifTool for reading/writing EXIF/IPTC/XMP tags in images, pyexiftool for using ExifTool from Python, and geopy for reverse geocoding. This script has only been used with Python 3.5.2.
Run the following command
python reverse_geo.py files
where files are the images to be updated. ExifTool will not override the files; the originals will be renamed with _original
at the end.
This is just a simple script which copies XMP tags to IPTC (since darktable currently does not write IPTC tags) and then uses embedded GPS coordinates to do a reverse lookup and fill in location tags. This last part has only been tested in European cities, and some rural US areas where it uses county if no city information. This should cover a lot of use cases, but might need to be updated with more sophisticated handling for other locations. This is written with Metadata Working Group MWG standards as handled by ExifTool.