georust / gpx

Rust read/write support for GPS Exchange Format (GPX)
https://crates.io/crates/gpx
MIT License
98 stars 44 forks source link

garmin gpx track logs could not be read #63

Closed kogo59 closed 2 years ago

kogo59 commented 2 years ago

Reason are track extensions like:

<trk> <name>2017-05-17 06:47:34 Tag</name> <extensions> <gpxx:TrackExtension> 
<gpxx:DisplayColor>Cyan</gpxx:DisplayColor> </gpxx:TrackExtension> 
</extensions> <trkseg> 

Should be fixed by adding an extensions event to consume at tracks.rs:

    "extensions" => {
                    extensions::consume(context)?;
                }
urschrei commented 2 years ago

Hi @kogo59, we'd be delighted to accept a PR if you have time, failing which, a GPX file which triggers the panic?

kogo59 commented 2 years ago

Error "invalid child element 'extensions' in track" is catched. Sample GPX file, see attachment. 2019-05-01 06.31.11 Tag.gpx.zip

lnicola commented 2 years ago

Fixed in #42?

urschrei commented 2 years ago

Yep, realised after I commented. The sample gpx file ^^ is part of the suite now.