Thursday, August 03, 2006

Exporting Trimble Pathfinder Office data as KML for Google Earth

Had some GPS data I wanted to transfer into a KML file for use in Google Earth and other KML compatible programs. Although the script exports the file in a KML a little bit fo header/footer has to be added to the document before its acutally ready for use. To export the file, I had to learn the format for Pathfinder Office Export Templates. Took me a while to get a hang of it, but got it to export the data inbetween individual <> tags.

ASCII export template editor

Template "code:"
{Text:}
{Text: }{Attributes}{Text:}
{Text:}
{Text:}
{Text: }{Longitude}{Text:}
{Text: }{Latitude}{Text:}
{Text: 100}
{Text: 0}
{Text: 0}
{Text:
}
{Text:root://styleMaps#default+nicon=0x307+hicon=0x317}
{Text:}
{Text: }{Longitude}{Text:,}{Latitude}{Text:,0}
{Text:
}
{Text:
}

Once you've exported your KML file, you have to open it up in Notepad or another text editor and add the KML header and footer information. Above the first <> tag place this text in (note: remove all spaces from tags, if I didn't put them in, blogger cuts them out):
< ?xml version="1.0" encoding="UTF-8"? >
< xmlns="http://earth.google.com/kml/2.1">
<>
<>GPS Data< /name >
After the last < /placemark > tag add in this text
< /Document >
< /kml >


google earth gps data pathfinder screenshot

Download the completed KML for yourself
or
import into google maps in your browser