Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement writing of GPX files #22

Merged
merged 3 commits into from
Sep 24, 2018
Merged

Conversation

felgru
Copy link
Member

@felgru felgru commented Sep 23, 2018

This adds a new gpx::write function that writes a given Gpx object into an object implementing the Write trait. This can be used to write GPX data to a .gpx file.

Depending on the version set in the Gpx object it writes GPX 1.1 or 1.0 data.

Closes #19.

The new function write(gpx, writer) can now be used to write a given GPX
object to a Write object.
Those tests read the sample GPX files from test/fixtures/ and compare
the resulting Gpx objects to ones obtained from writing and re-reading
those Gpx objects.
We now write the `age` attribute of a `Waypoint` object as
<ageofgpsdata> element instead of <ageof**d**gpsdata> to be consistent
to our parser used by the `read` function.

This is not consistent with the GPX 1.1 (and 1.0) schema, where the
element is named <ageofdgpsdata>.
Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, thanks for adding this functionality! to increase ownership of this project, i just added you to the github organization. you should be able to merge and publish a new version to crates.io. if you're not interested, let me know and i can do that for you 🙋‍♂️

@felgru
Copy link
Member Author

felgru commented Sep 24, 2018

Thank you for your invitation! I'll merge this pull request and try to release a new version on crates.io. If I have any questions, I'll let you know (this is the first time I release anything on crates.io, so I'm first going to read the crates.io documentation to make sure that I don't do anything wrong).

@felgru felgru merged commit e2c294d into georust:master Sep 24, 2018
@felgru felgru deleted the feature/write-gpx branch September 24, 2018 07:24
@brendanashworth
Copy link
Member

@felgru thanks for putting this together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants