Re: [Gpsbabel-misc] Input file format autodetect
Brought to you by:
robertl
From: Robert L. <rob...@gp...> - 2010-05-31 22:27:59
|
On Mon, May 31, 2010 at 5:10 PM, John Robert Peterson <jr...@gm...>wrote: > Has anyone considered the posibility of setting up some kind of auto detect > system for the input format? > > I'm sure there are formats in existance that are very similar, and > contradictory, but even somthing that would take most of the common formats > (gpx, nmea, osm, arc, a few of the more common propriatary device formats > etc) would be a huge help to some people. It would mean that there would be > no need to select the input format 99+% of the time. > I prototyped a design to address this a few years ago and concluded that while you can identify some files with great confidence, what you describe above is just the tip of the iceberg. Most people know where their files come from. Just last month, I implemented the trivial case in the GUI. If filename extension == XXX and we know about only one XXX, we set the input type automatically on a drag-and-drop. Also, is there any plan on directly supporting gpx.gz? > Only about three years ago. It works for single-file archives only. $ file MyMiddleTN.gpx.gz MyMiddleTN.gpx.gz: gzip compressed data, was "MyMiddleTN.gpx", from Unix, last modified: Wed Jul 22 13:25:10 2009 $ ./gpsbabel -i gpx -f MyMiddleTN.gpx.gz 35.916667N 86.872917W GC1D55Z/Five Tragic Hours Wed Apr 1 19:00:00 2009 [ ... ] $ ./gpsbabel -i gpx -f MyMiddleTN.gpx.gz -o gpx -F john.gpx.gz rjlimac:gpsbabel robertlipe$ file john.gpx.gz john.gpx.gz: gzip compressed data, from Unix Actually, most formats can be read and written directly as gzipped images. There are exceptions, but they tend to be the goofy formats. For example, the Bushnell "format" where every waypoint is a separate file doesn't make sense as gz. Pretty much anything that uses the gbfile API internally and does normal single-file in or out should work. RJL --- If you find GPSBabel useful, especially if a feature was added or fixed for you, please consider supporting its development at http://www.gpsbabel.org/contribute.html |