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 10-10-2009, 12:25   #1
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Chart Converter Recruitment

Is anyone interested in working with me on creating a kml collection of all the current charts we have been using in opencpn? (NOAA bsb,enc and cmap cm93s)

CM93 will be a little bit more challenging than the s57 and bsbs.

Here are some screen shots of some progress I've had:
(this can be made to look much better and include other essential data)



__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 10-10-2009, 12:34   #2
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Howto - so far

Here is a how to for getting started on windows:

1 install osgeo4w (we will be using the gdal portion)
http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe
choose advanced install -> install from internet -> all users -> (use any directory you want) -> direct connection -> select the following
commandline utilities
gdal16
setup
shell
libs
gdal16-python
python-win32

2 the conversions will be command line

to create kml from a bsb .kap file
Code:
 
gdal16
gdal_translate -of vrt -expand rgba 18450_1.kap temp.vrt
gdal2tiles -k -w none temp.vrg 18450
to create kml soundings from s57
Code:
 
gdal16
ogr2ogr --config OGR_S57_OPTIONS SPLIT_MULTIPOINT=ON,ADD_SOUNDG_DEPTH=ON -dsco NameField=DEPTH -f KML soundings.kml us5wa15m.000 SOUNDG
to create all kml from s57
Code:
 
gdal16
ogr2ogr -f KML test.kml us5wa15m.000
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 11-10-2009, 03:50   #3
Registered User
 
James S's Avatar

Cruisers Forum Supporter

Join Date: May 2008
Location: We're technically refugees from our home in Yemen now living in Lebenon
Boat: 1978 CT48
Posts: 5,964
Images: 139
I don’t see many...OK...any replies....Being a low tech guy any advantages to this may not be readily obvious....can you explain what advantages this would have over existing systems?
What is the projected cost in time and other to complete X?
What type of participation are you looking for in working with you on this.
__________________
James
S/V Arctic Lady
I love my boat, I can't afford not to!
James S is offline   Reply With Quote
Old 11-10-2009, 06:00   #4
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Good on ya manimaul!

A couple of questions...
Is support for kml coming along i OpenCPN?
Is that part of the project?
What is your vision for the future of .kml as far as navigation is concerned?

Thomas
cagney is offline   Reply With Quote
Old 11-10-2009, 07:09   #5
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Thanks for the replies; these are good questions.

So #1, why?
First, its fun and a learning experience.

Second, I use sat photos in google earth when I plan a trip on my boat, having charts as layers is super helpful. As you can see, the rasters are easy to convert. I have a complete, finished raster library of the puget sound as kml. (Before i knew about opencpn, I used python to plot my position and track into google earth, so you can use it as a supplementary chart plotter.)

Third, this only relates to opencpn in that opencpn uses a modified version of gdal to read s57, bsb and cmap93/3. gdal is the same library I'm using to create the kml files.

#2 kml in opencpn?
I don't know. I can't really speak for Dave. He did mention that he wants to work on grib overlay recently. I suppose this could pave a path to kml overlay.

#3 is that part of the project?
No, the only relationtion to opencpn is gdal and reading cm93/3. And the usefullness of a supplementary program to opencpn.

Above all my number 1 goal is global chart data in an open format (kml).
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 11-10-2009, 07:20   #6
Registered User
 
James S's Avatar

Cruisers Forum Supporter

Join Date: May 2008
Location: We're technically refugees from our home in Yemen now living in Lebenon
Boat: 1978 CT48
Posts: 5,964
Images: 139
Yeh...so I recognized some of those words....but for the most part I didn’t understand most of what you said.
Sufficed to say I wont be very helpful.
Good luck with this.
__________________
James
S/V Arctic Lady
I love my boat, I can't afford not to!
James S is offline   Reply With Quote
Old 11-10-2009, 07:26   #7
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
on capcode, you can have a raster overlay on world wind.

although i'm not the greatest fan of copyright and patents, we may get problems redistributing kmls derived from raster/vector charts.. just a thought..

as far as i'd understood, we wanted to have a kml feature in opencpn so as to be able to import google earth imagery into opencpn (where navigation is to take place)?

i would have thought the logical consequence of the tif2bsb discussion above would be to convert google earth images for opencpn in a semi-automated fashion?
idpnd is offline   Reply With Quote
Old 11-10-2009, 07:39   #8
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
How you can help & roadmap.

You can help be experimenting with the kml and making it look like a proper chart.

You can especially help if you are good with scipting python or perl. As, this is how I plan to post-process the kml generated from gdal.

Roadmap s57:

1 Choose layers to pull out of vectors (ex. SOUNDG, DEPARE, COALNE ... etc) obviously we will want the major features such as depths, depth contours, lights, rocks, wrecks

2 Represent each layer with proper colors, transparencies, symbols in kml and script the process to create the finished kml
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 11-10-2009, 20:47   #9
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
KML

Pretty cool pix, manimaul....

Here is a heads up on my thinking about KML for opencpn:

I plan to add generic KML overlay capabilities to opencpn. Reading and parsing XML is straightforward with wxWidgets, so I have a starting hook.

Initial plan of attack and proof of concept(simplified): Export a track from opencpn as GPX. Convert to KML. Validate on GE. Write code. Import this track KML to opencpn as overlay. Compare to original track. If all goes well, then...

The next use I have in mind is to generate intermediate KML files from GRIB data as part of the GRIB effort. These intermediate files will then be loaded into opencpn as semi-transparent overlays.

