Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

t202109

macrumors newbie
Original poster
Nov 20, 2021
1
1
Here is a script I put together that will allow you load GPS locations into the the Mac Photos app from a GPS data exchange (GPX) file. (GPX is a standard XML format that contains longitude and latitude location data.) I wrote this in order to apply GPS data tracks generated on my iPhone using the very excellent "GeoTagr" app. This app has a free companion app for the Mac that allows you apply the GPS data recorded on your phone to the photo files you've downloaded from your camera. The problem with this app is that it creates "sidecar .XMP" files (for RAW, at least) that the Apple Photos app no longer recognizes when you import files into Photos. (The old iPhotos app does indeed use these files... very disappointing that Apple decided to no longer support their own format.)

So, I wrote this script in order to apply the data from the GeoTagr app after importing my pictures into Photos. To use it, just select the relevant photos in the Photos app and then run the script. You can implement this script in several ways (as a simple workflow, an application, or a service), but I recommend setting it up as a "Quick Action" service in Automator. This allows you to call the script from the "Services" menu in Photos. You just need to create a new Quick Action in Automator, add an "Run Applescript" action from the library, and then copy-and-paste in the script below. I call my own service "Set Places from GPS Tracking File".

Attached are the script (as .zip and .txt files) and a screenshot of how I set this up in Automator.
 

Attachments

  • Set Places from GPS Tracking File.jpg
    Set Places from GPS Tracking File.jpg
    191.4 KB · Views: 141
  • Set Places from GPS Tracking File.scpt.txt
    12.4 KB · Views: 139
  • Set Places from GPS Tracking File.scpt.zip
    25.4 KB · Views: 134
  • Like
Reactions: Slartibart
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.