Opened 12 months ago
Last modified 4 months ago
#23481 new enhancement
add more flexibility when exporting a relation to a GPX layer or file
Reported by: | cmuelle8 | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description (last modified by )
This patch is a major overhaul of the GPX conversion feature offered for relations by the RelationList dialog.
The input data is searched for the roles assigned to relation list members.
If and only if more than one role (usually: more than the empty role) is found, a dialog with four options is shown on how to deal with relation roles during the export process, these are:
- allow any role
- user-select roles to be considered
- allow preset-defined roles only
- ignore roles / treat all as empty
Userselection is an expert feature, because it may give unexpected results. It allows deselection of e. g. forward / backward roles that the WayConnectionTypeCalculator depends on to resolve directional variants of a route. Excluding members having these roles will impact the WayConnectionTypeCalculator's decisions for the remaining members and in consequence split the members in a different manner than if it would see the full data. A tooltip is provided to raise awareness to this.
Preset-defined option will look up the defined roles for the specific relation type being exported and any member with an (preset-wise) undefined role will be discarded during export.
Ignore roles can, amongst other use cases, be used to export all relation members of an otherwise bidirectional route, bypassing the WayConnectionTypeCalculator. It is less intended to produce a clean GPX for travel directions and contain possibly lots of disjoint segments, but offers the possibility to export all the relation geometry 1:1.
The patch is against an older revision and untested to apply cleanly to latest. Sorry for any inconvenience.
Attachments (4)
Change History (12)
by , 12 months ago
Attachment: | josm_export_relation_to_gpx_r18721_rev02rc.patch added |
---|
comment:1 by , 12 months ago
Description: | modified (diff) |
---|
comment:2 by , 12 months ago
Type: | defect → enhancement |
---|
comment:3 by , 12 months ago
Priority: | normal → minor |
---|
by , 12 months ago
Attachment: | user-options-for-role-based-export-rev03rc.png added |
---|
cp. to previous rev02rc adds additional option to sanitize output
by , 12 months ago
Attachment: | josm_export_relation_to_gpx_r18721_rev03rc.patch added |
---|
cp. to previous rev02rc adds additional option to sanitize output
comment:4 by , 12 months ago
Description: | modified (diff) |
---|
comment:5 by , 12 months ago
It would be good to know the problems which are adressed by this patch. Maybe attach an example relation and explain why the existing code fails to do what it needed.
comment:6 by , 12 months ago
The existing code does not fail (where does it say that?). its an enhancement / improvement as the title says: add more flexibility when using the export feature.
depending on the data (some relations use the role attribute more heavily than others), it is quiet useful to be able to manipulate some setting during the export process.
One can compare this with the ConvertToGpx feature available on any OSM data layer: It offers to simplify way geometry, although it strictly would not need to offer this option when doing the conversion.
comment:7 by , 11 months ago
See also #23551.
I asked for an explanation because I don't understand how this patch improves JOSM. I've never used this Export action and therefore I don't know what to expect. I do understand that an incomplete relation will likely produce an unexpected result.
One problem that I found: It seems the patch doesn't handle the names of multiple selected relations properly. I tried with relations 12149161 and 10626592, the result contained two tracks with the same name.
comment:8 by , 4 months ago
There's a lot of 'I' in your comment, but JOSM is not written with one particular person in mind. Even if _you_ do not need the feature there are users that do find it useful.
The feature was not written / intended for the case that multiple relations are selected, maybe the context menu should not offer the option when more than one is selected.
revamp export relation to gpx feature