How to write data back to a GPX file
Show older comments
Hey all,
I can load a GPX file just fine. I've modified the lat and lon data and now I want to save this back to a GPX file but I can't seem to find the complimentary script to gpxread. Any suggestions?
Thanks! Trevor
7 Comments
Rik
on 31 Jul 2018
Look at the format of the file you started with and write it back in that format. You can check the gpxread function to see if you can borrow some code. The few times I looked at a gpx file it didn't seem to be that complex. I'm planning on writing something like this in a few weeks, so if you can't solve it on your own, just put a comment here and I'll post my script.
Trevor Harris
on 2 Aug 2018
Bruce
on 30 Apr 2019
Curious if you ever managed to code a 'gpxwrite' function (mathworks has gpxread, but not gpxwrite - seems odd they don't)? I'd be interested in a copy if you did.
Thanks!
Bruce
Rik
on 30 Apr 2019
The documentation for gpxread links to the GPX 1.1 Schema Documentation, as it claim to be fully compliant with that. That should give you a firm foothold to start.
It turned out the implementation I needed a gpxwrite for didn't even work on a conceptual level, so I never wrote it.
Nina Sweeney
on 13 Sep 2023
Rik,
Can you explain what you mean by your last sentence? Like Bruce, I am interested in a MATLAB gpxwrite function.
Thanks,
Nina
Rik
on 14 Sep 2023
What that sentence means is that I had an idea/project. That project required gpxwrite as one of the steps. However, when I tried to implement the idea/project, it turned out that it wouldn't work, even with a correct implementation of gpxwrite. The upshot is that I never wrote it.
But as I wrote in that comment, there is a description of the standard, so you can implement it yourself if you want to.
Nina Sweeney
on 14 Sep 2023
Thank you!
Answers (0)
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!