GpsPrune icon indicating copy to clipboard operation
GpsPrune copied to clipboard

[feature request] Overwriting changed .gpx (Save vs Save As)

Open Noob567 opened this issue 1 year ago • 2 comments

Hello! I've been using this great software for some time. Helps me a lot with my tracks. I miss one option, though. Sometimes I need to correct several points in my track, and I don't find an alternative to your program, which is very good for that. After I make some changes to the track, I have to use Export. Even if I overwrite existing file, all information like Name, Comments, also Style (different color of a track with use of < extensions > tag) are gone. Then I need to reopen my file in GPX Editor (which is better for me for viewing my tracks also in different colors) and refill all the data. It would be just awesome if there was a possibility to simply Save the changes to the same file without touching anything else.

Noob567 avatar Jan 16 '24 13:01 Noob567

This sounds quite similar to https://github.com/activityworkshop/GpsPrune/issues/71, with a few extra details. The thing to remember is that GpsPrune is not a "Gpx file editor" and does not promise to support all the features of gpx (or all the features of kmz for that matter). Plus, it's important to avoid accidentally overwriting important data, and the combination of these two factors means that it shouldn't be too easy to re-export (imperfectly) to overwrite the input file.

Having said that:

"all information like Name, Comments, also Style (different color of a track with use of < extensions > tag) are gone."

that shouldn't generally be true. The name of the track when you export should be the same as the one loaded. Any point names should be kept. Any comments attached to points should be kept. If a point is unedited, then also all of its extensions should be kept.

If you're applying styles to different segments within the track, then yes those will not be kept because GpsPrune doesn't use any segment styles or track styles and has to re-generate these elements of the gpx file. I'm not sure of a good solution to that. Could you maybe make an artificial example of what you mean (just a handful of fake points and the features which you use)? That would be useful to see if there's a way to retain that even after you have edited the track.

activityworkshop avatar Jan 17 '24 19:01 activityworkshop

test.zip

Hello, thank you for a very quick response. I attach a test. There is a file test.gpx containing:

<trk> <name>test of name</name> <cmt>test of comment</cmt> <type>Cycling</type> <extensions> <line xmlns="http://www.topografix.com/GPX/gpx_style/0/2"> <color>0080FF</color> </line> </extensions> <trkseg>

It all gets lost in the exported file in which I edited (moved) one track point:

<trk> <name>newgpx.studio</name> <number>1</number> <trkseg>

Noob567 avatar Jan 18 '24 03:01 Noob567