Commits

P_W999  committed 76ed197

Edited online

  • Participants
  • Parent commits 0ab0860

Comments (0)

Files changed (1)

 LOG.info("Writing 5 to FOCAL_LENGTH for write 1 -> {}", write1.setTag(ExifIFD.FOCALLENGTH, "5.0"));
 }}}
 
+=== Write GPS info ===
+Writing GPS info is fairly easy as long as you know what GPS is and does ;) . Following example will write to location 50.84791165546716N 4.350469368264016E at an altitude of 50m above sea level to the file gps.jpg.
+
+{{{
+#!java
+JExifTool tool = new JExifTool();
+JExifInfo gpsInfo = tool.getInfo(new File("GPS.JPG"));
+gpsInfo.setGPSInfo("50.84791165546716", "N", "4.350469368264016", "E", "50", "0");
+tool.stop();
+}}}
+
+However, you could also have writting it as:
+{{{
+#!java
+JExifTool tool = new JExifTool();
+JExifInfo gpsInfo = tool.getInfo(new File("GPS.JPG"));
+gpsInfo.setGPSInfo("50 50 52.4832", "N", "4 21 1.6884", "E", "50", "0");
+tool.stop();
+}}}
+
+Exiftool even allows you to write it as
+{{{
+#!java
+JExifTool tool = new JExifTool();
+JExifInfo gpsInfo = tool.getInfo(new File("GPS.JPG"));
+gpsInfo.setGPSInfo("50 deg 50 min 52.4832 sec", "N", "4 deg 21 min 1.6884 sec", "E", "50", "0");
+tool.stop();
+}}}
+
+More info about GPS + Exiftool can be found [[http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#Q14|here]] and the complete list of supported GPS tags (including the values they support can be found [[http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/GPS.html|here]]
+
 === Troubleshooting ===
 ==== Deadlocked after iteration of x ====
 This error indicates that J-ExifTool waited too long for the ExifTool output to finish. This happens if