Of course, as a side benefit, these GRIB->KML files could be read in Google Earth, as well. Seems like a useful thing. Maybe I'm not the only one working on this particular path....

As you have found, symbology is a big part of the effort. Yellow pushpins rendered by GE for points are cute, but we need waypoint icons, wind barbs, shoreline markups, supplemental soundings, etc., etc. All the basic symbology info will need to be incorporated into opencpn, with reasonable defaults for unrecognized features.

And then there is whole area of user-entered chart markups (soundings, new shoreline constructions, observed phenomena, etc. All this could/should be stored and shared as KML.


Anyway, that's my roadmap. In jello...

The reverse idea that you are working on (ENC->KML->GE) is neat too. Not too sure about realtime navigation using GE, though. Its a great planning and visualization tool. Love those oblique views

And, just to fully close the loop, eventually there will be no reason not to load KMLs generated by your efforts into opencpn. For instance, if we want customized ENCs for particular lat/lon regions, etc...

Sure is fun....

Dave


Dave
bdbcat is offline   Reply With Quote
Old 13-10-2009, 20:27   #10
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Quote:
Originally Posted by bdbcat View Post
As you have found, symbology is a big part of the effort. Yellow pushpins rendered by GE for points are cute, but we need waypoint icons, wind barbs, shoreline markups, supplemental soundings, etc., etc. All the basic symbology info will need to be incorporated into opencpn, with reasonable defaults for unrecognized features.
Symbology and visual representation is definitely a time consuming part. I can definitely help with any symbology for both kml and grib display. Just let me know what you need.

As for converting track and route gpx to valid kml... this can be done with gdal. The kml generated is pretty raw (pushpins and red line)
example:
HTML Code:
ogr2ogr -f KML testroute.kml testroute.gpx
I'm extremely curious how close cm93 is to s57. I would like to use the s57 driver in gdal to convert cm93 charts to kml also.

For now, I'm working steadily on bringing all the major features of s57 to a reasonable kml display.

You might enjoy a screenshot of some progress in the s57 to kml front:
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 25-06-2010, 21:34   #11
Registered User

Join Date: Jun 2010
Posts: 4
You guys rock... I've been fooling around with BSB and GIS for a few years as an ex-programmer with a hobby of sailing and power boating. I felt there must be some way to do an overlay of Google with a BSB map and was fooling around with the Google Map API's when I found this thread. I can't believe I can change all my BSB's with a simple batch file! I'd love to help... one thing I'm going to do first is strip off all the legends and white borders in the KAP files so they don't cover up good info. I can't believe how much good stuff I found here this evening. THANKS!
bcameron is offline   Reply With Quote
Old 29-06-2010, 08:58   #12
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Where do you get the depth data? Can we implement scripts so that they take a starting lat, and lon, and ending lat and lon, and automatically download satellite imagery, and depth data directly from google, then build a chart which is stored on disk?
seandepagnier is offline   Reply With Quote
Old 29-06-2010, 10:55   #13
Registered User

Join Date: Jun 2010
Posts: 4
Off of other charts.... the google maps don't come with data on depth so you need to do an overlay as Manimaul is doing above. My understanding is that you can download certain google content but you'd be storing lots and lots for any potential area as google will give you all the KML files for that area... much better to do it online so you only download what you need. Good luck.
bcameron is offline   Reply With Quote
Old 29-06-2010, 22:56   #14
Registered User
 
manimaul's Avatar

Join Date: Feb 2008
Location: Seattle, WA
Posts: 416
Quote:
Originally Posted by bcameron View Post
You guys rock... I've been fooling around with BSB and GIS for a few years as an ex-programmer with a hobby of sailing and power boating. I felt there must be some way to do an overlay of Google with a BSB map and was fooling around with the Google Map API's when I found this thread. I can't believe I can change all my BSB's with a simple batch file! I'd love to help... one thing I'm going to do first is strip off all the legends and white borders in the KAP files so they don't cover up good info. I can't believe how much good stuff I found here this evening. THANKS!
Vadp created a script to remove the BSB border... kap2vrt.2.py You will need gdal and python. Run gdal2tiles on the vrt produced by kap2vrt.2.py.

Code:
kap2vrt.2.py --cut 16206_2.KAP
(gdal2tiles is part of gdal)
Code:
gdal2tiles.py -k -w none 16206_2.vrt
__________________
Marine Navigation for Android:
https://mxmariner.com
manimaul is offline   Reply With Quote
Old 30-06-2010, 16:31   #15
Registered User

Join Date: Jun 2010
Posts: 4
Wow

Now, you REALLY rock. I'm new to Python and am trying to clip some old BSB 2.0 version charts so had a few challenges with the kap2vrt.2.py file. It wouldn't recognize Universal Transverse Mercator so I modified it to do that and then I got some library errors as it appears that kap2vrt.2.py depends upon v 2.6 of Python but then the gdal libs depend upon 2.5.... fun and games but I learned a lot about python and gdal in the interim! That's a nifty install program... but I learned way too much about it. :-) I've been sitting behind a desk for too many years but my old C programming skills are coming back!
bcameron is offline   Reply With Quote
Reply

Tags
recruitment


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
AC-DC Converter squarehead Electrical: Batteries, Generators & Solar 5 26-08-2009 18:34
Spraying AwlCraft Using Brushing Converter? geoffschultz Construction, Maintenance & Refit 1 27-04-2009 04:50
TV Converter Box Dilemma svcattales Marine Electronics 16 19-10-2008 13:52

Advertise Here


All times are GMT -7. The time now is 12:49.


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.