when I enter a location for a picture, Photos changes it to a different location

When I enter a location for a picture, e.g. "38.007949, -122.487170" in the info panel in Photos, the location that ends up being stored is a different one, sometimes several miles away from what I enter. Every location anywhere in San Rafael, California, gets changed to the location of San Rafael City Hall. Locations in San Francisco, are changed to Twin Peaks in San Francisco.


For me, Photos started behaving this way a couple of days ago (October 2020); previously Photos would just store whatever location I entered. Is anybody else seeing this?


MacBook Pro 15″, macOS 10.15

Posted on Oct 10, 2020 8:10 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 30, 2021 8:36 AM

Amazing! Brilliant! Thank you so much! Yeeppee!


For those who need to know (I didn't previously), you can add a script to the top menu bar with this: https://support.apple.com/guide/script-editor/access-scripts-using-the-script-menu-scpedt27975/


[EDIT] If any of you know of a more elegant / convenient way of installing & triggering the script, could you share?


I kinda improved your script to better suit my needs on 2 aspects:

  • When selecting several photos in Photos, they will all be set to the same location (therefore asking for lat,long only once), matching the behaviour of the Information pane that we've known.
  • Actually display an alert when there is no photo selected (required a try/catch when using the Scripts menu).


tell application "Photos"
	try
		set selectedImages to (get selection)
		if selectedImages is {} then
			error "Please select an image."
		end if
		set response to display dialog "New location:" default answer "" buttons {"Cancel", "OK"} default button "OK" with icon note
		set newLocationString to text returned of response
		if ((button returned of response) = "OK") and (newLocationString is not "") then
			set AppleScript's text item delimiters to ","
			set theLocList to every text item of newLocationString
			repeat with theImage in selectedImages
				set the location of theImage to theLocList
			end repeat
			display alert "New location set to: " & newLocationString
		end if
	on error errorMsg number errorNumber
		display alert errorMsg buttons {"OK"}
	end try
end tell

Similar questions

54 replies
Question marked as Top-ranking reply

Jan 30, 2021 8:36 AM in response to YOCKOW

Amazing! Brilliant! Thank you so much! Yeeppee!


For those who need to know (I didn't previously), you can add a script to the top menu bar with this: https://support.apple.com/guide/script-editor/access-scripts-using-the-script-menu-scpedt27975/


[EDIT] If any of you know of a more elegant / convenient way of installing & triggering the script, could you share?


I kinda improved your script to better suit my needs on 2 aspects:

  • When selecting several photos in Photos, they will all be set to the same location (therefore asking for lat,long only once), matching the behaviour of the Information pane that we've known.
  • Actually display an alert when there is no photo selected (required a try/catch when using the Scripts menu).


tell application "Photos"
	try
		set selectedImages to (get selection)
		if selectedImages is {} then
			error "Please select an image."
		end if
		set response to display dialog "New location:" default answer "" buttons {"Cancel", "OK"} default button "OK" with icon note
		set newLocationString to text returned of response
		if ((button returned of response) = "OK") and (newLocationString is not "") then
			set AppleScript's text item delimiters to ","
			set theLocList to every text item of newLocationString
			repeat with theImage in selectedImages
				set the location of theImage to theLocList
			end repeat
			display alert "New location set to: " & newLocationString
		end if
	on error errorMsg number errorNumber
		display alert errorMsg buttons {"OK"}
	end try
end tell

Jan 30, 2021 4:27 AM in response to fkainz

Finally I found a stopgap workaround for this -- to use AppleScript like below:


tell application "Photos"
	set selectedImages to (get selection)
	if selectedImages is {} then
		error "Please select an image."
	end if
	repeat with theImage in selectedImages
		set title to the name of theImage
		if not (exists (title)) then
			set title to the filename of theImage
		end if
		set response to display dialog "Edit Location of " & title default answer "" buttons {"Don't Edit", "Edit"} default button "Edit" with icon note
		if (button returned of response) = "Edit" then
			set newLocationString to text returned of response
			if not newLocationString = "" then
				set AppleScript's text item delimiters to ","
				set theLocList to every text item of newLocationString
				set the location of theImage to theLocList
				display alert "New location of " & title & ": " & newLocationString
			end if
		end if
	end repeat
end tell


Dec 5, 2020 8:29 AM in response to léonie

Still unfixed (mad)... I have access to the Feedback Assistant, so I submitted the following 'feedback' (hum... bug report). This feedback is related to the publicly deployed version 11.0.1 (20B50) of macOS (not any beta version), so here I am *not* posting anything that would be considered confidential under the NDA rules of the beta tester agreement articles 5 & 6. However the Feedback ID would seemingly fall under these rules, so I'm afraid I'm not allowed to share it for cross-references.


Unable to set location of Photos with GPS coordinates

Description - Since mid-October 2020 approximately, it is impossible to use GPS coordinates (lat,long) to set the location of photos in the macOS Photos app. The Photos app incorrectly changes the location to the nearest city center instead. This is a regression from previous behaviour which occurs in various macOS versions and was not related to any specific macOS update, pointing instead to the malfunction of some cloud-based geolocation API. Check this discussion thread for confirmation and further examples https://discussions.apple.com/thread/251905264?answerId=253951549022

Very often, travelling locations do *not* have a valid street address or nearby POI, which means GPS coordinates are the only way to place those photos on a map. In such case there is no workaround available and this is a critical bug. Please fix!

Steps to reproduce - Open the macOS Photos app, open a photo, press Cmd-I to get photo information, input GPS coordinates in the Location field - for example 42.250024,11.769321

Expected results - As worked previously, the photo should be placed on the map at the location of the GPS coordinates. In this example: within the Necropoli dei Monterozzi.

Actual results - The photo is placed on the map at the city center of the nearest city, or alternatively at some random location. In this example: the photo is moved on the map to the city center of Tarquinia.

Oct 11, 2020 7:52 AM in response to léonie

I just tested on several Macs: The same problem persists on the Macs with macOS 10.14.6 Mojave as well, not only on my Mac with macOS 10.15 Catalina. So it seems to be more a problem with Apple's location database than with the current catalina update.

When I assign this place: -54.63698 -67.764359 (Lago Escondido, close to Ushuaia, Argentina), Photos will move the pin into the center of the South Pacific Ocean and change the GPS coordinates accordingly to -24.8915 -136.5752054. That is nearly 30° farther north and 60° farther west. The entered GPS coordinates are discarded and lost, unless I copy them to the description field.

Oct 12, 2020 7:17 AM in response to Stephan-S

Keep sending feedback to Apple, so it will be fixed, when Big Sur is released. It is strange, that suddenly all my Macs with all system versions, plus the iPhone and the iPad are having problems with the Places in Photos. It looks like the central servers with the location names are causing the problems, not the current Catalina update.


Oct 11, 2020 6:28 AM in response to TonyCollinet

I can confirm this problem. The pin on the tiny location map is in the wrong position, moved to the center of the city.

  • I enter 37.580627 -122.324113
  • and when I read the coordinates back from the photo with AppleScript, they have been changed to 37.547541 -122.314571

And the photos will be exported with the wrong GPS coordinates, many miles off.

This is a disaster.

It seems, we should not use Photos for geocoding, for the time being.


Oct 11, 2020 12:57 AM in response to TonyCollinet

Done a bit more investigation. You can put in the same coordinates numerically and get different results


51.0 0.009800 gives the English channel

However, 51 0.009800 gives "no results"


and

51 0.0098 gives somwhere in Turkey.


I suspect it is not putting the coordinates on a map, and then finding the place - I'm guessing it must have a huge lookup table of places and their coordinates, and is messing up the interpretation of the numbers for the lookup, or the table itself is broken.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

when I enter a location for a picture, Photos changes it to a different location

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.