Syntax of the Groundspeak .loc-file

as can be downloaded from the geocaching.com cache pages

 

Be aware: this is NOT the same format as the loc-file that can be exported from EasyGPS!

EasyGPS can read the format described here.

 

Format: ASCII

CRLF and TAB are allowed but not nescesarry.

Reserved characters: [, ], <, </, />, >

 

Below you’ll find an example of a file with two waypoints. In this example, the lines are represented beneath each other for readability. In the real file everything is in one string!

The file has a header: <?xml...><loc...>,

detail sections per waypoint: <waypoint> to </waypoint>

and a footer: </loc>.

The  header and footer have a fixed content.

The waypoint section can occur multiple times.

The <type> is default set to geocache but can be replaced. This type will show up in EasyGPS in the Type column.

The <type> section is optional. This tag is for example not used when creating a file using GPSBabel.

Also the ID and the name of the cache are informational. These can be changed or replaced when you write your own loc-file. As an example of this: I scan these texts for reserved characters and replace them to avoid errors when importing the file in EasyGPS.

 

To create a loc-file, you must create a header, one or more detail sections and a footer in the described syntax. Save it as ASCII file.

 

 ---------

EXAMPLE

---------

<?xml version="1.0" encoding="UTF-8"?>

<loc version="1.0" src="Groundspeak">

<waypoint>

            <name id="GCCA92"><![CDATA[Knight's move by pyne]]></name>

            <coord lat="52.0922" lon="4.33078333333333"/>

            <type>Geocache</type>

            <link text="Cache Details">http://www.geocaching.com/seek/cache_details.aspx?wp=GCCA92</link>

</waypoint><waypoint>

            <name id="GCGMV3"><![CDATA[Getting The Chemistry Right by Team KIS98]]></name>

            <coord lat="52.1029" lon="4.3039"/>

            <type>Geocache</type>

            <link text="Cache Details">http://www.geocaching.com/seek/cache_details.aspx?wp=GCGMV3</link>

</waypoint></loc>


CacheMaps: Online Maps at a Click