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 02-01-2010, 10:59   #61
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Code:
$sudo apt-get install libbsb-tools
Thomas
cagney is offline   Reply With Quote
Old 02-01-2010, 12:35   #62
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Reading state information... Done
E: Couldn't find package libbsb-tools

I had checked with synaptics before downloading the code, but it doesn't seem to be in any of my repositories. Is it in any of yours (which?)

D.
Don B. Cilly is offline   Reply With Quote
Old 02-01-2010, 15:04   #63
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
I'm sorry. I was to quick.
The .deb for libbsb is not that easily available. I'm attaching both the 32 and 64 bit version. I'll also upload them to the opencpn.org.

Thomas
Attached Files
File Type: doc libbsb.tar.gz.doc (63.4 KB, 137 views)
cagney is offline   Reply With Quote
Old 02-01-2010, 17:05   #64
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Got it. Thanks.
joey@bob:~$ tif2bsb
Usage: tif2bsb [-c colormap-size] template.kap input.tif output.kap
which looks good.
Slowly slowly catchee monkee.

I'll look into it asap (it's almost 2am here, just got home) but if I may ask, since you guys are so good:

there's a lot of information in these forums, a bit too much and just a tad confusing it seems, could I have (or be directed to) a post that summarizes a way to go about getting an opencpn-manageable chart from a tif/pcx/bmp/whatever image file, possibly titled or first-lined "how to get a calibrated nautical chart from a tiff file with linux" or something so that

1) I can get down to getting my few important charts working just fine with opencpn and
2) the next linux hopeful like me that come along googling that sort of thing has a chance to find a nice quick'n'dirty way of doing it

If I may not ask, no problem, I am finding this extremely helpful, and that little tile-reconstructing script was just plain great.

Thanks again

D.
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 01:05   #65
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
A comprehensive HOW TO in this area would be great. It's definitely a subject for the opencpn wiki.
Meanwhile, a quick way to get the basics is to read the chart thread posts # 2,5,14,66,85,90,94 and113. Then if you prefer to work with MapCal read mc2hbsbh thread for the rundown on this tool.

Thomas
cagney is offline   Reply With Quote
Old 03-01-2010, 04:19   #66
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Success (to some extent)

~/mapcal$ mc2bsbh CHARTCAL.DIR
Create BALEARICS.hdr
~/mapcal$ tif2bsbh -c 127 BALEARICS.hdr balearics.tif balearics.kap
tif2bsbh: command not found
#/ well, it said so on the page i got the instructions from
~/mapcal$ tif2bsb -c 127 BALEARICS.hdr balearics.tif balearics.kap
~/mapcal$ ll

-rw-r--r-- 1 joey joey 460 2010-01-03 12:27 BALEARICS.hdr
-rw-r--r-- 1 joey joey 1892350 2010-01-03 12:30 balearics.kap
-rw-rw-rw- 1 joey joey 1300748 2009-12-31 20:19 balearics.tif

The resulting .kap opens just fine in opencpn, and shows up in the preview.
Except. The process I use at the moment is:
1) Convert a chart image to tiff with imagemagick.
2) Convert it again to bmp with the same.
3) Reboot into Windows, load Mapcal, calibrate it.
4) Reboot into Linux, copy the relevant files to the relevant directory, and run the above.
5) copy the resulting .kap into opencpn's chart dir, and reload the chart database.

Now, obviously I can do this with a bunch of charts at a time, so I only have to switch OSs twice, but, well, the question is, can I calibrate the chart without MapCal? From what I read, it looks like I'd have to make the header file "manually", how do I do it, count the pixels for the calibration points? It's not as if I'm Zaphod Beeblebrox...

That is the point I'm still missing completely.

D.

P.S. I haven't checked if I can calibrate directly from the .tif in MapCal, it seemed to open it, I'll get the bucket, boot Win and will let you know.
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 05:50   #67
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Nope. Mapcal (in Windows) loads the tif, calibrates it, but does not save it.
Will not convert it to WCI either (so why does it load it and calibrate it I wonder).
It looks like this "make your own chart" thing still has some way to go.
And it looks like my goal of erasing the Windows partition is not quite as near as it seemed when I found opencpn.

D.
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 06:15   #68
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 was going to say "Don B. Silly!"

Of course the conversion works,and very well at that. I have converted literally dozens of them without any problems. To use MapCal you have to convert your original file to .png. The saved file after calibration you re-name to the name of your choice.hdr and then use this in libbsb in conjunction with your filename.tif prepared in GIMP as 127 color file. Just take some time,you will find it works...
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 03-01-2010, 08:28   #69
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
I'm no pixel counter , gimp (or paint for that matter) handles that!
Load a tif and look in the lower right hand corner! Select "Rectangle Select Tool" and you will have a nice "crosshair" to choose a geo- referencing point.

MapCal can't do anything unless you choose reference points for georeferencing. Did you actually read the posts I recommended?

The processes worked out on this forum for generating charts definitely works! I have probably done more than 100 charts the last 3 months. I think that Marcos Win tool for NZ charts, generates more than 200 charts nowadays. So don't despair you are almost there.

Thomas
cagney is offline   Reply With Quote
Old 03-01-2010, 09:37   #70
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Yes, yes. As I said, I got the chart, and it works, even in the preview.
I was complaining about Mapcal requiring the conversion to BMP as well as TIF, even if it loads the TIF and pretends to calibrate it whereas it does not.

So to summarize, I either use the multi-OS 5-step process in my last post, or, if I want to stay within Linux, I:

1) Convert a chart image to tiff with imagemagick.
2) Load it in an image manipulation program that counts the pixels.
3) Using a header template and filling in the relevant fields, make a calibration header for it.
4) Run tif2bsb -c 127 chartname.hdr chartname.tif chartname.kap
5) Copy the resulting .kap into opencpn's chart dir, and reload the chart database.

