Troubles creating KML file for use in tagging photos

Started by anonymouse, April 10, 2013, 01:23:04 PM

Previous topic - Next topic

anonymouse

I'm using a [very old] phone to capture GPS data every 15 minutes, which is dumped to a mysql database. I have a PHP script which generates a KML file which shows the various placemarks I've visited during my trip. I've attached a small sample file. This works in Google Earth just fine, but when attempting to use it to geotag my photos, I get several errors:

~$  exiftool -geotag gps.kml *.JPG
Warning: No track points found in GPS file 'gps.kml' in File:Geotag (ValueConvInv)
Warning: GPS track is empty in File:Geotime (ValueConvInv) - IMG_0787.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - IMG_0788.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - IMG_0791.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - IMG_0792.JPG
Warning: GPS track is empty in File:Geotime (ValueConvInv) - IMG_0796.JPG
    0 image files updated
    6 image files unchanged


I'm sure that the KML file is incorrect, but I'm not sure how to correct it. I've read the KML specs, but there are so many options - can somebody post a sample KML file which is suitable for use in tagging that I can model after? What tags in the KML file are used to create EXIF tags?

Phil Harvey

Is your use of the Data timestamp standard?  I have never seen this.  The problem is that ExifTool can't find the date/time for the placemark.   If you can change your script to generate KML files with this format, then it should work:

    <Placemark id="Placemark 38415">
      <name>Placemark 38415</name>
      <TimeStamp>
        <when>2013-03-29T06:32:52-05:00</when>
      </TimeStamp>
      <Point>
        <coordinates>-80.35632133483890,27.65567779541020</coordinates>
      </Point>
    </Placemark>


Only the TimeStamp "when" and Point "coordinates" are used by ExifTool.

- 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 ($).

anonymouse

That worked like a charm. The KML sample I had used was apparently from an old version of the KML spec. Thank you very much!