Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 4 votes, 2.00 average. Display Modes
Old 29-09-2009, 09:21   #1
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Charts

I think there is a need for a separate thread to discuss issues relating to charts. Many of these issues are not directly related to the development of OpenCPN, but highly relevant for the practical use of the program, especially outside the US and Brazil.
One of these issues is - how can one use the excellent free, .tiff chart pictures published in New Zealand?

Thomas
cagney is offline   Reply With Quote
Old 29-09-2009, 09:36   #2
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
The easiest way would be to develop a normal raster map calibration facility for OpenCPN, found in most of the other well known nav progs. I am sure that would be well within the capabilities of our learned fellow boaters. BSB conversion is still a great problem,both technically as well as legally.

I have already prepared several of the NZ raster charts,reduced them to a manageable physical size,compressed them and finally calibrated them in Fugawi,Oziexplorer and SeaClear formats. Have a look:
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 29-09-2009, 09:46   #3
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Tiff2Bsb, beyond a concept....

I am now able to convert the NZ .tiff pictures, relatively easy, to .kap chart files that works fine with OpenCPN. These charts are of very good quality, as you can see for yourself below. The .tiff pictures are scanned in 300dpi, which I have kept when making these sample charts. View the details of the anchorage of Alofi on the Island of Niue zoomed in x6, for example. Also I just had to get a picture of a part of the Hauraki Gulf off Auckland for Sinbad7 .

I have dumped the raster2bsb program as this did not rely work for me. As I said before, it just took to long time, I persisted, once, and produced a chart of bad quality after waiting for an hour and a half ...

I found that by using tiff2bsb, part of libbsb, on the command line
I can make a chart in less than 2 seconds.

The basic command is:
Code:
$  tif2bsb -color 127 template.kap path_to_downloaded_tiff  path_to_produced_chart
For example I used this command to make the chart over the Hauraki Gulf.
Code:
$  tif2bsb -color 127 template.kap Downloads/nz53.tif NZ53.kap
This produced the chart NZ53.kap in my home-directory.

Where you have to put in some effort is in handcrafting the template.kap file containing all relevant info about the chart.

I will tell you exactly how to produce a basic version of this file in my next post. Meanwhile .. have a look here.

Thomas
Attached Thumbnails
Click image for larger version

Name:	snapshot80.png
Views:	896
Size:	67.3 KB
ID:	10206   Click image for larger version

Name:	snapshot79.png
Views:	1245
Size:	335.2 KB
ID:	10207  

cagney is offline   Reply With Quote
Old 29-09-2009, 09:52   #4
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Thomas..

I stand corrected, and, Gratulations!!! Where can I download the NZ53.kap file you made for me?

P.S. I would suggest you could use the getdropbox.com for a storage place for this and future charts. Initially you get 2 GIGA of FREE space,which can reasonably be expanded later.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 29-09-2009, 10:49   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
template.kap

Below I have attached a sample template file that can only be used with nz53.tif, without editing. I will refer to the line numbers in the picture.
To produce a template file you have to open the .tiff in a program such as Gimp in Linux or even Paint in WinXP . The main thing to do is geo-referencing. I draw a simple square and write lat at top and bottom, and long left and right. On the Nz charts you have an easy reference for the inside of the chart at lower left corner and upper right corner. At the same time, write down the pixel-count that corresponds to lat & long.
Lets go through it line by line:
1/ Name of the chart
2/ NU is just any number you prefer. RA is the total pixel width and height of the whole tiff picture incl white-space outside the chart proper.
3/ SC is the scale of the chart. Check the link in previous post for more about line 3,4 and 5
6/ release number and date
8-11/ The format here for each line is
long in pix,lat in pix,lat,long
Lat and long as deg.dddd not deg min.ddd
I start in the lower left corner( line 8 ) and work clockwise to lower right corner.
12-15 is lat,long as above starting in lower right corner clockwise to upper right corner.
16 IFS is "Depth of the colormap"

That is the short version. I'm not sure about all the details, and I am learning all the time. I'm sure thing can be done different and better
Hopefully this will get some of you going. Together we can, hopefully, fine-tune the art of writing a template file.

If you try NZ14061 eq INT61 you will have no luck on windows until next beta. For Linux use latest CVS. I had the pleasure , to serve Dave another "Mole" as this was probably the first ever bsb chart spanning the 180:th meridian that OpenCPN encountered.
Also with this very small scale chart, 1:10.000.000, other problems pops up. The latitude is out 15 miles at the top of the chart with only 4 reference points.

This is what Dave has to say about this:
Quote:
Latitude: This will be a special concern for small-scale charts. If we just have 4 corner reference points, then we can only do a simple linear scaling of pixels to latitude. Of course, for a mercator chart covering a large range of latitude, this leads to large georeferencing errors. You will notice the orange title bar on the NZ chart, signifying poor georeferencingas analyzed by opencpn.

Ideally, we need as many as 8 points in the latitude direction, at both longitude extremes, for small scale charts. Less for larger scale.
More in a few days.

Thomas
Attached Thumbnails
Click image for larger version