In order to get to the point where I'm able to do this I have to (if I'm running an Ubuntu distro) :
Get imagemagick (it's the repositories)
Get libbsb for Ubuntu (it's in post #63 in this thread, remove the .doc)
Get MapCal SeaClear GPS Navigation Software , by installing SeaClear which won't work with Wine for me (yet), in case I prefer to use Windows for part of the process rather than counting the pixels with the Gimp.
To convert the chart pictures from one format to another, I use:
convert chartimage.jpg -colors 127 chartimage.gif
and then: convert chartimage.gif -colors 127 chartimage.tif
because apparently it has to be done in two steps.
If I use MapCal I also have to:
convert chartimage.jpg -colors 127 chartimage.bmp
as Mapcal won't calibrate the .tif.

The header template can be found here

I am obviously writing all this out so that any newcomer will have a few posts to read detailing the essentials of making your own raster chart with Linux... we are in some ways progressing towards a sort of Wiki - I hope.
Please correct me if I'm wrong somewhere.

D.
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 09:48   #71
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Quote:
Originally Posted by Don B. Cilly View Post
Yes, yes. As I said, I got the chart, and it works, even in the preview.
I was complaining about Mapcal requiring the conversion to BMP as well as TIF, even if it loads the TIF and pretends to calibrate it whereas it does not.

So to summarize, I either use the multi-OS 5-step process in my last post, or, if I want to stay within Linux, I:

1) Convert a chart image to tiff with imagemagick.
2) Load it in an image manipulation program that counts the pixels.
3) Using a header template and filling in the relevant fields, make a calibration header for it.
4) Run tif2bsb -c 127 chartname.hdr chartname.tif chartname.kap
5) Copy the resulting .kap into opencpn's chart dir, and reload the chart database.

In order to get to the point where I'm able to do this I have to (if I'm running an Ubuntu distro) :
Get imagemagick (it's the repositories)
Get libbsb for Ubuntu (it's in post #63 in this thread, remove the .doc)
Get MapCal SeaClear GPS Navigation Software , by installing SeaClear which won't work with Wine for me (yet), in case I prefer to use Windows for part of the process rather than counting the pixels with the Gimp.
To convert the chart pictures from one format to another, I use:
convert chartimage.jpg -colors 127 chartimage.gif
and then: convert chartimage.gif -colors 127 chartimage.tif
because apparently it has to be done in two steps.
If I use MapCal I also have to:
convert chartimage.jpg -colors 127 chartimage.bmp
as Mapcal won't calibrate the .tif.

The header template can be found here

I am obviously writing all this out so that any newcomer will have a few posts to read detailing the essentials of making your own raster chart with Linux... we are in some ways progressing towards a sort of Wiki - I hope.
Please correct me if I'm wrong somewhere.

D.
Actually it's already documented here

-dan
dacust is offline   Reply With Quote
Old 03-01-2010, 10:29   #72
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
You are getting there, congratulations.

One thing, the tif you get through my "join-pcx.sh" script is ready for use with tif2bsb, all conversions are already done.
To use this with MapCal just
Code:
convert chartimg.tif chartimg.bmp
should be enough, but
Code:
convert chartimg.tif  -colors 127 chartimg.bmp
is OK as well.
Alternatively, change the script to produce a bmp and then do the conversion to tif via gif.

Thomas

PS: Dan, why don't you start transferring your summary of the process to opencpn.org ?
cagney is offline   Reply With Quote
Old 03-01-2010, 11:40   #73
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
Quote:
Originally Posted by dacust View Post
Actually it's already documented here

-dan
Not for Linux, I'm trying to get this together for use with Linux.

D.
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 17:35   #74
Registered User
 
Don B. Cilly's Avatar

Join Date: Dec 2009
Location: Ibiza, Spain
Boat: At the moment, Chrome on Ubuntu I'm afraid, but I take out lots of little ones
Posts: 59
(Update. I got MapCal to work with Wine. See the .doc).

So as it now looks "simple" enough, I made a draft document for the chart-making wiki. Comments and corrections Invited.

D.
Attached Files
File Type: doc charts-howto.doc (21.0 KB, 272 views)
Don B. Cilly is offline   Reply With Quote
Old 03-01-2010, 18:23   #75
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Quote:
Originally Posted by Don B. Cilly View Post
(Update. I got MapCal to work with Wine. See the .doc).

So as it now looks "simple" enough, I made a draft document for the chart-making wiki. Comments and corrections Invited.

D.
Great!

A coupla notes:

The reason you need the two stage conversion is because tif2bsb requires the tif to be a palette type. However, a tif can be either a palette or RGB type. When ImageMagick converts from a raster format like bmp or jpg, it automatically creates an RGB type tif. A gif is a palette type image, so when if converts a gif to a tif, it automatically creates a palette type. So, to trick it to create a palette type tif from an RGB image, the intermediate gif does it. I'd bet there is a way to do it in a single step, but the last time I checked, no one on the ImageMagick forum knew how.

mc2bsbh has to be downloaded separately. You'll find that download at the link I gave above. It's the official site. It has a windows binary and also the c++ source to be compiled on a *nix box.

-dan
dacust is offline   Reply With Quote
Reply


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
Marine GeoTiff - Open Chart Standard dacust OpenCPN 12 04-11-2009 17:43
Standard Horizon Plotter Scratch Our Community 3 05-01-2009 13:45
Standard Horizon JonasB Navigation 6 05-12-2008 11:40
Standard Horizon - CP 500 Parlay III Navigation 3 04-08-2008 07:20

Advertise Here


All times are GMT -7. The time now is 05:00.


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.