Turn by turn navigation of imported gpx

5,289 views
Skip to first unread message

Angelo Serio

unread,
Aug 3, 2023, 8:38:50 AM8/3/23
to osm...@googlegroups.com
Hi Everybody,
I have seen this topic has been discussed in the past, but I'm wondering if there is any improvement/ good news about 
I love the app, but I use a lot of prearranged gpx and follow them only looking the map on screen isn't the best solution.
Turn by turn navigation doesn't work and Osmand is " describing" the road versus give real indication 
I hope there is a solution to this problem.
I know it's related to Openmaps , but it seems to me that such a nice program cannot handle turn by turn navigation for imported gpx 
There are other off line navigation app capable to do this, meaning has is feasible from technical standing point 
If anybody has some suggestion or work around to help me it's highly appreciated.

Grazie 
Angelo


SonWon

unread,
Aug 3, 2023, 11:59:58 AM8/3/23
to osm...@googlegroups.com

I'll be testing this on the road once the weather clears. I didn't see this problem with a test import so it could be the import file is the problem?

John


At any moment, you have a choice, that leads you closer to God or further from God.



--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/CAGR7adHbU_XC4Fr92sRNkG9KX%2Bd3jSFYcZXMiU_s4MWMF8wmhg%40mail.gmail.com.

Angelo Serio

unread,
Aug 3, 2023, 1:29:11 PM8/3/23
to osm...@googlegroups.com
John,
Following pad is ok.
Problem if you navigate an imported gpx with turn by turn announcement .
Osmand is giving "describing" you the road and announce any simple bend on a strait road .
Driving crazy and make hard to understand when you really have to turn.
Roundabout: it say slightly turn right and then turn left . No graphic indication on screen.

When I start navigation I choose "follow truck"
May be this is wrong.  

Ciao
Angelo


Peter Elderson

unread,
Aug 3, 2023, 3:11:33 PM8/3/23
to osm...@googlegroups.com
I am using OsmAnd's turn-by-turn navigation (with voice instructions in my earphones, so I don't need to look at the screen) for gpx-tracksvery often, for hiking routes.

Works fine.

Once the gpx is in My Places with display on, it's available when tapping Route. 

After selecting the gpx-trail for routing, there is a snap-to-road option button. I usually have this option active, but I suppose you could switch it off.

Peter Elderson


Op do 3 aug 2023 om 14:38 schreef Angelo Serio <seri...@gmail.com>:

SonWon

unread,
Aug 4, 2023, 3:31:42 PM8/4/23
to osm...@googlegroups.com

Hi Angelo,

I did some testing tonight. There are two types of GPX files, one is a route and the other is waypoints. This is defined when you create the GPX file. For a waypoint file you will get micro instructions which are annoying when on road. An imported route file also has micro instructions. However if you select Attach to The Roads then OsmAnd will provide better instructions.

Give it a try by creating a short route and use the Simulate Navigation feature to see how OsmAnd will route as you try different combinations.

In summary, using the Attach to The Roads will clean up the micro instructions. It isn't perfect though.

John


At any moment, you have a choice, that leads you closer to God or further from God.


Angelo Serio

unread,
Aug 4, 2023, 6:13:48 PM8/4/23
to osm...@googlegroups.com
Hi John,
Thanks a lot for your help.
I'm not an expert in GPX creation.
Can you better explain difference between waypoints and route gpx?

I have noticed that some of imported GPX are working other no, most probably you are right.

A further question is related to Attach to the Road 
Can be set for default or shall be set on every time?
I tried but I cannot confirm last request from navigation page 

Sorry to abuse of your help.
Thanks in advance 
Angelo


Angelo Serio

unread,
Aug 4, 2023, 6:22:21 PM8/4/23
to osm...@googlegroups.com
Another silly question..
To navigate an imported GPX shoul I use option
Segui la traccia ( follow truck)?
Or just start navigation??
Ciao e grazie
Angelo


Il ven 4 ago 2023, 21:31 SonWon <sonw...@gmail.com> ha scritto:

SonWon

unread,
Aug 5, 2023, 3:26:12 AM8/5/23
to osm...@googlegroups.com

Hi Angelo,


I am using Garmin BaseCamp to create GPX files since I have a Garmin device. BaseCamp gives me the option to create routes or waypoints. I think routes contain street names and turns however I have better results importing waypoints into OsmAnd. I think waypoints are just GPS points on the map strung together to create a route. At least that is how I am visualizing it. I think a route is a single waypoint at each turn which does not appear to work well with OsmAnd.

When you use Attach to The Roads it binds all of the waypoints into the nearest road. So in place of following waypoint to waypoint you are following the road. I noticed the algorithm that makes this possible is not perfect. For example a turn on a road will sometimes just pretend you are not turning however the map is clear. I am use to navigating without voice instructions because of a Bluetooth limitation with the headset, phone and Garmin all linked at the same time. Bluetooth does not play well with more than two audio channels is what I have learned.

I would not take what I wrote as completely correct until someone more knowledgeable comes by to correct or confirm what I wrote.

I think that sums up all that I think I know.

John


At any moment, you have a choice, that leads you closer to God or further from God.


