I use Applescript to copy latitude,longitud from one picture in photos, the another script to paste those coordinates into one or more pictures. Pasting in this way writes the correct coordinates into the picture, while pasting into the location fields of the Information pop-up window triggers a search and replaces your coordinates with some other place (in text format).
Here are the scripts:
COPY
-- on run {}
tell application "Photos"
activate
set imageSel to (get selection) -- get the selected image
if imageSel is {} then
display dialog "Please select an image." buttons ¬
"OK" with icon caution default button "OK"
end if
tell the first item of imageSel
set loc to get the location --retrieve longitude and latitude as list
set lati to (the first item of loc) as string
set longi to (the second item of loc) as string
set alti to get the altitude as string -- retrieve the altitude
end tell
set tim to get (the date of the first item of imageSel)
set tim to tim as string
-- display the result in a dialog panel. Just for checking
set panel_message to "Date:
" & tim & "
Latitude: " & lati & "
Longitude: " & longi & "
Altitude: " & alti & "
Lat/Lon copied to the clipboard"
display dialog panel_message buttons ¬
"OK" with icon note default button "OK"
end tell
-- copy the GPS data to the clipboard
#set clipboard_message to " " & lati & " " & longi & " " & alti
set clipboard_message to lati & " " & longi
set the clipboard to clipboard_message
return clipboard_message
PASTE:
-- on run {}
tell application "Photos"
activate
set imageSel to (get selection) -- get the selected image
if imageSel is {} then
display dialog "Please select one or more images." buttons ¬
"OK" with icon caution default button "OK"
end if
set lat_lon to the clipboard --retrieve longitude and latitude from clipboard
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set lat_lon_array to every text item of lat_lon
set AppleScript's text item delimiters to oldDelimiters
--display dialog lat_lon_array
set counter to 0
repeat with one_image in imageSel
tell one_image
set location to lat_lon_array
end tell
set counter to (counter + 1)
end repeat
display dialog "Coordinates pasted into " & counter & " images:
" & lat_lon buttons ¬
"OK" with icon note default button "OK"
end tell