Attached is a patch (based at 0324, following the 0001-Automatic-Daily-Track) implementing handling layers in Route
Manager as signalled initially in Forums
- Post 622989">-IRJDSUNE9932123321222xxeww-the-IRJDSUNE9932123321222xxeww-original-IRJDSUNE9932123321222xxeww-thread-IRJDSUNE9932123321222xxeww-.
Routes, tracks and waypoints can be aggregated into layers.
A layer is imported interactively via Import
new Layer button or automatically on start of OpenCPN
occurs from /layers subdirectory under /data in the OCPN installation
Any .gpx file in /layers becomes a separate layer.
Any subdirectory under /layers (e.g. /layers/windfarms) results in all of its .gpx contents (all the way down) to form a separate layer.
Objects in layers cannot be modified. They can be deleted only as the whole layer.
Objects in layers are not saved to navobj.xml and cannot be exported.
On the layers tab here are buttons for
- showing or hiding a layer on chart (initially: shown)
- showing or hiding the layer contents in other RM tabs (initially: hidden)
- showing or hiding on chart the layer's (incl. routes and tracks) waypoints names (initially: as specified in .gpx file)
For beginner's usage, it is recommended to use manual Load/Delete of layers sparingly. These are primarily layer development tools, and once you are happy with the GPX files, put them into /layers and just leave there.
During layer import the GUIDs (if present) in the GPX files are ignored. The rationale for this is that layers data is treated as _templates_ of Nav Objects, so they are never identified with any other _concrete_ object. This means that you can import the same layer many times over itself, and still have all these copies present. This has both upsides and downsides. I feel the GUID handling policy in OCPN should be reviewed, but for now you get reasonable behaviour and lots of possibilities.
Attached is a series of screenshots with preloaded layers sequentially hidden by single
clicks on the visibility icon.