Angelo Serio

unread,
Aug 5, 2023, 3:43:38 AM8/5/23
to osm...@googlegroups.com
Thanks John
Very helpful.
Let's keep learning and keep in touch if we get any better solution/ result.
I have a Garmin too but I started to use Osmand because everything we shared GPX with my travel friends we face difficult to have same route calculation especially with others using Tom Tom or other navigation devices.

I love Osmand, but this issue drive me crazy... Off Road I just follow truck on screen, but on road I would prefer turn by turn voice instruction.

Thanks a lot for you kindness 
Ciao
Angelo


SonWon

unread,
Aug 5, 2023, 3:51:56 AM8/5/23
to osm...@googlegroups.com

You are welcome!


At any moment, you have a choice, that leads you closer to God or further from God.


Peter Elderson

unread,
Aug 5, 2023, 4:29:32 AM8/5/23
to osm...@googlegroups.com
gpx is format spec, a subset of xml. A gpx file may contain tracks (lists of geolocations known as track-points) and route points, also known as waypoints. Waypoints usually have additional information fields, trackpoints usually don't have additional fields.
It is very unusual for gpx-files to contain street names. Typically street names are added at routing/navigating time by navigating apps. 
Waypoints also usually do not contain street names. They usuallyhave POI names/refs. 

Routes created by map applications usually allow you to create a route or track, and waypoints for POIs. The waypoints are the icons you place on the map.

Export as gpx-file usually puts one track (list of trackpoints) and the waypoints (separate route points) in the export file. The application may offer a choice to export the waypoints. 
(Some applications may offer the option to export more than one track to a single gpx-file.)

Applications importing the gpx-file should handle 
1. the track => display as a line
2. the route points (waypoints) => display as separate points (icons, markers)
(3. multiple tracks => display as separate lines)

Routing/navigating applications can all handle 1. (track)
Routing/navigating applications seldom handle 3 (multiple tracks), because they route/navigate one track at a time

Routing/navigating applications differ in how they handle 2. (waypoints)
E.g. afstandmeten.nl treats waypoints as trackpoints and connects all points with a line, resulting in a map showing one normal curves/meandering route plus a chaotic mess of straight lines forming sharp points.
Luckily the waymark "route" is a separate route and I can delete it from the screen, leaving only the track.
E.g.in OsmAnd, you can choose to import waypoints (it ignores the track) or to import a track (I think it reads the waypoints as well, I have to check).
I don't know how Garmin and Bascamp handle imported gpx files with waypoints and/or multiple tracks.

That is why, when something unexpected happens, you need to look at the gpx to check if it has multiple tracks, and separate routepoints.  
Then import and check if all the elements in the gpx are handled correctly. 
You could also look at the details, especially for the wayponts, to see if e.g. the name or type is shown on the screen after import. 

Peter Elderson


Op za 5 aug 2023 om 09:26 schreef SonWon <sonw...@gmail.com>:

SonWon

unread,
Aug 5, 2023, 4:37:34 AM8/5/23
to osm...@googlegroups.com

Peter,

Thank you for the detailed explanation and for correcting me.

I plan to investigation if there are any options I can set in BaseCamp when I export to a GPX file. I am still learning BaseCamp and I am not sure if this is the best tool for me to use when creating an on road motorcycle tour route GPX file to export and then import into OsmAnd.

And I hope and pray you have a great day!

John


At any moment, you have a choice, that leads you closer to God or further from God.


Angelo Serio

unread,
Aug 5, 2023, 4:38:42 AM8/5/23
to osm...@googlegroups.com
Thanks Peter...
So , I'm pretty ignorant on this subject, to avoid Osmand to describe every single bend on the road which format should I import in your opinion.
The route or waypoint list and let Osmand calculate the best road???

I have tried all possible set up, but on a mountain road voice instructions are given for each simple bend of the road driving me crazy 

Sorry for these studi questions!!!

Ciao e grazie
Angelo


Peter Elderson

unread,
Aug 5, 2023, 5:02:18 AM8/5/23
to osm...@googlegroups.com
AFAIK Basecamp is not a router, which would make it not the best app for creating a route for a specific type of vehicle.

Peter Elderson


Op za 5 aug 2023 om 10:37 schreef SonWon <sonw...@gmail.com>:

SonWon

unread,
Aug 5, 2023, 5:57:22 AM8/5/23
to osm...@googlegroups.com

Hi Peter,

Not sure I understand you completely. It does make routes that can be exported to a GPX file. Is there a better tool for the PC that I should consider using?

John


At any moment, you have a choice, that leads you closer to God or further from God.


Peter Elderson

unread,
Aug 5, 2023, 7:42:17 AM8/5/23
to osm...@googlegroups.com
Maybe it's in the words! This is how I use the terms:
A route is a string of connected actual roads to follow. A routing app identifies/analyses the roads to create the optimal string of roads according to the routing profile you chose.
A track is a list of geolocations, which knows nothing about the roads. It may follow actual roads, mimicking a route, but not necessarily. The geolocations are not connected in the data; your app draws lines between them, to create the illusion of a route. 

