+reveritt Posted February 9, 2005 Share Posted February 9, 2005 Can anyone point me to a web page that describes the format of a .LOC file? Quote Link to comment
robertlipe Posted February 9, 2005 Share Posted February 9, 2005 There are about a bazllion formats on the planet collectively known as ".loc". If you're asking about the one produced by geocaching.com, I know of no formal definition. It's XML without a formal DTD but it's pretty self-explanatory once you crack it open. If you're interested in GPL'ed source that reads and writes them look in GPSBabel. The code for geocaching.com's strain of .loc is in geo.c. Quote Link to comment
+reveritt Posted February 11, 2005 Author Share Posted February 11, 2005 It's XML without a formal DTD but it's pretty self-explanatory once you crack it open. We must be talking about two different formats. The .LOC format I am looking for is the one that Pocket Queries produce. It's apparently proprietary to TopoGrafix (the guys who give away EasyGps). I doesn't look like XML. It looks like some sort of position-delimited format, but I can't make it out because it's full of non-printable ASCII. I reckon I could decode it, but I was hoping to find a Spec. somewhere. Quote Link to comment
robertlipe Posted February 11, 2005 Share Posted February 11, 2005 The .loc that the pocket queriest produce is the XML strain I described above. There is another .loc produced by old versions of EasyGPS and ExpertGPS that more closely match what you're describing. It, too, can be read and written by GPSBabel...It's not documented as Topografix has deprecated that format in favor of GPX. I'll wager that you've loaded the thing you got from a PQ into an old Topograffix progam and saved it and have confused the results with what you actually got from the PQ. That proces changed it from "geocaching loc" to "topografix loc" which have essentially nothing in common. Quote Link to comment
IceKnight (aka VectorJoe) Posted February 11, 2005 Share Posted February 11, 2005 This is the header and text of one waypoint from an LOC file I got from GC.com <?xml version="1.0" encoding="UTF-8"?> <loc version="1.0" src="Groundspeak"> <waypoint> <name id="GCGFTA"><![CDATA[The Volunteer Cache or Find The Bridge by Eagle Son]]></name> <coord lat="41.6965166666667" lon="-88.1080166666667"/> <type>Geocache</type> <link text="Cache Details">http://www.geocaching.com/seek/cache_details.aspx?wp=GCGFTA</link> </waypoint> I believe this is just standard xml. Quote Link to comment
+reveritt Posted February 12, 2005 Author Share Posted February 12, 2005 ...I'll wager that you've loaded the thing you got from a PQ into an old Topograffix progam and saved it and have confused the results with what you actually got from the PQ. That proces changed it from "geocaching loc" to "topografix loc" which have essentially nothing in common. Yes, that appears to be the case. When I look at a new .loc file, without opening it in EasyGPS first, it is clearly XML. My recently-installed version of EasyGPS apparently reads the newer XML format, but doesn't write it. Thanx. Quote Link to comment
+reveritt Posted February 12, 2005 Author Share Posted February 12, 2005 ...<waypoint> <name id="GCGFTA"><![CDATA[The Volunteer Cache or Find The Bridge by Eagle Son]]></name> <coord lat="41.6965166666667" lon="-88.1080166666667"/> <type>Geocache</type> <link text="Cache Details">http://www.geocaching.com/seek/cache_details.aspx?wp=GCGFTA</link> </waypoint> I believe this is just standard xml. Yes, I can see that now, too (see my last post). My problem is that when I upload a large .loc file to my Magellan Sportrak Map, it runs out of data for storing the "comment" field, which contains the actual cache name (as opposed to the waypoint ID). I want to write a little utility to preprocess .loc files and shorten the comment, or strip it out altogether--a trivial task, as it turns out. Thanx. Quote Link to comment
robertlipe Posted February 13, 2005 Share Posted February 13, 2005 Neither of the .locs are the preferred format by EasyGPS. GPX - a much more robust and better speciried - XML strain is the one it wants to write. Not to sound like a Broken record, but GPSBabel has code for limiting the number of waypoint comments transmitted to a Magellan. This feature was added specifically to keep DirectRoute usable when you have lots of comments. Shortening the comments won't help. You get 200 non-blank comments. Quote Link to comment
+reveritt Posted February 13, 2005 Author Share Posted February 13, 2005 ...Not to sound like a Broken record, but GPSBabel has ... OK; I'll give it a try. Thanx. Quote Link to comment
+BigBirdNL Posted February 21, 2005 Share Posted February 21, 2005 (edited) Can anyone point me to a web page that describes the format of a .LOC file? I have a syntax description on my web page: Loc-file syntax. Not sure if this solves your problem. Edited February 21, 2005 by BigBirdNL Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.