Mar 28, 2008

Add GPS info to EXIF

Browser Google map and get



http://maps.google.com/?ie=UTF8&ll=35.675174,139.757635&spn=0.001181,0.002167&z=19



Pass the cordinators to exiftool:



C:\temp>exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=35.675174 -GPSLongitude=139.757635 -c "%.6f" "Yokoshima DSC_3562.jpg"



and we done.



batch process:



@echo off



echo adding gps ...



for %%nef in (dir /b *.NEF) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=35.675174 -GPSLongitude=139.757635 -c "%.6f" %%nef



echo DONE



PAUSE




Or simply use this:

for %f in (*.JPG) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=21.059562 -GPSLongitude=105.762752 -c "%.6f" %f

for %f in (*.NEF) DO exiftool -GPSLatitudeRef=N -GPSLongitudeRef=E -GPSAltitude=5 -GPSAltitudeRef="Above Sea Level" -overwrite_original -GPSLatitude=21.059562 -GPSLongitude=105.762752 -c "%.6f" %f

refs:


http://owl.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html


http://www.carto.net/projects/photoTools/gpsPhoto/


http://hwat.sakura.ne.jp/hpod/200610/11-220000/


http://hwat.sakura.ne.jp/hpod/200609/28-200000/


http://en.wikipedia.org/wiki/Global_Positioning_System

1 comment:

vuhung said...

FOR %%v in (*.JPG) DO exiftool.exe -overwrite_original -GPSLatitude="35.659964" -GPSLongitude="139.679374" -GPSLatitudeRef="North" -GPSLongitudeRef="East" %%v