sportstracker
sportstracker copied to clipboard
import of gpx 1.0
Hello!
some time ago I recognized that the import tool no longer imports my logged gpx-files. There is no error it just doesn't do anything (would be nice, if it threw an error or displayed a hint).
I found out that this is due to the gpx version of the file. Sportstracker does only function if the gpx file contains
xmlns="http://www.topografix.com/GPX/1/1"
inside the
That seems to be the reason why my gpx 1.0 files are not importable. However if I change xmlns="http://www.topografix.com/GPX/1/0" to xmlns="http://www.topografix.com/GPX/1/1" then the otherwise exact same file will be imported with no apparent errors because the format is almost the same.
Since I don't want to edit nor convert every file I log, it would be nice, if sportstracker just imported gpx files in a "best luck"-manner instead of doing nothing. A popup telling you that your file is not "correct" with information about the information dropped would be even better.
I tried to find the part doing the import in the sources but couldn't achieve anything. If someone has a hint I could try to make a pull-request. Otherwise I would be glad, if someone with more experience in java/kotlin could do that. :)
Sorry for the late response, I was on a trip.
It sounds interesting that somebody still uses 1.0 GPX files, it's the first time I hear from. Is it from an older device or is it a converter tooling problem?
You can find the source code of this parser in the file/class TopoGrafixGpxParser.kt - this change should be quite easy. It would be nice if you could create a pull request for this enhancement and please provide an appropriate unit test with a 1.0 example file.
If your not able to solve this issue, please provide me such an example file for reproducing the error.