Modify

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)

24741.patch (8.9 KB ) - added by GerdP 3 weeks ago.
imrpove handling of closed roundabouts at the beginning and/or end of a track segment

Download all attachments as: .zip

Change History (6)

comment:1 by GerdP, 3 weeks ago

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.

comment:2 by GerdP, 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.

in reply to:  1 comment:3 by PPete2, 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>

Last edited 3 weeks ago by PPete2 (previous) (diff)

comment:4 by GerdP, 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 GerdP, 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 GerdP, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to PPete2.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.