<rtept lat=30.029090184 lon=-90.111572469></rtept>
<rtept lat=30.204728445 lon=-89.836468985></rtept>
<rtept lat=30.203715893 lon=-89.834170824></rtept>
<rtept lat=30.197912995 lon=-89.809026230></rtept>
<rtept lat=29.171015039 lon=-88.916687617></rtept>
Keep an eye on the stuff up there above this paragraph. It is
gonna do a trick for you in a minute.
I had used Fugawi
for a while as an ECDIS system, before I
for my iphone
. The "i" is nice cause I can take it
out into the cockpit
and see the display even in daylight. But
it is still nice to have something that runs on a bigger screen
for voyage planning and stuff, I tried OpenCPN
found it lacking back then, but it is certainly getting better
now, so it seems like a good time to get on the OpenCPN
wagon. The future has a name, and it is OpenCPN.
Only problem is, I got all these routes and stuff that won't
into OpenCPN. I can't even open the saved RTE files
makes. When I open them in a text editor it is just
binary gobbledysquabble. However, I can run a screen
through a text reading program like ABBY Fine Reader or
Acrobat, and extract text from the image, and work with that.
But do I really want to paste lats and longs one by one into a
? OpenCPN does not make that process trivial. Some
kind of tool is needed. (update: I figured out how to make
Fugawi export a route
as a text file, so that simplifies things
Okay, what we have at the top of this post is a sample of an
OpenCPN GPX file, stripped down to its bare essentials. I
wanted to make a BAT file to automatically parse a list of
coordinates into a file that I could import
into an OpenCPN
route. But when I opened an exported GPX file with a text
editor, I saw a whole bunch of tags and syntax that looked
superflewus and redundink. By the process called calculatus
eliminatus by the ancients, I found out what was needed for a
clean import, and what was not. It turns out that what is
needed, isn't very much at all. You don't even have to have a
name for the route, though it is simple enough to add one with
a "<name> and a </name> tag, surrounding the desired
name, right after the <rte> tag.
The <gpx> tag of course tells OpenCPN that it is looking at a
gpx file. The closing </gpx> tag says, "hey, that's all!". <rte>
tag tells the program that this is a route, and the closing
</rte> says, "THE END!". The <rtept> tag means "this is a
route point", and the lat and lon modifiers set the coordinates
of the point, and the </rtept> tag of course closes the route
point entry. There are several of these open/close tag pairs,
and you need at least two pairs for a route. The two final
tags, as already discussed, close out the first two opening
tags. Most html and xml type syntaxes use these tags in pairs
like that, with the </> version the closer to the opener.
Sometimes a closing tag is not needed, as in the case of the
<p> tag in html, which begins a paragraph. The next <p> tag
tells the browser or other interpreter that the previous
paragraph is finished because this is the start of a new one.
However, I tried leaving off the </rtept> tags, and OpenCPN
would not import the file. So here you have it... the minimum
needed to import a route into OpenCPN. Everything after the
closing </gpx> tag is ignored by OpenCPN. When I import
this file, the route is loaded and displayed as an unnamed
route, and if I export the route, it is exported with all the
garbage re-put back in that I edited out with the text editor.
This is probably a good thing, because maybe some GPS
units want to see all that garbage.
Yes, the text content of this entire post, as you see it, is a
and technically functional route file that can
be imported. Try it if you don't believe me. Copy the
complete text of the body of this post, paste it into notepad,
and save it as "whatevah.gpx". Make sure it does not append
the "txt" filename extension. Sorry Lunix guys... I know I am
using windoze-speak here. Mac guys... get a real computer
haha. Copy the resulting file into wherever you keep your
GPX files. Start OpenCPN and import the file. ta-dah! Of
course if you like, you can delete all the stuff after the closing
tag, but you could also leave a comment if you like. Oh yeah
I know I know... the route has you driving your boat overland.
That's because I took a real route and for the sake of brevity
I deleted a bunch of points, the ones that dodge around
through the Rigolets and out into Lake Borgne. So please no
wise-ass remarks about my navigational acumen, please!
Okay, that's the raw anatomee of a gpx file. Should be simple
to create a BAT file or a simple app or script to parse a
bunch of lat/longs into a usable route, I'll be doing that some
day soon. Stay tuned.
Okay, you stayed tuned long enough. I just completed a
preliminary release of GPXer. Its temporary home is
just download, unzip, put it in a convenient directory on your
windoze box, and run it. No installation
necessary. Put a
shortcut in your start menu or on your desktop
if you like. It's freeware. There's no help file but I will post a quickie how-to tomorrow. It is pretty obvious how to use it. In fact I will post it now.