Opened 4 weeks ago
Last modified 3 weeks ago
#24741 new defect
Route GPX-export: close Route starting or ending with a roundabout
| Reported by: | PPete2 | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: |
Description
Identification: JOSM/1.5 (19555 de) Windows 11 64-Bit
There's a bug if exporting a route with "Export GPX file starting from first member" if the route start or ends with a (unsplitted) roundabout. In this case the track within the exported GPX file is not closed since it lacks the part of the roundabout.
Example which starts with a roundabout: https://www.openstreetmap.org/relation/19726489
Attachments (1)
Change History (6)
follow-up: 3 comment:1 by , 3 weeks ago
comment:2 by , 3 weeks ago
BTW: While testing a patch for this issue I found a related problem: When you select multiple relations for the export and one starts or ends with a roundabout JOSM may calculate connections between unrelated ways gets the names for the segments wrong.
comment:3 by , 3 weeks ago
Replying to GerdP:
What if the relation starts or ends with a roundabout but is not a round-trip or if there is a gap after/before a roundabout? We could either add the full roundabout or nothing. I guess omitting the roundabout is safer.
In this case I would tend to also include the (full) roundabout, cause just this would reflect the situation of the OSM-route. Further advantage: If a mapper added the roundabout at start/end of an OSM-route by mistake we will see this situation by its GPX-export and are able to correct it (by removing the roundabout within OSM-route) if necessary.
Regarding gap: I don't quite understand. OSM-routes often have gaps (mostly because somebody edited/splitted/deleted ways of the route and forgot about proper consideration of routes on this ways). In this case JOSM should still export just 1 GPX-track <trk> - but consisting of multiple GPX-segments <trkseg>
comment:4 by , 3 weeks ago
I meant gaps right before or after a roundabout. So, ok, I'll try to find a patch which adds the connecting line where possible or the full roundabout else. I still have to understand the parts of the code where it handles the selection of multiple relation routes. For some reason, the relations are not handled separately but there members are added into one list and then the creation of the gpx data starts.
by , 3 weeks ago
| Attachment: | 24741.patch added |
|---|
imrpove handling of closed roundabouts at the beginning and/or end of a track segment
comment:5 by , 3 weeks ago
The patch fixes the problems listed above, but it also adds a lot of complexity and maybe new problems with special cases that I didn't think of yet. On the other hand it is probably a base to fix also #24742.
The patched code (still) contains a bug that produces artifacts when a relation contains a gap in a part where forward/backward roles are used.



I am not sure how to fix this. Your example contains a roundtrip route, so one can expect a closed gpx track. What if the relation starts or ends with a roundabout but is not a roundtrip or if there is a gap after/before a roundabout? We could either add the full roundabout or nothing. I guess omitting the roundabout is safer.