vincentneo / Avenue-GPX-Viewer

A simple and easy GPX viewer for macOS.
GNU General Public License v3.0
114 stars 12 forks source link

Avenue doesn't render GPX files that plot a "route" (instead of a "track") #30

Closed pvdb closed 1 year ago

pvdb commented 1 year ago

Quite a lot of websites offer downloads of GPX files that plot so-called "routes" using the <rte> XML type:

<rte/> represents a route - an ordered list of waypoints representing a series of turn points leading to a destination

... instead of plotting so-called "tracks" using the <trk> XML type:

<trk/> represents a track - an ordered list of points describing a path

However, Avenue doesn't correctly render "routes" in GPX files. :cry:

Opening the attached littlemill_rte.gpx file in Avenue results in:

littlemill_rte

After converting the "route" (<rte>) into a "track" (<trk> with a nested <trkseg>) opening the attached littlemill_trk.gpx file results in:

littlemill_trk

Considering how similar the two types of GPX files are, is there a specific reason Avenue can't render "routes" like it does "tracks"?

All online GPX viewers I've tested correctly render both littlemill_rte.gpx as well as littlemill_trk.gpx but that kinda defeats the purpose of installing Avenue for offline viewing of GPX files! :sweat_smile:


original file: `littlemill_rte.gpx` ```xml GPX file from Walkhighlands; file is copyright Walkhighlands and must not be publicly shared on other websites. Do not remove this notice. 2019 Inverarnie Esker Trail, Littlemill, near Daviot 173.413808047518 WPT 001 178.26810294676 WPT 002 180.987077073055 WPT 003 190.445050899754 WPT 004 190.777515937182 WPT 005 187.315331188634 WPT 006 183.766296677519 WPT 007 188.659296880204 WPT 008 188.232048828119 WPT 009 193.939983502083 WPT 010 195.595388409345 WPT 011 193.403757464614 WPT 012 198.420923163027 WPT 013 195.425051134745 WPT 014 199.649437258059 WPT 015 198.910051822482 WPT 016 198.828611692647 WPT 017 197.645168205844 WPT 018 198.835197831648 WPT 019 200 WPT 020 199.926484285751 WPT 021 200 WPT 022 199.804540352692 WPT 023 201.274972110584 WPT 024 207.989658333141 WPT 025 209.743337294844 WPT 026 208.565054441251 WPT 027 209.590125697177 WPT 028 210 WPT 029 210 WPT 030 210 WPT 031 210.477985097183 WPT 032 210.992739239575 WPT 033 210.597985097183 WPT 034 211.035713487335 WPT 035 210 WPT 036 210 WPT 037 210.029452080862 WPT 038 209.672686920216 WPT 039 209 WPT 040 210 WPT 041 209.694949827358 WPT 042 210 WPT 043 207.800510547062 WPT 044 206.71643310321 WPT 045 204.088992711382 WPT 045 - WPT 046 205.745622499593 WPT 045 - WPT 046 - WPT 045 - WPT 046 - WPT 046 196.684857483234 WPT 045 - WPT 046 - WPT 046 197.17804218825 WPT 046 196.567737998252 WPT 047 195.9229032549 WPT 048 190.39705089977 WPT 049 190.437050899761 WPT 050 180.952580596161 WPT 051 178.268102946751 WPT 052 173.433920166747 WPT 053 ```

converted file: `littlemill_trk.gpx` ```xml GPX file from Walkhighlands; file is copyright Walkhighlands and must not be publicly shared on other websites. Do not remove this notice. 2019 Inverarnie Esker Trail, Littlemill, near Daviot 173.413808047518 WPT 001 178.26810294676 WPT 002 180.987077073055 WPT 003 190.445050899754 WPT 004 190.777515937182 WPT 005 187.315331188634 WPT 006 183.766296677519 WPT 007 188.659296880204 WPT 008 188.232048828119 WPT 009 193.939983502083 WPT 010 195.595388409345 WPT 011 193.403757464614 WPT 012 198.420923163027 WPT 013 195.425051134745 WPT 014 199.649437258059 WPT 015 198.910051822482 WPT 016 198.828611692647 WPT 017 197.645168205844 WPT 018 198.835197831648 WPT 019 200 WPT 020 199.926484285751 WPT 021 200 WPT 022 199.804540352692 WPT 023 201.274972110584 WPT 024 207.989658333141 WPT 025 209.743337294844 WPT 026 208.565054441251 WPT 027 209.590125697177 WPT 028 210 WPT 029 210 WPT 030 210 WPT 031 210.477985097183 WPT 032 210.992739239575 WPT 033 210.597985097183 WPT 034 211.035713487335 WPT 035 210 WPT 036 210 WPT 037 210.029452080862 WPT 038 209.672686920216 WPT 039 209 WPT 040 210 WPT 041 209.694949827358 WPT 042 210 WPT 043 207.800510547062 WPT 044 206.71643310321 WPT 045 204.088992711382 WPT 045 - WPT 046 205.745622499593 WPT 045 - WPT 046 - WPT 045 - WPT 046 - WPT 046 196.684857483234 WPT 045 - WPT 046 - WPT 046 197.17804218825 WPT 046 196.567737998252 WPT 047 195.9229032549 WPT 048 190.39705089977 WPT 049 190.437050899761 WPT 050 180.952580596161 WPT 051 178.268102946751 WPT 052 173.433920166747 WPT 053 ```

vincentneo commented 1 year ago

However, Avenue doesn't correctly render "routes" in GPX files. 😢

Hi @pvdb, It shouldn't be too hard to add routes support. I just didn't really bother since not many have requested the feature. Will come out with a build with route support by this week!

vincentneo commented 1 year ago

Hi @pvdb,

It was easier than I thought, please enjoy this beta here: https://github.com/vincentneo/Avenue-GPX-Viewer/releases/tag/1.4.1-b1

The distance doesn't update yet, but routes do show on the map, tested with the file you provided!

Cheers, Vincent

pvdb commented 1 year ago

The distance doesn't update yet, but routes do show on the map, tested with the file you provided!

Confirmed! :clap:

image
vincentneo commented 1 year ago

Hi @pvdb,

With the exception of #33, distance and time (if there's date info) now works. I did not publish a new beta, but I am planning to upload to App Store soon as a stable release.

Also you might be interested in the addition of feature in #32, also arriving in next stable App Store update.