“Geotags” was a nice feature included in Windows Photo Gallery, and in response to a question I am writing this post.
First, a quick explainer on how geotags are saved in image files and used to work in Windows Photo Gallery (WPG) – As you may know, photo files such as JPG can store additional information called metadata. The best analogy is a printed picture with written information written on the back. There are multiple ways (formats) of writing this information known as EXIF, IPTC, XMP. Think of it as paper forms with fields (such as date, time, caption, locations) to fill in, which are added to a photo.
The fields which Windows Photo Gallery uses for geotags are: IPTC Core and Extension Location Fields (Location, City, State/Providence, Country) and EXIF GPS Latitude, GPS Longitude.
Here is the general logic behind Windows Photo Gallery’s Geotags in order:
1. If a photo already contains Location, City, State/Province and Country fields filled in, WPG would use the information it has to display as the Geotag. It would display the IPTC Extension fields first (if available) and the IPTC Core “legacy” fields (if available) second.
2. If a photo has GPS Latitude and Longitude, but no City, State/Province, or Country information then WPG would consult a Microsoft web service to determine the “Geotag” based on latitude and longitude, this process is called reverse geocoding. It will not however, write the “Geotag” information back to the file, unless it is edited manually.
3. If you, the user, edit a Geotag in WPG manually, it will be saved back to the file and that information becomes the “geotag”. However, here it is where it gets a bit tricky- There are multiple Location, City, State/Province, Country fields among the different metadata standards (IPTC and within XMP). WPG uses the “IPTC Extension- Location Created” fields to store the “Geotags” info within the photo.
Here is an example of the metadata from one of my photos. You will note multiple fields which may seem to contain redundant information, but the ones WPG would write to are just four which start with “Location Created”. These fields are detailed in the 2008 IPTC Extension Spec, further discussion on how this information is handled by certain applications can be found on the Metadata Working Group Spec.
|Location Created City||Seattle|
|Location Created Country Name||United States|
|Location Created Province State||Washington|
|Location Created Sublocation||Seattle Central Library|
Given that Microsoft decided to discontinue WPG last year, the service which determines the geotags is no longer working, so holdout users may find these fields empty or have trouble adding new geotags. Hence, exiftool, Lightroom or other photo management applications will only be able to show you geotag information if it was written within the file.
As a workaround, I rely on a freeware application called GeoSetter (which internally uses exiftool). Geosetter uses a service from Geonames.org to aid in finding location info as well it allows users to edit them manually. I exclusively have been using GeoSetter for some time, which unlike WPG it will always save the information back to the photo file. GeoSetter also allows one to edit the latitude and longitude info, which I was unable to do so in WPG.
However, as good as the Geosetter is, there is a slight catch – Geosetter by default does not read nor write to the newer 2008 IPTC Extension format which Windows Photo Gallery writes to. This is not just an issue with Geosetter, other photo management tools, like XnView MP, still primarily use the IPTC Core “legacy” Location fields, instead of the newer IPTC Extension Location fields. The IPTC Photo Metadata User Guide, explains the reasoning of creating the IPTC Extension fields. Luckily, Geosetter is versatile enough to provide a means for a workaround.
To make GeoSetter read any existing WPG Geotag – You will need to copy any saved “geotag” information from the IPTC Extension, to the equivalent IPTC Core fields using an exiftool command. In a previous post I described how to use exiftool for accessing Windows Photo Gallery. You will only need to run this step once on your photos from the command line. I advise you to make a backup copy of your files before executing it.
exiftool *.jpg -"Location<LocationCreatedSubLocation" -"City<LocationCreatedCity" -"Province-State<LocationCreatedProvinceState" -"Country<LocationCreatedCountryName" -r -overwrite_original
-r means that it will execute recursevly, so that all subfolder are included.
-overwrite_original means that exiftool will not create a backup of the file.
Again, this will only work on file which WPG saved the geotag information to the file, otherwise the fields will be empty.
To configure GeoSetter write back information to the newer format when an edit is made– In the GeoSetter application menu, go to File | Settings. In the Settings dialog, go to the “ExifTool” tab. Ensure that the “Use Additional Exiftool Commands after GeoSetter command” checkbox is enabled and add this text to the text field underneath:
-execute -"LocationCreatedSubLocation<Location" -"LocationCreatedCity<City" -"LocationCreatedProvinceState<Province-State" -"LocationCreatedCountryName<Country" -"LocationCreatedCountryCode<CountryCode"
I would leave this setting in GeoSetter, as it will make sure that location information is also saved to the IPTC 2008 Spec fields.
If you are still a die hard Windows Photo Gallery fan, you will find the geotag information populated with what you was entered by GeoSetter. While the reverse geocoding capability may be gone, you can still use WPG sort by GeoTag and Search functionality as before. Still, looking forward, I would avoid editing geotags in WPG and rely instead on GeoSetter as a replacement for this functionality in order to avoid the problems described.
- Metadata Working Group
- [Video] Using Geotags in Windows Photo Gallery
- Geoff Coupe’s Blog – Windows Photo Gallery, Geotags and Other Issues
- Accessing Windows Photo Gallery Metadata using Exiftool
- Using IPTC location identifiers to link your photos to knowledge bases