FABallemand / ezGPX

Python GPX library
https://pypi.org/project/ezgpx/
GNU General Public License v3.0
18 stars 1 forks source link

GPX/XML scheme / restrictive with MetaData #16

Open InBernhardt opened 2 months ago

InBernhardt commented 2 months ago

love your exGPX work ! Very impressive ! As I rely on the 'time' MetaData Tag (and additional tags within MetaData), to save distance, climb... to my GPX collection I sadly cannot use your work: You (rightfully) seem to request that the GPX file to be parsed follows EXACTLY the original topografix. I simply cannot parse using ezGPX if there are more tags in 'metadata' than 'name' and 'desc'. Maybe I got it wrong, maybe you can think of a way to use ezGPX, however with added -non Namespace- tags ? txs, Ingo

FABallemand commented 2 months ago

Hello @InBernhardt, Thank you for your feedback and for submitting this issue! It sounds like you're using the extension field in GPX metadata. Extensions are very useful as they allow you to store additional data while respecting the XML GPX 1.1 schema. Unfortunately, I have not yet added support for extensions in ezGPX. Could you provide an example of your GPX files and explain what you want to do and the error you encounter?

InBernhardt commented 2 months ago

Hey Fabien, Bonjour thanks for your swift response ! spoiler: this a long email, hahah I'd like you to know, that I have only started with Python 6 weeks ago (or any coding for that matter), hence my gpx project is very 'dirty' and 'unpythonic' . I will absolutely share my code (via Github), but at this point, I am still ashamed to do so. I am attaching my code here, for your eyes only. From offroad motorcycling, I have gathered hundreds of tracks (no routes, no waypoints). Short gpx example attached. Until discontinued, I hosted my tracks on Garmin Basecamp. Since then, I have tested pretty much all of the existing gpx apps, (such as OSMand, Locus, mapshack, viking, gaia) to act as a long term repository for my gpx files. However, to drive customer loyalty, EVERY one of these app pushes their proprietary way of 'organizing' the files by adding proprietary tags with unique name spaces to my gpx when exporting, whilst deleting tags that had been created by competitors apps...very annoying ! my project objectives: Host and organize my gpx tracks MYSELF, by capturing track features such as 'area', 'elevation gain', 'distance', 'slope' in the metadata section of the gpx. For that, I am adding new tags, upload the gpx file to a csv. After editing the csv, I am writing the changes back to my gpx. For that, I am using a mix of 'element tree, 'tk inter', 'Panda Frames' and 'beautiful soup' I have stripped my gpx of all the proprietary name spaces, that commercial apps have added to my files over time. it was also a LOT easier for me to read and add tags WITHOUT the name spaces, TBH I am very intruiged by your work, in particular I am super interested at your 'expert plot', to color the track depending on the slope ! that's SOOO COOL ! Anyway, I believe there's a lot of people who would benefit from 'organizing', labeling / editing their tracks INDEPENDENT of commercial apps. When parsing my gpx with ezGPX, I noticed, that your code (rightfully!) relies on the gpx file showing the 'topografix' name space and that my 'personal' name spaces were not accepted. Again, I am an absolute beginner, definitely making a lot of mistakes in my 1st project, hahah A bientot All the best Ingo Fabien ALLEMAND wrote: Hello @InBernhardt https://github.com/InBernhardt , Thank you for your feedback and for submitting this issue! It sounds like you're using the extension field in GPX metadata. Extensions are very useful as they allow you to store additional data while respecting the XML GPX 1.1 schema. Unfortunately, I have not yet added support for extensions in ezGPX. Could you provide an example of your GPX files and explain what you want to do and the error you encounter? — Reply to this email directly, view it on GitHub https://github.com/FABallemand/ezGPX/issues/16#issuecomment-2297085045 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BBSYPJEOTGQDVJ2ES6SRXUTZSIUAPAVCNFSM6AAAAABMWKHGRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXGA4DKMBUGU . You are receiving this because you were mentioned.Message ID: @.***>