README.md.bak 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # PhoneTrackGPXFix
  2. A nodejs app that puts in time order gps points exported from PhoneTrack in NextCloud so that they can be correctly imported in JOSM.
  3. Disclaimer: This project has been done in an hour or so. So please expect bugs, dirty code and odd behaviour that look more like a one-hour side-project. Also this has only been tested on Windows.
  4. ## How to install
  5. Download [nodejs]([Download | Node.js](https://nodejs.org/en/download)) and [git]([Git - Downloads](https://git-scm.com/downloads)).
  6. Open your favorite shell and execute (windows or linux):
  7. ```bash
  8. git clone https://floriananaya.pro/git/florian/PhoneTrackGPXFix
  9. cd PhoneTrackGPXFix
  10. npm install
  11. ```
  12. ## How to use
  13. The only command is
  14. ```bash
  15. node main.js <FilePath>
  16. ```
  17. ## Example
  18. ```bash
  19. node main.js C:\Users\Florian\Downloads\florian1.gpx
  20. ```
  21. Expected output:
  22. ```Bash
  23. C:\Users\Florian\Downloads\PhoneTrackGPXFix>node main.js C:\Users\Florian\Downloads\florian1.gpx
  24. Started PhoneTrack GPX file fixer
  25. Reading file located at "C:\Users\Florian\Downloads\florian1.gpx"...
  26. File has been read, loading XML...
  27. XML has been loaded, reading PhoneTrack data...
  28. Loading track "ONEPLUSA5000" with 157457 points
  29. Done loading track "ONEPLUSA5000"
  30. Loading track "OPPO" with 27814 points
  31. Done loading track "OPPO"
  32. Sorting all points...
  33. Sorting points...
  34. Done reading and sorting track "ONEPLUSA5000"
  35. Sorting points...
  36. Done reading and sorting track "OPPO"
  37. Done sorting all points
  38. Updating XML...
  39. Done updating XML
  40. Writing to new file "C:\Users\Florian\Downloads\florian1.gpx2"
  41. Data written to file
  42. Done in 6.121 sec
  43. ```
  44. The given file stays untouched, a new file will be created that has the same name as the given file with a "2" added at the end of the file (example: "export.gpx" will be renamed to "export.gpx2")