Name:	snapshot81.png
Views:	966
Size:	74.7 KB
ID:	10208  
Attached Files
File Type: txt template.txt (416 Bytes, 558 views)
cagney is offline   Reply With Quote
Old 29-09-2009, 13:22   #6
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
So I take it this BSB converting facility is NOT yet available for Windows? and, we're back to my previous #2 message for all Windows users here. What about the finished converted BSB chart,is that readable by Windows versions of OpenCPN?
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 29-09-2009, 14:24   #7
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Thomas..

Having downloaded the 'libbsb',I created a CMD file as follows:

D:\PROGRAM FILES\LIBBSB\libbsb-0.0.3\tif2bsb -color 127 template.kap\LIBBSB\Auckland.tif NZ-AUCKLAND.kap

I executed the above 'testconv.cmd' command line but without ANY results. What am I doing wrong?
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 30-09-2009, 11:43   #8
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by sinbad7 View Post
Thomas..

Having downloaded the 'libbsb',I created a CMD file as follows:

D:\PROGRAM FILES\LIBBSB\libbsb-0.0.3\tif2bsb -color 127 template.kap\LIBBSB\Auckland.tif NZ-AUCKLAND.kap

I executed the above 'testconv.cmd' command line but without ANY results. What am I doing wrong?
Libbsb is indeed available for the win32 platform. You can download libbsb-0.0.7-win32.zip (the latest available release) here.
Instructions for installing libbsb is in the "README" file once you have unzipped the downloaded file. The installation is not a trivial "windows installer" kind of operation, but seemingly not to complicated for someone used to compile and install similar programs. Your mileage may vary .....I have not done it myself.

Once the installation is clear, the commands ought to be identical to Linux, except, of course for the different paths.

Thomas
cagney is offline   Reply With Quote
Old 30-09-2009, 12:04   #9
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
I am not much into programing,is it also necessary to install C+++ in order to use the libbsb? I think I need a step by step orientation if I am to proceed.

I was not able to access/unpack the NZ53.kap.tar.gz file. I tried just re-naming to NZ.kap and the OpenCPN installed it ok in the register but nothing was accessable or showing the BSB outline. What needs to be done?
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 30-09-2009, 14:44   #10
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Thomas..

Using Alpha Zip and 7Z, I finally managed to unpack the file but neither OpenCPN,nor SeaClear or Fugawi will accept the resulting .kap file.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 30-09-2009, 15:16   #11
Registered User
 
Beverly Stayart's Avatar

Join Date: Jul 2009
Location: Elkhorn, Wisconsin, U.S.A.
Posts: 38
Thanks for this very helpful info.
Beverly Stayart is offline   Reply With Quote
Old 30-09-2009, 16:26   #12
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,420
I believe the way to go is to have Open CPN work with calibrated (gifs, tifs, jpg, bmps, you name it). Then we can use the NZ charts, our paper scans, Google dumps, weather faxes, etc.

And I would love to see the feature where two charts could be layered (with transparency) so that say I can see the Google dump over a tiff chart. This would be very, very cool (and useful - at least to me).

Hugs to community,
barnie
barnakiel is offline   Reply With Quote
Old 01-10-2009, 03:50   #13
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
How can Cagney in message #3 display charts when you are removing my message #13? This chart shows successful transformation of a .tif raster chart to the .kap standard for personal use.

I am well within the stated size limit of the -jpg file. I keep having messages removed here and I'd like to know the reason. The theme of this thread is charts used with OpenCPN so i IS topical... answer please.....
Attached Thumbnails
Click image for larger version

Name:	AUCKLAND.jpg
Views:	769
Size:	326.9 KB
ID:	10248  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 01-10-2009, 10:05   #14
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by barnakiel View Post
I believe the way to go is to have Open CPN work with calibrated (gifs, tifs, jpg, bmps, you name it). Then we can use the NZ charts, our paper scans, Google dumps, weather faxes, etc.

...

Hugs to community,
barnie
I think that we are already there, we just need some more testing and finding the best way to do it.
The program Raster2Bsb which is a frontend to libbsb uses the program "convert" from the ImageMagic suite, to convert chart pictures to .tif files. You can do the same thing manually from the command line instead.
On Debian/*buntu
Code:
$sudo apt-get install imagemagick
To use convert simply
Code:
$ convert chart.jpeg chart.tif
...and you will have a .tif to use with tif2bsb. The same command works for .bmp, .gif and .png.
In this simple form convert tend to produce very large tiffs, but I'm sure that digging into the mile-long list of options could fix that, if necessary.

Thomas
cagney is offline   Reply With Quote
Old 01-10-2009, 14:08   #15
Registered User

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 20,420
Debian/buntu - what are these?

In practice - I have a file and want to use it in OpenCPN

- which software to download,
- how to add geo reference and convert to OpenCPN format?

ImageMagic - why do I need it?

b.
barnakiel is offline   Reply With Quote
Reply

Tags
charts, kml, raster2bsb, tiff2bsb, bsb

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
Charts on CD stxboy Navigation 43 28-01-2014 10:40
Charts for BC Charlie Navigation 11 19-04-2007 03:39
Used Charts daven Navigation 2 28-11-2006 16:47
Looking at charts - where to go to next Rippy Other 19 10-03-2006 04:27

Advertise Here


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


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.