kml.fmt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #------------------------------------------------------------------------------
  2. # File: kml.fmt
  3. #
  4. # Description: Example ExifTool print format file for generating a
  5. # Google Earth KML file from a collection of geotagged images
  6. #
  7. # Usage: exiftool -p kml.fmt FILE [...] > out.kml
  8. #
  9. # Requires: ExifTool version 8.10 or later
  10. #
  11. # Revisions: 2010/02/05 - P. Harvey created
  12. # 2013/02/05 - PH Fixed camera icon to work with new Google Earth
  13. #
  14. # Notes: 1) All input files must contain GPSLatitude and GPSLongitude.
  15. # 2) For Google Earth to be able to find the images, the input
  16. # images must be specified using relative paths, and "out.kml"
  17. # must stay in the same directory as where the command was run.
  18. # 3) Google Earth is picky about the case of the image file extension,
  19. # and may not be able to display the image if an upper-case
  20. # extension is used.
  21. # 4) The -fileOrder option may be used to control the order of the
  22. # generated placemarks.
  23. #------------------------------------------------------------------------------
  24. #[HEAD]<?xml version="1.0" encoding="UTF-8"?>
  25. #[HEAD]<kml xmlns="http://earth.google.com/kml/2.0">
  26. #[HEAD] <Document>
  27. #[HEAD] <name>My Photos</name>
  28. #[HEAD] <open>1</open>
  29. #[HEAD] <Style id="Photo">
  30. #[HEAD] <IconStyle>
  31. #[HEAD] <Icon>
  32. #[HEAD] <href>http://maps.google.com/mapfiles/kml/pal4/icon38.png</href>
  33. #[HEAD] <scale>1.0</scale>
  34. #[HEAD] </Icon>
  35. #[HEAD] </IconStyle>
  36. #[HEAD] </Style>
  37. #[HEAD] <Folder>
  38. #[HEAD] <name>Waypoints</name>
  39. #[HEAD] <open>0</open>
  40. #[BODY] <Placemark>
  41. #[BODY] <description><![CDATA[<br/><table><tr><td>
  42. #[BODY] <img src='$directory/$filename'
  43. #[BODY] width='$imagewidth' height='$imageheight'>
  44. #[BODY] </td></tr></table>]]></description>
  45. #[BODY] <Snippet/>
  46. #[BODY] <name>$filename</name>
  47. #[BODY] <styleUrl>#Photo</styleUrl>
  48. #[BODY] <Point>
  49. #[BODY] <altitudeMode>clampedToGround</altitudeMode>
  50. #[BODY] <coordinates>$gpslongitude#,$gpslatitude#,0</coordinates>
  51. #[BODY] </Point>
  52. #[BODY] </Placemark>
  53. #[TAIL] </Folder>
  54. #[TAIL] </Document>
  55. #[TAIL]</kml>