Add search by GPS coordinates on Google Maps

Started by Valour549, August 08, 2021, 10:13:41 PM

Previous topic - Next topic

Valour549

So in the old days I use OPanda IExif, which has a really convenient feature of opening up Google Maps using the GPS coordinates contained in the exif. Like in the screenshots below.

Nowadays I enjoy the fantastic ImageGlass which has incorporated the equally fantastic exiftool.exe functionality into its interface (the tool still opens separately as a program), and it would be really awesome to have that function as well.

Because often one would browse old photos and think really hard hmmm where was this taken? And two clicks later you remember.

I did however note in the "GPS Position" column exiftool uses deg instead of the symbol ° , which Google Map does not recognize as valid. So that small change would need to be made if this functionality were ever to be incorporated into exiftool.

Thanks.

StarGeek

Quote from: Valour549 on August 08, 2021, 10:13:41 PM
I did however note in the "GPS Position" column exiftool uses deg instead of the symbol ° , which Google Map does not recognize as valid. So that small change would need to be made if this functionality were ever to be incorporated into exiftool.

You can use the -c (-coordFormat) option to format the coordinates any way you want.  Or you can use the -n (--printConv) option and exiftool will return the coordinates as decimal.

Finally, you can use the config file in this post and get an URL to display the coordinates on Bing, Google, MapQuest, Open Street Maps, or Yandex.
Example output of the config file
C:\>exiftool -config GPS2MapUrl.config -G1 -s -GPSLatitude# -GPSLongitude# -*mapsurl y:\!temp\Test4.jpg
[Composite]     GPSLatitude                     : 40.6892
[Composite]     GPSLongitude                    : -74.0445
[Composite]     BingMapsUrl                     : https://bing.com/maps/default.aspx?cp=40.6892~-74.0445&sp=point.40.6892_-74.0445_.
[Composite]     GoogleMapsUrl                   : https://www.google.com/maps/search/?q=40.6892,-74.0445
[Composite]     MapquestMapsUrl                 : https://www.mapquest.com/?q=40.6892,-74.0445
[Composite]     OpenStreetMapsUrl               : https://www.openstreetmap.org/?mlat=40.6892&mlon=-74.0445
[Composite]     YandexMapsUrl                   : https://yandex.com/maps/?ll=-74.0445%2C40.6892&text=40.6892%2C-74.0445
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

sevy

I often use XnView (when a picture has GPS, you can see it on your favorite browser) or XnViewMP (with integrated view of GoogleMaps).
https://www.xnview.com/en/

Valour549

Quote from: StarGeek on August 08, 2021, 11:41:17 PM
Quote from: Valour549 on August 08, 2021, 10:13:41 PM
I did however note in the "GPS Position" column exiftool uses deg instead of the symbol ° , which Google Map does not recognize as valid. So that small change would need to be made if this functionality were ever to be incorporated into exiftool.

You can use the -c (-coordFormat) option to format the coordinates any way you want.  Or you can use the -n (--printConv) option and exiftool will return the coordinates as decimal.

Finally, you can use the config file in this post and get an URL to display the coordinates on Bing, Google, MapQuest, Open Street Maps, or Yandex.
Example output of the config file
C:\>exiftool -config GPS2MapUrl.config -G1 -s -GPSLatitude# -GPSLongitude# -*mapsurl y:\!temp\Test4.jpg
[Composite]     GPSLatitude                     : 40.6892
[Composite]     GPSLongitude                    : -74.0445
[Composite]     BingMapsUrl                     : https://bing.com/maps/default.aspx?cp=40.6892~-74.0445&sp=point.40.6892_-74.0445_.
[Composite]     GoogleMapsUrl                   : https://www.google.com/maps/search/?q=40.6892,-74.0445
[Composite]     MapquestMapsUrl                 : https://www.mapquest.com/?q=40.6892,-74.0445
[Composite]     OpenStreetMapsUrl               : https://www.openstreetmap.org/?mlat=40.6892&mlon=-74.0445
[Composite]     YandexMapsUrl                   : https://yandex.com/maps/?ll=-74.0445%2C40.6892&text=40.6892%2C-74.0445


That looks very useful, but where exactly do I add stuff like -config GPS2MapUrl.config and -c FMT (-coordFormat)? Namely which files and where.

As mentioned I use ImageGlass and the author of that basically only told us to put exiftool.exe in the same folder as the ImageGlass.exe. I assume I need some other files.

StarGeek

The example I give showed how to use the config on the command line.  You would download the config file in the linked thread and place it in the same directory as exiftool.

The -c option would be that option followed by a format string as shown in the link to the docs.  Taking the default listed there and swapping in the character you want would result in
exiftool -c "%d° %d' %.2f"\" -GPSLatitude -GPSLongitude file.jpg

I don't know about ImageGlass or how flexible it is or if it can be expanded to include other exiftool options.  I was just pointing out that exiftool can already do some of the stuff you want.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Valour549

Quote from: StarGeek on August 11, 2021, 12:25:23 AM
The example I give showed how to use the config on the command line.
Where or what is the command line? Could you kindly screenshot, cheers.

StarGeek

On Windows it would be CMD or PowerShell.  On Mac it would be Terminal.  On Linux it would be the Bash Shell or some variation of that. 

The command line is where you would type in commands to run instead of clicking buttons in a GUI.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Cool screen capture.  You should put that in the Newbies "Getting Started" thread.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

The fact that it exists implies that I probably posted it somewhere on the forums before.  Or at the very least planned to.  But I'm not sure what use it miight be because of the fact that I extensively use my personal shortcuts, my text replacement program, and copy/paste from the clipboard in it.  Someone might see that I typed "et" and list a tag called "dto" and get confused.

The recording program, Terminalizer, is nodejs and cross platform.  The main problem I had with it was a lack of timing controls.  It should be easier to speed up the typing part, then pause for time to read it.  It logs the key presses in a text file so you could edit it that way, but that's not quick/easy.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype