... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
feature request: approximate a route by a track
#1
Hi Christian,

Would it be possible in a future version of Routeconverter to approximate a route by a set a waypoints which form a track that overlaps with a route.

The reason I ask this is that I often construct a route using route finding between various waypoints. But then I want to export this route for people who have a navigation system without route finding capabilities, they can only handle straightforward GPS tracks.

I can imagine an option to automatically insert waypoints at distances of X meters apart (X is user input). That way you could balance the number of waypoint with the accuracy of the approximation.

Best regards

Chera
Reply
#2
Hi Chera,

did you try the prerelease ?

The green button at the r/h side offers some functions which can be used for for conversion from route to track.
Just load a route with some points, mark all of them, use "alle Wegpunkte" and switch to "Track".

Did you look for this?

Cheers,
Mathew

@Christian: When I switch to english, the translation is incomplete at some of the new functions in the prerelease.
--
Matthias
Reply
#3
(27.02.2010, 19:22)bekker Wrote: Would it be possible in a future version of Routeconverter to approximate a route by a set a waypoints which form a track that overlaps with a route.

Hi Chera,

please try the latest prerelease version. It offers a dialog to insert positions (and thus might turn a route into a track).

(27.02.2010, 19:22)bekker Wrote: I can imagine an option to automatically insert waypoints at distances of X meters apart (X is user input). That way you could balance the number of waypoint with the accuracy of the approximation.

A nice idea - it does not match the algorithms offered by the Google Maps API. There you can choose between inserting only turn points or all points. Have a look at the prerelease and tell me if it's useful to you!
--
Christian
Reply
#4
That's what I call service! Actually the new function in the pre-release works quite nicely. If I first insert "all wegpunkte" and then use the delete function to remove all points so that there is 50 m in between points I would get what I wanted.

Another feature request: would it be possible to protect waypoints so they would be maintained during a remove operation? I usually give descriptive names to the waypoints I use to plot a route. If I then insert the intermediate waypoints and use the delete function to get a less dense set I usually also lose my own waypoints with descriptions.

Thanks for the quick reply guys.
Reply
#5
(27.02.2010, 22:21)bekker Wrote: Another feature request: would it be possible to protect waypoints so they would be maintained during a remove operation? I usually give descriptive names to the waypoints I use to plot a route. If I then insert the intermediate waypoints and use the delete function to get a less dense set I usually also lose my own waypoints with descriptions.

I'm a bit clueless.... how do you think this could be implemented?
--
Christian
Reply
#6
Simple, if a protected waypoint is tagged for removal, keep it and optionally take the one before or after. You might pop up a warning to the user with a "delete protected" yes/no/alternative message and a selection box "always use this choice". Alternative means, deleted the one before or after (in the original list).
(27.02.2010, 20:07)routeconverter Wrote: A nice idea - it does not match the algorithms offered by the Google Maps API. There you can choose between inserting only turn points or all points. Have a look at the prerelease and tell me if it's useful to you!
Actually if you first let google first calculate the intermediate points and then decimate those points based on user input (e.g. minimum spacing) you would have the implementation.

I also suggest when implementing this, to do the intermediate point calculation for each selected point in turn and first decimate the generated intermediate points before moving up to the next waypoint. This limits the number of generated waypoints.

Pseudo code:

Code:
Loop over all selected waypoints
   call google api with selected waypoint i and following waypoint i+1
   decimate google generated waypoints
   increase i to the next selected waypoint
end loop
Reply
#7
(28.02.2010, 13:35)bekker Wrote: I also suggest when implementing this, to do the intermediate point calculation for each selected point in turn and first decimate the generated intermediate points before moving up to the next waypoint.

Good idea, but actually the intermediate point calculation is done in JavaScript in the browser (see BaseMapView#insertWaypoints) with the help of the Google Maps API - with some very tricky multithreading code at the interface to the Java side Smile

And the Douglas-Peucker Algorithm is implemented in Java, see Positions#douglasPeuckerSimplify ...
--
Christian
Reply
#8
Ok, but can't you call that java script for each selected waypoint separately? I am not familiar with Java so the code is not very meaningfull for me.
Reply
#9
(28.02.2010, 15:07)bekker Wrote: Ok, but can't you call that java script for each selected waypoint separately?

I have to think about it... it's pretty difficult since the insertion of the waypoints is asynchronous and crosses the border between Java and the Browser with JavaScript.
--
Christian
Reply
#10
Patches are always welcome ;-)
--
Christian
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)