[talk-au] Running stats against GPX files ...
James Livingston
doctau at mac.com
Thu Jun 25 09:53:32 BST 2009
On 24/06/2009, at 12:59 PM, John Smith wrote:
> Also with my previous answer, you can get away with only 14 bytes
> per point rather than 17, 3 bytes for time, 4 for lat, 4 for lon, 2
> for time, 1 for hdop. Although if reset tracks that go over 65,000
> seconds back to zero you could get away with only 13 bytes. No idea
> if this would compress well or not.
>
> However 9000 points uncompressed with 13 bytes per point would give
> you about 115kBytes, the 9000 point gpx file I compressed came out
> at 35kBytes.
I'd say that unless you're *really* concerned about space, I'd just
stick with gzip/bzip2-ing the GPX files.
If you are that concerned about space, you'd definitely want to use
some form of delta encoding, and probably variable-length encoding
too. Why spend a whole four bytes storing the latitude? Presumably
it's going to be fairly close to the previous point in the track, not
10000km away. Same for time, it'll definitely be after the previous
timestamp and not by much.
If you want to get really fancy, you can start compressing straight-
ish sections with something similar to video I an B/P frame, storing
it as a fraction of the way between the two key points, and an offset
from the line joining them. But you're probably not that keen :)
--
James
More information about the Talk-au
mailing list