Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-06-2018, 16:25   #1
Registered User

Join Date: Feb 2017
Posts: 75
Making track lines for marine closures

I downloaded a GPX file of some existing marine closures which are shown as track lines on my charts like this:

Click image for larger version

Name:	1.JPG
Views:	37
Size:	110.8 KB
ID:	171088


I need to add some additional closures such as this. How can I go about entering them as tracks, just as the other ones are?


Click image for larger version

Name:	2.JPG
Views:	35
Size:	134.2 KB
ID:	171089


I see that I can enter waypoints and convert that into a route, but i'd rather have them as tracks so they show the same as the others.


I tried exporting the GPX and editing it, but the numbers for the tracks are in a different format than what is being used within ocpn. Why are they the same as what is being used for waypoints?



<name>Anacapa Island</name>
<extensions>
<opencpn:guid>20900000-8991-4b82-a32d-8b73454effff</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
<opencpn:style width="3" />
<gpxx:TrackExtension>
<gpxxisplayColor>Red</gpxxisplayColor>
</gpxx:TrackExtension>
</extensions>
<trkseg>
<trkpt lat="34.064961746" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064962668" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064847920" lon="-119.409326501">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064660836" lon="-119.408300389">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
__________________

J805 is offline   Reply With Quote
Old 04-06-2018, 17:24   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,745
Re: Making track lines for marine closures

Quote:
I see that I can enter waypoints and convert that into a route, but i'd rather have them as tracks so they show the same as the others.
You do not need to create waypoints to create a route. It is pretty simple to modify a GPX file in a decent text editor and convert route to track (replace "rtept" with "trkpt", wrap all trkpt tags in a trkseg tag, replace "rte" with "trk", remove the unnecessary extensions, done)
Quote:
I tried exporting the GPX and editing it, but the numbers for the tracks are in a different format than what is being used within ocpn.
What do you mean? In GPX, all the "numbers" (if you mean latitudes and longitudes) are decimal degrees. Always. They do not necessarily always use the same number of decimal places but that is no problem, unless you care about milimeter precision.
Quote:
Why are they the same as what is being used for waypoints?
What do you mean?

Quote:
<name>Anacapa Island</name>
<extensions>
<opencpn:guid>20900000-8991-4b82-a32d-8b73454effff</opencpn:guid>
<opencpn:viz>1</opencpn:viz>
<opencpn:style width="3" />
<gpxx:TrackExtension>
<gpxxisplayColor>Red</gpxxisplayColor>
</gpxx:TrackExtension>
</extensions>
<trkseg>
<trkpt lat="34.064961746" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064962668" lon="-119.409999987">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064847920" lon="-119.409326501">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
<trkpt lat="34.064660836" lon="-119.408300389">
<time>2017-03-13T00:58:01Z</time>
</trkpt>
This is incomplete, and as such invalid GPX that we of course can't handle.

A complete minimal track in GPX will look like this:
Code:
  <trk>
    <name>Not needed, but we like to have one</name>
    <trkseg>
      <trkpt lat="37.809265000" lon="-122.448863333"></trkpt>
      <trkpt lat="37.809055000" lon="-122.448531667"></trkpt>
      <trkpt lat="37.808903333" lon="-122.448125000"></trkpt>
      <trkpt lat="37.808575000" lon="-122.447461667"></trkpt>
    </trkseg>
  </trk>
__________________

nohal is online now   Reply With Quote
Old 04-06-2018, 18:10   #3
Registered User

Join Date: Feb 2017
Posts: 75
Re: Making track lines for marine closures

Thanks, this makes more sense now. But how do I convert a standard ocpn waypoint format to decimal for the GPX file?



Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333
J805 is offline   Reply With Quote
Old 04-06-2018, 18:19   #4
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,324
Re: Making track lines for marine closures

J805...

"Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333 "

Manual calculator.

59.300 / 60 = .988333333

Dave
bdbcat is online now   Reply With Quote
Old 04-06-2018, 18:19   #5
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,745
Re: Making track lines for marine closures

Quote:
Originally Posted by J805 View Post
Thanks, this makes more sense now. But how do I convert a standard ocpn waypoint format to decimal for the GPX file?



Is there a conversion tool somewhere to turn 33 59.300 to 33.988333333
Either switch OpenCPN to use decimal degree format (Toolbox->Display->Units) or learn to do the conversion from degrees and minutes to degrees, which is trivial math
Code:
DD MM.MMM => DD+(MM.MMM/60)
nohal is online now   Reply With Quote
Old 04-06-2018, 18:28   #6
Registered User

Join Date: Feb 2017
Posts: 75
Re: Making track lines for marine closures

Ahhh, got it now. Thank you guys for the help, much appreciated.



Sorry, i'm newbie to all this.
__________________

J805 is offline   Reply With Quote
Reply

Tags
marine

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Making sense of raymarine, making a system. northoceanbeach Marine Electronics 13 21-08-2015 15:01
Track lines Ivanm OpenCPN 5 09-02-2015 06:38



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.