tboegi / GpsMaster

https://wiki.openstreetmap.org/wiki/GpsMaster
GNU General Public License v2.0
48 stars 7 forks source link

move route point #10

Closed wbeisser closed 3 years ago

wbeisser commented 3 years ago

hi, i did some route planing. very nice find route function, by the way :-)

what makes planing somewhat hard is that i did not find a way to move points after they were placed. also i was not able to find a way to insert points other than at the end of the route, which would be a workaround (remove the not so well placed point and insert the new one instead).

right now i have to remove all points at the end of the route up to the point i want to alter. after that i need to redo all the rest.

cheers wb

rfuegen commented 3 years ago

thanks ;-)

editing route points was not supported in the original GpxCreator code, and is therefore also not supported in GpsMaster. It would be great to have track editing features similar to JOSM, but this would require a lot of additional code and changes in the current architecture. this is not likely to happen.

but - volunteers welcome :-)

what I can think of is a feature to move an existing route point by pressing and holding CTRL. likely to happen, but not soon.

wbeisser commented 3 years ago

do you want me to give it a try? i have successfully built the code with eclipse. not everything is working properly yet, but i did my first experiments to be able to insert route points in the middle of the route. so if you are ok with it, i would add some features.

rfuegen commented 3 years ago

OK; go ahead!

wbeisser commented 3 years ago

looking good ;-)

i think that's it for now. do you want me to attach the modified and new files in a post?

tboegi commented 3 years ago

(In best case: a contribution through a Git Pull Request will be easiest to handle)

How did you got the source code onto your disk ? Using Git ?

wbeisser commented 3 years ago

i got it from here: https://github.com/tboegi/GpsMaster/releases/tag/v0.63.38-rc0

tboegi commented 3 years ago

So, just to be sure: You don't use Git ?

wbeisser commented 3 years ago

no. but i will. i've never used it before but i looks like a good time to start. i will get back to you when i am all set.

tboegi commented 3 years ago

@wbeisser: Good to hear - if you are unsure about Git, I could recommend to make a backup of your worktree, just to be sure. All contributions are welcome, with Git or without Git (if that is easier)

wbeisser commented 3 years ago

@tboegi: i got it all set up. the source i cloned via git is quite different to what i had before :-) i will wait until the now open pull request is resolved since there is one file that i also changed. after that, i will try to start one.

wbeisser commented 3 years ago

ok, my git status is:

`$ git status On branch dev Your branch is up to date with 'origin/dev'.

Changes to be committed: (use "git restore --staged ..." to unstage) modified: GpsMaster/src/org/gpsmaster/ActiveGpxObjects.java modified: GpsMaster/src/org/gpsmaster/GpsMaster.java modified: GpsMaster/src/org/gpsmaster/gpxpanel/Route.java modified: GpsMaster/src/org/gpsmaster/gpxpanel/WaypointGroup.java modified: GpsMaster/src/org/gpsmaster/painter/TrackPainter.java new file: GpsMaster/src/org/gpsmaster/undo/UndoMoveWaypoint.java

Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: .gitignore modified: GpsMaster/.classpath modified: GpsMaster/GpsMaster.config ` as i understand the next step would be: $ git commit -m “routes: insert and move waypoints - system out estimated hiking time” $ git push origin dev

please advise. i am not so sure, if the push command is the right way to enable you to review/merge the changed files.

tboegi commented 3 years ago

Congratulations, thanks for contributing. In general, 2 things should/must be done:

The next step would be to add changed and new java files and do a commit: git add *.java git commit -m “routes: insert and move waypoints - system out estimated hiking time”

Then you mention changed files: modified: .gitignore modified: GpsMaster/.classpath modified: GpsMaster/GpsMaster.config We put them into their own commit. I somewhat suspect, that we don't need all the changes - but to be able to jugde that, I need to inspect the changes. We simply things: git add -u git commit -m "Add changed files; review needed"

And now: git push origin insert-and-move-waypoints

There should be a line, saying "you can create a pull request...." Click on that line, and submit one. I can either merge it "as is", or modify things slightly, don't worry too much about that.

HTH and thanks

wbeisser commented 3 years ago

thanks for the support, i think i got it right now :-)

tboegi commented 3 years ago

@wbeisser - thanks for the work.

There are 2 minor issues (with https://github.com/tboegi/GpsMaster/pull/14)

wbeisser commented 3 years ago

@tboegi - it was my pleasure :-) i will add the detailed description of the changes to the commit message the next time. and i will look into the TAB issue. i am sure there is some configuration in eclipse where i can control that. the LF / CRLF arrived correctly? wb

tboegi commented 3 years ago

@wbeisser 👍 There is no issue with CRLF - that seems OK. There should be a setting for the "indent with TAB" or so somewhere in Eclipse. I don't use Eclipse myself. If there are tips-and-tricks someone wants to share about the Eclipse workflow: Please do. I realized that we could add a "how to contribute".txt to help people to start.