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


Jan 2, 2021 4:24 PM in response to SCM23

Still not working properly - but is vastly improved from when this first cropped up in October.


Then I couldn't even put in the locations of Greenwich Observatory in London without it putting the pin in the north sea. Now I've tried that (fine) and a number of offshore locations to the north east of the UK, and it seemed to get them fine.


However I've just tried the location in the screenshots in Chesapeake Bay, and you can see the result...



That is quite an error.


Jan 31, 2021 5:54 AM in response to YOCKOW

Hello,


I wrote myself an AppleScript app that works similar to the very nice script published here, but additionally writes the location information to the originals of the photos.


This is done by reading the path to the selected photos from the Photos app database of the currently used Photos library, which is usually determined automatically.

If there are several photo libraries, it can happen in a few cases that the currently used Photos library cannot be determined and must be selected manually.


Since I'm not an "identified developer", the app has to be started with a right click on the first start and depending on macOS used additionally selecting it in the Finder, which is explained in the ReadMe.


Maybe this is something for you

kind regards

Sedna


PhotosSetCoordinates



Nov 22, 2020 11:35 PM in response to fkainz

The Apple developers are looking occasionally at these forums, particularly after a software update. But you cannot rely on them to read each and every post. It is far safer to use the provided feedback tools, if you want to be sure that your bug reports will reach the developer team. You may even get a reply and follow up requests for more details, if you use a developer account.

  • For a quick report use the feedback form. Feedback - Photos - Apple
  • For a detailed report with screenshots and other test protocols and system logs use the feedback assistant from a free developer account or the or a beta tester membership.

How to get a developer account: Detailed and Effective Bug Reporting - Apple Community



Jan 2, 2021 5:07 PM in response to SCM23

I have thousands of images with geotagging, face labels, keywords and sometimes lengthy descriptions, and I can't figure out how to extract the the original-quality pictures and the associated metadata from the app. Re-tagging the entire collection is not a realistic option for me, so I'm stuck with Photos.

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.