Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPX file showing unwanted straight returning line in other apps #436

Open
joeldebruijn opened this issue Jul 20, 2024 · 5 comments
Open
Labels
Milestone

Comments

@joeldebruijn
Copy link

Background:

  • I prepare trips in OSMand Web
  • After finding the right route, its exported as a GPX file.
  • I save them locally for longterm archival and sometime view them in other apps (like Gnome Maps or Organic Maps).

Symptom:
When opening a GPX file (made by OSMand) in another app it shows a straight returning line.
afbeelding

I tested it in 2 other apps and it shows.
Imported in OSMand Android this line is absent though.

Questions:

  • Is this an error of the other apps by showing a return line?
  • Is there something wrong in the produced GPX files?
@EugeneZmeuk
Copy link
Member

EugeneZmeuk commented Jul 20, 2024

Hi @joeldebruijn

I created the GPX file on the web Sat Jul 20 2024 - 2.gpx.zip :

image

After I opened this file by OsmAnd:

image

Tapping to "Plan a route" tool opens this route with Profile with OsmAnd and preparing route:
image

This file has two types of tags inside :

- route segment: it's a straight lines on your example:
  <rte>
    <rtept lat="51.4595155" lon="19.7813988">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>0</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.4452346" lon="19.8312664">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>43</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.430093" lon="19.8674011">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>55</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.4104495" lon="19.8491192">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>75</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.3934756" lon="19.8487759">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>144</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.3726377" lon="19.8429394">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>282</osmand:trkpt_idx>
      </extensions>
    </rtept>
    <rtept lat="51.352916" lon="19.8306656">
      <extensions>
        <osmand:profile>bicycle</osmand:profile>
        <osmand:trkpt_idx>344</osmand:trkpt_idx>
      </extensions>
    </rtept>
  </rte>
  1. classic point-to-point
- with point segment with coordinats and elevation in our case:
 <trk>
    <trkseg>
      <trkpt lat="51.459559" lon="19.7814786">
        <ele>201</ele>
      </trkpt>
      <trkpt lat="51.4591662" lon="19.7820264">
        <ele>201</ele>
      </trkpt>
      <trkpt lat="51.4591428" lon="19.7820586">
        <ele>199.7</ele>
      </trkpt>
      <trkpt lat="51.4591161" lon="19.7820157">
        <ele>201</ele>
      </trkpt>
      <trkpt lat="51.4587768" lon="19.7824985">
        <ele>200.2</ele>
      </trkpt>
      <trkpt lat="51.4558053" lon="19.7865567">
        <ele>201.8</ele>
      </trkpt>
      <trkpt lat="51.455476" lon="19.7869912">
        <ele>201</ele>
      </trkpt>
      ............

The Komoot app can open one or second variants:

choosing of variants
telegram-cloud-photo-size-2-5249043244166275625-y telegram-cloud-photo-size-2-5249043244166275626-y

But the Organics maps app opens as you wrote with a mix:
image

@joeldebruijn
Copy link
Author

joeldebruijn commented Jul 20, 2024

Oh thnx for reproducing and sharing this, never new GPX could have these 2 "types of Tour". 🙏

Is there a way for OSMand to generate with only point-to-point and without route segment?

Otherwise I make an issue for Organic Maps to treat GPX import the way Komoot does.

@EugeneZmeuk
Copy link
Member

Oh thnx for reproducing and sharing this, never new GPX could have these 2 "types of Tour". 🙏

Is there a way for OSMand to generate with only point-to-point and without route segment?

Otherwise I make an issue for Organic Maps to treat GPX import the way Komoot does.

While you can do it on the OsmAnd App
Open track menu > Plan a route button (Edit track) > Opitons > Save as new track > choose the "Simplified Track" option and save it.
and only after that this track will be have only point-to-point

https://osmand.net/docs/user/plan-route/create-route/#save-as-new-track

@joeldebruijn
Copy link
Author

Your explanation helped me looking into the GPX standard, learned about rtept en trkpt differences.
eg https://gis.stackexchange.com/questions/403664/how-route-points-rtept-and-track-points-trkpt-can-exist-in-a-gpx-file-togeth

I was inclined to close this issue and make a new one, asking for the "Simplefied Track" option for OSM web.
Preferably somewhere here:
afbeelding

But I dont know if OSMand web is meant to have the same features as OSMand Android/iOS?
Because then the backlog for web becomes huge I guess?

@EugeneZmeuk
Copy link
Member

@joeldebruijn
Yes, it's a good decision to make a new issue. Please, create it here.
yesterday we had a short discussion about this case and the "Simplified track" is needed for the Options list.

@vshcherb vshcherb reopened this Jul 22, 2024
@vshcherb vshcherb added this to the 4.9-web milestone Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants