Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 18-03-2022, 04:50   #1
Registered User

Join Date: Oct 2011
Location: Apeldoorn
Boat: Ovni 385
Posts: 342
Replacing identical waypoints in multiple routes

You may have multiple routes sharing (partly) the same waypoints. When you shift one of these waypoints, then this will shift all routes using those shared waypoints. This is very practical, when a buoy in one of the routes is shifted, you can correct all routes at the same time by correcting only one of them.
When you export one or more of these routes to a .gpx file and read them in again at the same or another computer, the waypoints in the routes will be duplicated into new separate waypoints. At first glance all will look the same as originally, but when you shift a waypoint in an imported route, the corresponding waypoints of the other routes will not change, the waypoints have been duplicated into new waypoints at the same location.

When you regularly import routes, for example from your home system to your boat system, you will create many identical waypoints that are not shared between routes.

This has already been discussed in the thread "Housekeeping waypoints and routes". These issues (and others) can be solved by installing the Javascript plugin, and using the appropriate scripts. Though this is flexible and reliable, it requires some additional actions.

Therefor I propose a new button under the Routes tab in the Route & Mark manager.
This button is called Sync waypoints. This function works on the routes that one has selected. If only one route is selected, the waypoints of this route will be compared with the free standing waypoints, these are the waypoints in the list of waypoints under the waypoint tab. If a waypoint in the route has an identical location as the free standing waypoint, it will be replaced with the free standing waypoint. So the free standing waypoints get a preferred treatment, normally they are more important as you had a reason to define them. If you don't want to use a free standing waypoint, just make it not visible for the time being, the sync waypoints function will ignore it.
When multiple routes are selected, the Sync waypoints function will first check all selected routes against the visible free standing waypoints, thereafter against the waypoints of all other selected routes. Waypoints will be considered having the same position if they are within 1 meter of each other. Actions of Sync Waypoint will be logged as in the following example:

11:41:43.711 MESSAGE routemanagerdialog.cpp:1616 **** Routepoint 001 in route route2 replaced by Routepoint 2-1 from Free standing waypoints
11:41:43.711 MESSAGE routemanagerdialog.cpp:1616 **** Routepoint 002 in route route2 replaced by Routepoint 2-2 from Free standing waypoints
11:41:43.711 MESSAGE routemanagerdialog.cpp:1616 **** Routepoint 003 in route route2 replaced by Routepoint 2-3 from Free standing waypoints
11:41:43.711 MESSAGE routemanagerdialog.cpp:1616 **** Routepoint NM001 in route route3 replaced by Routepoint NM001 from route1
11:41:43.711 MESSAGE routemanagerdialog.cpp:1635 **** Replaced 4 Routepoints

The Sync waypoints function has been proposed in Flyspray #2872 (https://opencpn.org/flyspray/index.p...s&task_id=2872) with current priority "very low".

An implementation of this function can be found at: https://github.com/douwefokkema/OpenCPN/tree/syncwp.

You want to try this function on Windows? Download https://www.dropbox.com/s/f2cmgukmut...encpn.exe?dl=0 and replace the opencpn.exe in your \Program Files (x86)\OpenCPN directory with this one.

Douwe Fokkema
Douwe Fokkema is offline   Reply With Quote
Old 20-03-2022, 09:31   #2
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 515
Re: Replacing identical waypoints in multiple routes

Wouldn't it be simpler to have a popup at importing with something like:
A waypoint for the same position does already exist. Use the existing waypoint instead??
Maybe with a checkbox "Do this always without asking again".
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 20-03-2022, 10:04   #3
Registered User

Join Date: Oct 2011
Location: Apeldoorn
Boat: Ovni 385
Posts: 342
Re: Replacing identical waypoints in multiple routes

Quote:
Originally Posted by rooiedirk View Post
Wouldn't it be simpler to have a popup at importing with something like:
A waypoint for the same position does already exist. Use the existing waypoint instead??
Maybe with a checkbox "Do this always without asking again".
I thought about that. But there could be several routes with different waypoints at locations where the imported route has waypoints. Then you don't know with which route to synchronize.

In my proposal you synchronize only with selected other routes. But it is easy to use this function with all routes selected each time you import a route.

Alternatively one could keep the button and also ask the question: A waypoint for the same position does already exist in route XXX. Use the existing waypoint instead?? (and forget about possible other routes)

Douwe
Douwe Fokkema is offline   Reply With Quote
Reply

Tags
cal, route


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple chargers, multiple battery banks terah Electrical: Batteries, Generators & Solar 1 23-06-2018 06:03
Multiple propane devices, multiple solenoids? jpendoley Plumbing Systems and Fixtures 18 03-04-2017 20:18
Way to edit multiple routes using same waypoints bob423 OpenCPN 3 04-09-2016 18:25
Multiple Batteries, Multiple Banks, Single Charger dakno Electrical: Batteries, Generators & Solar 3 06-06-2010 10:45

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 20:09.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.