Script to update altitude based on longitude, latitude

Started by Tom Cunningham, February 19, 2016, 11:41:11 PM

Previous topic - Next topic

Tom Cunningham

Is there an exiftool script that will update the altitude info for a photo based on the existing longitude and latitude?  I'm assuming this would involve a lookup into USGS or NASA elevation databases.

StarGeek

If you're on Windows, Geosetter will do this and uses ExifTool to set the data.  Image showing setting screen below.

I'm not sure if someone has made a script to do this or not.


"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

yarda

This is an interesting topic.

Some time ago, I was playing with https://developers.google.com/maps/documentation/elevation/intro?csw=1

example:

https://maps.googleapis.com/maps/api/elevation/xml?locations=50.5070607777777809133112896,14.5291835000000002509068509

... its result can be downloaded by wget for example

<?xml version="1.0" encoding="UTF-8"?>
<ElevationResponse>
<status>OK</status>
<result>
  <location>
   <lat>50.5070608</lat>
   <lng>14.5291835</lng>
  </location>
  <elevation>434.4410706</elevation>
  <resolution>152.7032318</resolution>
</result>
</ElevationResponse>

Soo, having an XML... :)


StarGeek

Interesting, though it returns a completely different number than what Geosetter had
<?xml version="1.0" encoding="UTF-8"?>
<ElevationResponse>
<status>OK</status>
<result>
  <location>
   <lat>36.1098397</lat>
   <lng>-115.1532680</lng>
  </location>
  <elevation>625.2572632</elevation>
  <resolution>9.5439520</resolution>
</result>
</ElevationResponse>


I wonder which is correct...

Ah, Google is probably returning meters, though there still is a small difference.  Google returns 635.237, which is about 2,051.37 feet.  About 35' difference.

Still, good source if someone wanted to script something up. 
"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

mikelee33

#4
Since this post has been read nearly 500 times, I think it still draws enough attention to suggest Geotag from SourceForge.  Batch processing for just such information.  Simple to use, free, and multi-platform (Java-based).  It even uses ExifTool to write info to files!

PH Edit: Added link
Mike