|
Re: A couple of filtering problems with CSV: msg#00029hardware.gps.gpsbabel.general
Hi Robert, You've helped me indirectly solve one problem, and I think I've further refined the second! Turns out I had a couple of comments at the top of the ignore.csv as follows # Temporary Finds # Found since 2007-02-22 This was producing a couple of extra waypoints in the resulting GPX file at 0,0 and 0,22 that I hadn't noticed before. As there wasn't much information, they didn't appear to be showing in GE which is why I had missed them previously. I removed the comments and the file processed correctly. So I'd mark the bounding box issue as resolved from my perspective. Bad assumption of mine to be able to place comments in the file. For the second, I think I have refined it down to something choking on unicode characters. When viewing the source in terminal, the breaks appear to be occurring at <E2><80><99> - which appears to be a unicode apostrophe or quote. I can't yet confirm that it isn't happening with other unicode characters as well. To give you some idea why I figured it has something to do with the csv file, have a look at the following commands I run in a script to combine and filter a number of my PQ's. All of the gpx-only commands work perfectly and give the expected output. (for those interested, I have an older version on our website, I'll update it again once I've got the final wrinkles worked out) <http://www.gps.org.nz/resources/paperless_geocaching/gpsbabel> The only command that produces the truncated XML container content is the final one that invokes the ignore.csv. gpsbabel -i gpx -f 388021.gpx -f 388021-wpts.gpx -o gpx -F caches- world-found.gpx gpsbabel -i gpx -f 854701.gpx -o gpx -F caches-nz-placed.gpx gpsbabel -i gpx -f 158140.gpx -f 158139.gpx -f 166136.gpx -f 166137.gpx -f 410114.gpx -f 896898.gpx -f 158140-wpts.gpx -f 158139- wpts.gpx -f 166136-wpts.gpx -f 166137-wpts.gpx -f 410114-wpts.gpx -f 896898-wpts.gpx -o gpx -F caches-nz.gpx gpsbabel -i gpx -f 905319.gpx -f 905319-wpts.gpx -o gpx -F caches-nz- unavailable.gpx gpsbabel -i gpx -f caches-nz.gpx -f caches-world-found.gpx -f caches- world-found.gpx -f caches-nz-placed.gpx -f caches-nz-placed.gpx -f caches-nz-unavailable.gpx -f caches-nz-unavailable.gpx -x duplicate,shortname,all -o gpx -F caches-nz-active.gpx gpsbabel -i gpx -f caches-nz-active.gpx -x polygon,file=ni-poly.txt - o gpx -F caches-nz-ni-active.gpx gpsbabel -i gpx -f caches-nz-active.gpx -x polygon,file=si-poly.txt - o gpx -F caches-nz-si-active.gpx gpsbabel -i gpx -f caches-nz-si-active.gpx -x radius,distance=85K,lat=-43.478,lon=172.702 -o gpx -F caches-nz-si- chc-active.gpx gpsbabel -i gpx -f caches-nz-si-active.gpx -x radius,distance=35K,lat=-41.25,lon=173.1 -o gpx -F caches-nz-si-nsn- active.gpx gpsbabel -i gpx -f caches-nz-ni-active.gpx -x radius,distance=25K,lat=-41.2,lon=174.8 -o gpx -F caches-nz-ni-wlg- active.gpx gpsbabel -i gpx -f caches-nz-ni-active.gpx -x radius,distance=20K,lat=-36.85,lon=174.8 -o gpx -F caches-nz-ni-akl- active.gpx gpsbabel -i gpx -f caches-nz-si-active.gpx -x arc,file=chc- nsn.txt,distance=4K -o gpx -F caches-nz-si-chcnsn-active.gpx gpsbabel -i gpx -f caches-nz-active.gpx -x polygon,file=chc-dud.txt - o gpx -F caches-nz-si-chcdud-active.gpx gpsbabel -i gpx -f caches-nz-si-chc-active.gpx -f caches-nz-si-nsn- active.gpx -f caches-nz-ni-wlg-active.gpx -f caches-nz-ni-akl- active.gpx -f caches-nz-si-chcnsn-active.gpx -x duplicate,shortname - o gpx -F caches-nz-popular-active.gpx gpsbabel -i gpx -f caches-nz-si-chc-active.gpx -i csv -f ignore.csv - x duplicate,shortname,all -o gpx -F caches-nz-si-chc-active-ge.gpx I have also reproduced the error using the attached test case files. Command used was... gpsbabel -i gpx -f source.gpx -i csv -f ignore.csv -x duplicate,shortname,all -o gpx -F results1.gpx This produced a truncated description for GC100XE in results1.gpx. I also copied GCNE66 to ignore.gpx and ran a similar filter gpsbabel -i gpx -f source.gpx -f ignore.gpx -x duplicate,shortname,all -o gpx -F results2.gpx This resulted in GC100XE having a complete and correct description - i.e. it didn't choke on the unicode characters. So, it would appear that truncating at unicode characters is only occurring when the csv file is used. Cheers Gavin
On 14/03/2007, at 15:41, Robert Lipe wrote: Gavin, thanx for the detailed report. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ Gpsbabel-misc mailing list http://www.gpsbabel.org Gpsbabel-misc@xxxxxxxxxxxxxxxxxxxxx To unsubscribe, change list options, or see archives, visit: https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: A couple of filtering problems with CSV: 00029, Robert Lipe |
|---|---|
| Next by Date: | Re: A couple of filtering problems with CSV: 00029, Robert Lipe |
| Previous by Thread: | Re: A couple of filtering problems with CSVi: 00029, Robert Lipe |
| Next by Thread: | Re: A couple of filtering problems with CSV: 00029, Robert Lipe |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |