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 20-04-2023, 11:13   #1
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 315
Managing and off-loading waypoints, routes and tracks

It is so easy in OpenCPN to create waypoints and tracks that I have accumulated hundreds - possible places of refuge, alternative routes depending on conditions etc. etc. I had accumulated 2450 waypoints and 311 routes. This season we will be off to Norway - a new cruising ground for me, and so I needed to tidy up and off-load objects in areas we will not be visiting for some while.

I had tried adding prefixes to objects to denote their area(e,g, UK-S: for the UK south coast) but it has not been practicable to keep this rigorously.

I have now created a script for the JavaScript plugin that allows the selection and management of objects by area. You create one or more boundaries using pseudo-routes in OpenCPN. A boundary must include the text 'boundary' in its name (case insensitive) and share its first and last points. If you have several boundaries, they may share route-point borders.

The script searches for boundaries and displays a dialogue, such as this example:
(Whoops - cannot get image in here before my edit window expires. See here.)


(1) You select which boundary you wish to use and whether you want to select objects inside or outside it.

(2) For tracks and routes, you have the option of selecting ones that cross the boundary having points both inside and out.

(3) You select which objects you wish to select

(4) You specify what you want done with objects selected.

List lists their names in the script output pane.

Make visible makes the objects visible and makes all objects not selected invisible.

Prefix name adds a prefix (e.g. UK-S: to the selected objects name and removes any matching prefix from unselected objects.

Delete deletes the selected objects.

Off-loading objects
This utility can be used to off-load objects for particular areas such as a cruising ground you are not visiting at present. The objects are exported into a .gpx file and can then be deleted from OpenCPN. If you return to the area, the objects can be imported back into OpenCPN.

You can then run the script again with the same boundary and the Delete action selected. The script deletes routes before waypoints and checks that the waypoints to be deleted are not still used by any remaining routes. If they are still in use, they are not deleted and the routes are listed.

Fuller details and the script are available in the Shared Scripts library.
Attached Thumbnails
Click image for larger version

Name:	ExampleDialogue.jpg
Views:	47
Size:	51.8 KB
ID:	274383  
Antipole is offline   Reply With Quote
Old 21-04-2023, 02:07   #2
Registered User

Join Date: Aug 2009
Location: Onboard, currently cruising in SE Asia
Boat: St. Francis 44 Mk II (Catamaran)
Posts: 199
Send a message via Skype™ to SoggyPaws
Re: Managing and off-loading waypoints, routes and tracks

This is an interesting approach and I might play with it a little.
What we do is put our past waypoints and other "notes" marks in a layer by country. Then you can load, unload, and hide the set of marks easily, and also leave the waypoint symbol but hide the name. I have about 20 layers, some that have extensive track files in them and it doesn't seem to bog OpenCPN at all. It's easy to aggregate the waypoints you want to export to a layer...manually position your boat in the middle of the area, and then sort the marks list by distance from boat. Normally this will get you 95% there.

But when marks are in a layer, you CANNOT edit the mark. (I often wish for a Edit button on a layer mark, and layer tracks and possibly routes (main properties only), but have never suggested it as a feature request).
SoggyPaws is offline   Reply With Quote
Old 22-04-2023, 07:07   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: Managing and off-loading waypoints, routes and tracks

Tony your script is a pretty awesome route tool! Thank you.
rgleason is offline   Reply With Quote
Reply

Tags
route, loa


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
Sharing of Routes, Tracks and Waypoints dtlag Navigation 46 24-06-2020 14:49
Waypoints Routes and tracks after crash Andreas29 OpenCPN 2 18-05-2020 01:43
Sync Waypoints, Routes and Tracks with Dropbox timohara OpenCPN 2 21-10-2013 17:55
Maxsea waypoints/routes/tracks into OCPN? Jim Cate OpenCPN 1 03-07-2012 08:05
Splitting and extending routes and tracks PjotrC OpenCPN 7 24-03-2011 00:49

Advertise Here


All times are GMT -7. The time now is 00:22.


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.