Menu

#131 Editable phantom route/track point halfway between real ones

Future Release
open
nobody
None
5
2019-02-02
2015-03-16
No

I create and edit routes a lot for my outdoor activities. One frequent operation is to add more detail to a leg by cutting it into multiple legs and moving the points around. In Viking, this is done by selecting a point and adding one before or after. I find it much more convenient the approach used in googlemaps and openstreetmap javascript editors, i.e. they have a handle in the middle of every leg, that you can grab and drag with the mouse. Then it becomes a new trackpoint. It would be great if Viking had the same feature to edit routes/tracks.

Thanks.

Discussion

  • Rob Norris

    Rob Norris - 2015-03-16

    I agree!

    However, Viking's internals doesn't easily support such feature.

    This won't be done until at least the 1.7 release as the 1.6 release is imminent.

    I have an idea in mind that might be implementable with the current code base - this might be only enabled for routes, since that is the normal use case - without too much time/effort... (these notes are more for myself):

    • Have a 'tracks advanced' layer option to set this on/off - default to on.
    • When (code) drawing a route (i.e. not for tracks) at the half way point - draw an unfilled box to suggest the phantom point.

      • Decide on where to put track direction arrow (if on) as it is currently drawn at the half way point -> 1/2 & 3/4 points instead?
    • Decide if Phantom points should work with the select tool and/or edit trackpoint tool - probably should do both.

    • On loading/creating/deleting a route and create equivalent phantom route point list. (see how routes & routes_iter are managed for a new routes_phantom hash of such items)

      • May not want to be an actual viktrack type or handle it in quite the same way as real tracks are created/deleted (a dedicated simple point list for phantom routes might be more appropriate).
    • Instead of adding IsPhantom into viktrackpoint (which could waste memory xN trackpoints for the whole program) - save the IsPhantomPoint statically per vikwindow - and pass this value around - this may have knock on issues with existing function definitions/need to handle 'userdata' pointers differently. Could be some detail here that takes effort.

    • On Edit/select clicks - also search through phantom list to see if click on such a point. When missed (or hit normal real point) reset the static IsPhantomPoint
    • On Edit/select move - the IsPhantomPoint value - draw move phantom point.
    • On edit/select release - if IsPhantomPoint, insert new point at the position and re calculate all PhantomPoints (or at least for this route )
     
  • Rob Norris

    Rob Norris - 2015-03-16
    • summary: Editable fantom route/track point halfway between real ones --> Editable phantom route/track point halfway between real ones
    • Group: Next Release (example) --> v1.7
     
  • Josh Nijenhuis

    Josh Nijenhuis - 2016-02-16

    I agree also, would love to have this! Would really speed up the editing of routes.

    Instead of doing it with phantom points what about this idea:

    When using the select tool, Ctrl + Click on Track Point will result in it inserting a new trackpoint after it, and focusing and dragging it instead of the original clicked one.

     
  • Rob Norris

    Rob Norris - 2019-02-02
    • Group: v1.7 --> Future Release
     

Log in to post a comment.