Team VaxCave Posted June 25, 2007 Share Posted June 25, 2007 I'm attempting to use GPSBabel to run a query on a GPX file. I want an output that looks like this: "Waypoint", "Lat", "Lon", "Name", "Last found", "Last found by" I've read the documentation on the GPSBabel and it seems to be a very robust program. However, the specificity of the documentation leaves something to be desired. The last command I tried (which failed) looked like this: ./gpsbabel -i gpx, -f 132158.gpx -o csv ,GEOCACHE_LAST_FOUND,"","%ld" -F parsed.txt What order do I need to feed in that GEOCACHE_LAST_FOUND option to make that field show up in the results? I'm doing this via a command line, so GPX Spinner and GSAK aren't an option for me. This will run on either Linux or Mac OS X. A Windows GUI is out of the question. Any help is greatly appreciated. Quote Link to comment
robertlipe Posted June 25, 2007 Share Posted June 25, 2007 the specificity of the documentation leaves something to be desired.[/quit] When we had one page of doc, I readily accepted that criticism. Now that we have over 100 pages of doc per version, I still get it, but I don't accept it as readily. If you feel something is missing, please report specific URLs and paragraph numbers. Better yet, submit suggested prose - that's how it improves. The last command I tried (which failed) looked like this: ./gpsbabel -i gpx, -f 132158.gpx -o csv ,GEOCACHE_LAST_FOUND,"","%ld" -F parsed.txt If you can point to anything in that doc that led you to the expectation that would work, please do file a bugreport on the GPSBabel mailing list. The style introduction is at: http://www.gpsbabel.org/htmldoc-developmen...yles_intro.html "last found by" is not one of the options described in http://www.gpsbabel.org/htmldoc-developmen...yle_define.html so the closest I could come to the output you desire was host244-231-65-207:~/src/gpsbabel robertlipe$ cat xxx.style DESCRIPTION VaxCaves Very Special Style # FILE LAYOUT DEFINITIIONS: # FIELD_DELIMITER , RECORD_DELIMITER NEWLINE BADCHARS , # # INDIVIDUAL DATA FIELDS: # IFIELD SHORTNAME, "", "%s" IFIELD LAT_DECIMAL, "", "%f" IFIELD LON_DECIMAL, "", "%f" IFIELD DESCRIPTION, "", "%s" IFIELD GEOCACHE_LAST_FOUND, "", "%d" host244-231-65-207:~/src/gpsbabel robertlipe$ ./gpsbabel -i gpx -f ~/src/geo/mgpx/MyMiddleTN -o xcsv,style=xxx.style -F - | head -3 GC11G1V,35.925083,-86.869150,MTGC August Meeting,19700101 GCZDCP,35.928433,-86.868500,Do Not Pass Go Do Not Collect $200,20070511 GC12A6D,35.921417,-86.826500,tooth phary-1,20070512 Hopefully, that'll get you unstuck. Quote Link to comment
Team VaxCave Posted June 26, 2007 Author Share Posted June 26, 2007 Thanks so much for the example. That worked like a charm. I was able to add some of the other options I needed as well. However, I notice that gpsbabel doesn't parse webcam cache logs properly. It doesn't seem to see it as a "found it" since the XML marks webcam found logs in the following manner: <Groundspeak:type>Webcam Photo Taken</Groundspeak:type> instead of <Groundspeak:type>Found it</Groundspeak:type> I imagine the same thing happens with event caches. Oh well, I'll submit a bug report and work around this for the time being. Thanks so much for helping a n00b. 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.