#18012 closed enhancement (fixed)
[PATCH] Using original gpx name on spliting gpx to new layers
Reported by: | iman | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 19.10 |
Component: | Core | Version: | tested |
Keywords: | gpx split tracks name | Cc: | cmuelle8 |
Description
Hi, sometimes I have a very long gpx and want to split it in shorter tracks.
I mostly use the "split tracks to new layers" feature available in JOSM.
But new tracks are always named GPX split result, GPX split result #2, etc.
It would be much more useful:
- to reuse the original track name instead of GPX split result
- and also append numbers starting from 1 (So we'll have a new name for every new splitted track).
Thanks
Attachments (1)
Change History (7)
comment:1 by , 6 years ago
Keywords: | tracks added; tacks removed |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Type: | task → enhancement |
comment:2 by , 6 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | assigned → new |
by , 6 years ago
Attachment: | create-trackseg-names-from-gpxLayerName-if-there-is-no-name-attribute-attached.patch added |
---|
create trackseg names from gpxLayer name if there is no 'name' attribute present in track or trackseg data of the actual gpx; the gpxLayer name, by default, is named according to the filename on opening
comment:3 by , 6 years ago
Has received little testing, but does seem to resolve OP's original issue.
Notes:
- If there is one track with many segments and the operation "split segments to tracks" is chosen, the resulting tracks are named and numbered according to the layer name (you can check this by using INFO context menu option). This means they are assigned a gpx "name" attribute in doing so, which will also be used to name the new gpxLayers if "split gpx tracks to separate layers" is consequently used.
- -> This has the implication that if the gpxLayer name is altered/renamed after "split segments to tracks" was called, the gpx "name" attribute will be preferedly used when "split gpx tracks to separate layers is called", i.e. renaming the layer does not change the trackseg gpx name attributes once they have been set.
- Of a gpx with many tracks is opened (with one segment each), then "split segments to tracks" is available immediately and thus, if the tracks do not have a gpx "name" attribute assigned, gpxLayer name will be used to name the resulting layers.
Thoughts for future modification:
- If the generated track names need to be editable after an "split segments to tracks" operation, it may make sense to vamp up the Info page and make the track names editable there (may be together with an option to remove the name attribute). But there's no priority on my side doing this now. The info page, afaik, consists of an html layout, no active Java components, reworking that presumably takes some effort compared to the patch attached now.
Greetings
comment:4 by , 6 years ago
Milestone: | → 19.10 |
---|---|
Summary: | Using original gpx name on spliting gpx to new layers → [PATCH] Using original gpx name on spliting gpx to new layers |
Seems related to #15606. @cmuelle8 would you like to take a look?