Track drawing applications may also use a routing algorithm between trackpoints, thus creating extra trackpoints. After that, the routing information (list of roads) is lost again.

In the end, you have a track, not a route. Exporting it to gpx will not contain any road information, just trackpoints. The receiving device just has trackpoints. To create an actual route (and navigate) from the track, it has to perform routing from trackpoint to trackpoint. If you want the navigation to give road-aware instructions, it has to find the locations on your map and calculate the best roads between them, which is sometimes called "Snap to roads".  

That is why I never say that a gpx is a route. 

I think Basecamp creates, stores and exports tracks, even if it can use routing to create/edit the track. Even if it could store routes (strings of roads), it will convert to a track if you export to gpx. 

Peter Elderson


Op za 5 aug 2023 om 11:57 schreef SonWon <sonw...@gmail.com>:

SonWon

unread,
Aug 5, 2023, 8:14:30 AM8/5/23
to osm...@googlegroups.com

Ah that makes sense to me. BaseCamp has two types, one is called Route when exported as a GPX file it does not load well into OsmAnd. The other type is called Tracks which loads well and has many micro instructions unless you use Attach to the roads (snap to roads). Maybe I should send OsmAnd a copy of a Garmin Route exported as a GPX file to see if they can make OsmAnd more friendly to that file? I will do that when I have time.


At any moment, you have a choice, that leads you closer to God or further from God.


Peter Elderson

unread,
Aug 5, 2023, 8:34:20 AM8/5/23
to osm...@googlegroups.com
Could you send me a copy of a Basecamp Route gpx-file? Here is an email address I create for this sort of thing:  wandelinge...@gmail.com
I'm wondering what the "Micro-instructions" are and how they appear in the gpx.

Peter Elderson


Op za 5 aug 2023 om 14:14 schreef SonWon <sonw...@gmail.com>:

SonWon

unread,
Aug 5, 2023, 10:28:20 AM8/5/23
to osm...@googlegroups.com

File sent.


At any moment, you have a choice, that leads you closer to God or further from God.


Peter Elderson

unread,
Aug 5, 2023, 12:29:17 PM8/5/23
to osm...@googlegroups.com
This is an interesting file! It is xml, and it's about strings of points, representing a route.
Basically, it transfers a route including start location (including name) and end location (including name).
And the geographic bounding box for the route. 
And the transport type (motorcycling), and preference (CurvyRoads).
Then all the road segments, but translated to listst of nameless geolocations.

Which means it transfers the details a router needs or may use, but not actual roads (which are Id's in a map database). A Garmin device or app shoud be able to use this to recreate the route very accurately, assuming it has tthe same map as was used for creating the route.

Basically it still contains a string of trackpoints, but does not use the standard gpx trackpoint and waypoint specs. Instead, it uses its own extensions for what they call route (rte), routepoint (rtept) en gpx routepoints (gpxx:rpt). All in all, it's still a list of geolocations, but a standard gpx it is not, and that's probably why OsmAnd cannot use it: OsmAnd looks for trackpoints (trkpt) , not the Garmin alternatives. I think I would not call it a gpx-file at all, no matter what name extension it has. 

If a Garmin device reads this, it still has no information about roads, so it has to give instructions as if there is no map, just which turns to make to get to the next point. It doesn't know about roundabouts.
If you tell it to Snap to the roads, the router will use all the trackpoints to calculate which actual road leads there, then it can give instructions based on the the map, road name and type etcetera. 

Disclaimer: The road segments also contain a "gpxx: Subclass" number, which probably transfers some information about the type of road. It does not look like they are unique road segment identifiers. But I can't be sure. If they are unique road segment identifiers, then it would be redundant to transfer separate points on this road as well. 

Compare route relations in OSM: these are lists of object Id's, each id represents a way. To transfer this, technically you only need to transfer the relation's object Id. The target app or device could then retrieve the route and the metadata from OSM. 
For routes created outside of OSM, you would need to transfer the list of OSM way id's and the metadata. E.g. in an xml-file which would look somewhat like the Garmin routefile, only much simpler: no routepoints or trackpoints needed, just way id's and a header for the metadata.

Ok, too much info! I'll stop here. 

Peter Elderson


Op za 5 aug 2023 om 16:28 schreef SonWon <sonw...@gmail.com>:

SonWon

unread,
Aug 5, 2023, 2:34:03 PM8/5/23
to osm...@googlegroups.com

Peter,

Thank you for the detailed explanation.

That answers some questions I had about the usefulness of BaseCamp with OsmAnd. I am glad I thought to check before leaving on a 14-21 day motorcycle tour. The first file I created from a route would generate an error when I tried to use Attach to The Roads which made it unusable. I forget the error message. The BaseCamp tracks file was working with the Attach to The Roads other than it was slow generating the route and did not register all of the turns. I suppose Garmin did this to make their GPX files compatible with their devices and the side effect was breaking the usefulness for non Garmin devices.

For my trip planning I will use OsmAnd and Samsung Flow and save each days OsmAnd routes as GPX files since when loaded they route perfectly.

Thanks again and have a great day!

John

At any moment, you have a choice, that leads you closer to God or further from God.


Reply all
Reply to author
Forward
0 new messages