Cruisers Forum
 


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 22-04-2015, 16:33   #1
Registered User

Join Date: Aug 2012
Posts: 323
How to merge two navobj.xml?

One day last year my OpenCPN (v3.2.0 on Mac OS 10.8.2) has lost all track data from more than 1 year of sailing. A new track has been started, don't know why.
However, I have a time machine backup of the old navobj.xml (from the Preferences folder)
We have continued sailing since the old track had disappeared and a new track has "grown".
Now I would like to merge the old one and the current one, so that I have a complete track.
How can I do this?
myocean is offline   Reply With Quote
Old 23-04-2015, 09:20   #2
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: How to merge two navobj.xml?

Quote:
Originally Posted by myocean View Post
One day last year my OpenCPN (v3.2.0 on Mac OS 10.8.2) has lost all track data from more than 1 year of sailing. A new track has been started, don't know why.
However, I have a time machine backup of the old navobj.xml (from the Preferences folder)
We have continued sailing since the old track had disappeared and a new track has "grown".
Now I would like to merge the old one and the current one, so that I have a complete track.
How can I do this?
There are several ways but Try this as simplest for me to explain assuming I understand what exactly you have there...

the ".xml" is a ".gpx" or rather, a .gpx is a navigational .xml format

make a copy of the backup navobj.xml (always fiddle with copies, not originals)
rename it as backup.gpx or 2014.gpx or whatever makes sense.
import it into Opencpn with the route manager

you should see your old stuff and your new together...

The next thing would be to choose and select the stuff you do want to keep (using Opencpn's routemanager (ie export visible tracks, wpts and routes) and export them as backups.

However, if your tracks include 10million wpts while you stopped and got fuel or tied up to a dock, or drifted, it'd be a good idea to edit them before saving them .... You can do this in several ways just one of which is using o's "split" function, then hiding the useless bit before exporting.

Again, I suggest the logbook/photoalbum analogy...by the day,by the month,bythe year. Keep the gold, overboard with the blurred pictures of armpits....as in "the night we left the laptop on at the dock" can be replaced with a mark exported with the track. not to say you delete it but edit and highlight the stuff to keep and put the original on an old hardrive (labelled) in the back of somebody's closet ashore.

grump: I don't know why people "Track" an endless stream of consciousness and are suprised when even a machine's memory loses interest trying to load a 100mb xml file
You can also get down'ndirty by using a good text editor
and/or a good gpx editor
HappySeagull is offline   Reply With Quote
Old 24-04-2015, 01:38   #3
Registered User

Join Date: Feb 2010
Posts: 619
Re: How to merge two navobj.xml?

Quote:
Originally Posted by HappySeagull View Post
import it into Opencpn with the route manager

you should see your old stuff and your new together...
Myocean, all good advice from HappySeagull, but until you are quite clear about what you have where, I would recommend doing the cleanup/sorting/renaming in a separate, clean instance of OpenCPN (i.e. a portable install or another machine), not to mix old and current stuff. This reduces the risk of deleting something by mistake from the current objects. It is also easier then to use the "delete all xxx" to perhaps separate tracks, routes and waypoints into a couple of gpx files.
The result can be merged as the next step, when just the needed stuff remains, and has suitable names assigned.
PjotrC is offline   Reply With Quote
Old 24-04-2015, 08:02   #4
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: How to merge two navobj.xml?

yes..agree for sure. always make backups ...you could copy out the present navobj.xml to somewhere else ...

and, I could also have mentioned :
FYI be aware that Opencpn herself also keeps backups of navobj.xml as "navobj.xml.1, navobj.xml.2, navobj.xml.3, navobj.xml.4, navobj.xml.5" but these are not so easily accessible for the User from Opencpn and I have a feeling your old track is not in them but I could (so easily! )be wrong. Have a look. whatever...The file creation date and size of these backups will tell you something....
HappySeagull is offline   Reply With Quote
Old 22-05-2015, 22:35   #5
Registered User

Join Date: Aug 2012
Posts: 323
Re: How to merge two navobj.xml?

This has worked very well for me - thank you very much!
16000 miles of cruising are in a 2.8 MB file without manual stripping of tank stops and similar. Backup is done with time machine.
myocean is offline   Reply With Quote
Old 24-05-2015, 09:00   #6
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: How to merge two navobj.xml?

good oh!, myocean! Thanks for reporting back.

(and...I wonder if O could be made to produce these with a date in the name..might make a good "feature request"!)
HappySeagull is offline   Reply With Quote
Reply


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
Are you an XML expert? Tropical Storm Layer bbalan OpenCPN 7 28-08-2014 04:33
Sean's Optimum Branch Merge bdbcat OpenCPN 195 31-05-2014 13:46
Two Engines, Two Alternators, Two Banks scurvy dog Electrical: Batteries, Generators & Solar 2 16-02-2014 05:48
Two solo cruisers , Two boats OR Two Captains One Boat colo.sail General Sailing Forum 8 17-12-2011 16:36

Advertise Here


All times are GMT -7. The time now is 21:44.


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.