Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 15-12-2014, 11:30   #1
Registered User

Join Date: Apr 2012
Posts: 12
How do I batch change waypoint icons

In order to fix a problem with edited waypoint icons disappearing, imported gpx files now default to a question mark for the icon. When I had to restore my computer and reinstall Open CPN most of my waypoints came in as question marks without names visible on the chart. Two questions:
(1) is there a way to batch change all or a subset of your waypoint icons?
(2) how do you make the waypoint names visible for all waypoints as the default?
__________________

__________________
WallyD is offline   Reply With Quote
Old 16-12-2014, 19:32   #2
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: How do I batch change waypoint icons

Quote:
Originally Posted by WallyD View Post
In order to fix a problem with edited waypoint icons disappearing, imported gpx files now default to a question mark for the icon. When I had to restore my computer and reinstall Open CPN most of my waypoints came in as question marks without names visible on the chart. Two questions:
(1) is there a way to batch change all or a subset of your waypoint icons?
(2) how do you make the waypoint names visible for all waypoints as the default?
(1) I have done similar per your query with success. but don't feel like revisiting it to see if this is what I did right now...so, you can try this. It's where I would start unless you wait for a better answer....? If you made the original gpx's with opencpn it should be easy

You can use a text editor application to replace the existing icons in your .gpx. I use "Notepad++" It has a "search for all instances+replace all " function.
..assuming there are several of the same name, and you just want one of opencpns defaults, replace your lost icons in the gpx with the default
triangle or circle etc.
It would look like this in the gpx file.
<sym>triangle</>
...You would only need search for <sym> to find them and then replace all of the same icon as in search for <sym>mylosticon</>sym> and replace all with <sym>triangle</sym>. I include the whole line as a safe habit.
But if you can find your custom icons, put them in opencpn's UserIcons folder, then your old icons may reappear.

You might also have a look at the .ini file...I have an entry under the heading [Settings/Others]
DefaultWPIcon=triangle (or circle or mylosticon..)

If you are using another application to make gpx files and it's default icons, you should note the name of the icon it uses and make one of the same name for your UserIcons folder

(2) look at this section of the opencpn type gpx: (Other applications do not often have this)

<extensions>
<opencpn:guid>73ebffff-c65b-412f-820b-e95d19ad0000</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
<opencpn:viz_name>1</opencpn:viz_name>
</extensions>

...again find and replace all instances of <opencpn:viz_name>0</opencpn:viz_name>
with
<opencpn:viz_name>1</opencpn:viz_name>

Hope it helps.
__________________

__________________
HappySeagull is offline   Reply With Quote
Old 17-12-2014, 09:23   #3
Registered User

Join Date: Apr 2012
Posts: 12
Re: How do I batch change waypoint icons

Thank you Happy Seagull,

Your response was most helpful. Unfortunately, even when the gpx file is generated by OpenCPN I do not have a <opencpn:viz_name>1</opencpn:viz_name>
line with the waypoint. I see where the line should go and maybe I can figure out how to batch add it.

From my perspective having the waypoints imported without visible names is a bug and I will enter a task in Tracker.

Wally
__________________
WallyD is offline   Reply With Quote
Old 17-12-2014, 09:32   #4
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: How do I batch change waypoint icons

Wally, have a look at opencpn's navobj.xml and the numbered backups......these may help.
__________________
HappySeagull is offline   Reply With Quote
Old 17-12-2014, 11:16   #5
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: How do I batch change waypoint icons

Quote:
Originally Posted by WallyD View Post
Thank you Happy Seagull,

Your response was most helpful. Unfortunately, even when the gpx file is generated by OpenCPN I do not have a <opencpn:viz_name>1</opencpn:viz_name>
line with the waypoint. I see where the line should go and maybe I can figure out how to batch add it.

From my perspective having the waypoints imported without visible names is a bug and I will enter a task in Tracker.

Wally
I tested the most recent beta and these options are included as lines in an exported gpx (either a route or waypoint) if they were set before exporting...
They will not appear where no option was set.
Also, using and "saving" them in another navigation application often strips these tags.
__________________
HappySeagull is offline   Reply With Quote
Old 18-12-2014, 04:33   #6
Registered User

Join Date: Feb 2010
Posts: 619
Re: How do I batch change waypoint icons

Quote:
Originally Posted by HappySeagull View Post
these options are included as lines in an exported gpx (either a route or waypoint) if they were set before exporting...
They will not appear where no option was set.
If this is so, it will make life even harder for those who hand-edit GPX files. It was really much easier in previous generation of OCPN, when the properties were encoded as a simple string:

Code:
<wpt lat="54.786999" lon="14.169000">
<name>ARKONA_BECKEN Platf.</name>
<desc></desc>
<sym>platform</sym>
<type>WPT</type>
<prop>A,0,1,1,1</prop>
</wpt>
Maybe this looks not so pleasing to XML parsers but is much easier to edit on the human side... perhaps a compromise format could be found, taking into account the ease of batch editing GPX files? Besides assuming the right defaults on import, it is often an important factor, when converting foreign files.
__________________
PjotrC is offline   Reply With Quote
Old 18-12-2014, 06:14   #7
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: How do I batch change waypoint icons

Pjotr...
This is gone for years. And it was not GPX compliant at all.
If this stuff is really needed, we have to provide tools to do it, not use crappy solutions.

Pavel


Sent from my iPhone using Cruisers Sailing Forum
__________________
nohal is online now   Reply With Quote
Old 18-12-2014, 06:31   #8
Registered User

Join Date: Feb 2010
Posts: 619
Re: How do I batch change waypoint icons

Pavel,

I know, I am not proposing just to revert to this format... but there must exist a way which is both GPX compliant and easier to work with ( a single number encoding the values? a string keyword with some meaningful letters?)

Yes, I often have to convert foreign GPX to feed into OCPN, and regular expressions seem to become more difficult to write

Thanks,

Piotr
__________________

__________________
PjotrC is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Batch RNC Download From NOAA SteveInMD OpenCPN 2 29-04-2014 18:25
West System 320 Small Batch Epoxy Scale Ziggy Product or Service Reviews & Evaluations 6 14-01-2013 17:59
NOAA Hurricane URL for Batch Download from a Sat Phone barrett bondon Navigation 0 11-09-2010 20:03
Icons Jerry Forum Tech Support & Site Help 6 23-02-2006 01:43



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.