Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 4 votes, 2.00 average. Display Modes
Old 15-10-2009, 12:21   #136
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
Marco...

Thanks for the work on this test file. I still had to enter the header manually after running the initial tif2bsb utility. I run the command file from within a directory I named libbsb where I have installed tif2bsb,the header file and of course the raster chart.tif file.

Using the last header you sent for the Manukau estuary as a model,I just inserted the previously collected geo data for the Hamburg.tif map and ran it through the command file. he file Hamburg.kap was created and again the header inserted manually before saving. Unfortunately the map did not show up in OpenCPN,not even the red outline. I had previously converted the Hamburg.tif file to 8 bit (127) palette colour. Perhaps you could check the Hamburg.tif file for me for validity? It's in my dropbox. Sorry to give you all this work...

Here is the header file I used:

VER/2.00
BSB/NA=Hamburg port,NU=,RA=2400,1675,DU=60
KNP/SC=25000,GD=WGS84,PR=MERCATOR,PP=-0.0,PI=0.0,SP=
SK=0.0000000,TA=00,UN=METERS,SD=MEAN LOW WATER SPRINGS
DX=0.0,DY=0.0
CED/SE=2002,RE=1,ED=2009
PLY/1,943,280,53.5394,09.9052 PLY=2,1266,727,53.5145,09.9354
PLY/3,1982,513,53.5266,10.0026
PLY/4,1451,288,53.5391,09.9527
REF/1,53.5551,10.0414
REF/2,53.5551,09.8168
REF/3,53.4616,09.8168
REF/4,53.4616,10.0414
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 15-10-2009, 13:10   #137
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
...
CED/SE=2002,RE=1,ED=2009
PLY/1,943,280,53.5394,09.9052 PLY=2,1266,727,53.5145,09.9354
PLY/3,1982,513,53.5266,10.0026
...
Well, at least PLY=2 is an error. Then put also a new line. You should read:

...
CED/SE=2002,RE=1,ED=2009
PLY/1,943,280,53.5394,09.9052
PLY/2,1266,727,53.5145,09.9354
PLY/3,1982,513,53.5266,10.0026
...

I don't know if there are other problems.

UPDATE:
the hamburg.tif file is 256 colours (not 127!). Maybe this is the rason it does not work. How do you convert to tif? which SW do you use? Remember: 127 colours is not 8 bits; 127 colours is less that 7 bits!

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 15-10-2009, 13:48   #138
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 sinbad7 View Post
Marco...

Thanks for the work on this test file. I still had to enter the header manually after running the initial tif2bsb utility. I run the command file from within a directory I named libbsb where I have installed tif2bsb,the header file and of course the raster chart.tif file.

Using the last header you sent for the Manukau estuary as a model,I just inserted the previously collected geo data for the Hamburg.tif map and ran it through the command file. he file Hamburg.kap was created and again the header inserted manually before saving. Unfortunately the map did not show up in OpenCPN,not even the red outline. I had previously converted the Hamburg.tif file to 8 bit (127) palette colour. Perhaps you could check the Hamburg.tif file for me for validity? It's in my dropbox. Sorry to give you all this work...

Here is the header file I used:

Code:
VER/2.00
BSB/NA=Hamburg port,NU=,RA=2400,1675,DU=60
KNP/SC=25000,GD=WGS84,PR=MERCATOR,PP=-0.0,PI=0.0,SP=
    SK=0.0000000,TA=00,UN=METERS,SD=MEAN LOW WATER SPRINGS
    DX=0.0,DY=0.0
CED/SE=2002,RE=1,ED=2009
PLY/1,943,280,53.5394,09.9052 PLY=2,1266,727,53.5145,09.9354
PLY/3,1982,513,53.5266,10.0026
PLY/4,1451,288,53.5391,09.9527
REF/1,53.5551,10.0414 
REF/2,53.5551,09.8168
REF/3,53.4616,09.8168
REF/4,53.4616,10.0414
Hint: If you wrap your file in CODE tags, the spacing is preserved. Just highlight your code and click the # button. I did it in the quote of your message above.

I did it to make sure you had the 4 spaces required for a line extension. You do.

-dan
dacust is offline   Reply With Quote
Old 15-10-2009, 15:09   #139
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
Marco..

I seem to have some problems reducing the number of colors to 127.
I have a number of graphics progs. incl Photoshop and CorelPaint,Gimp, Picture Publisher etc. and I thought I manged to reduce the Hamburg.tif file to 127 colors but some of my progs still show it as 256?? Can you recommend a simple freeware utility?

Thanks Dan for the CODE tag tip...
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 15-10-2009, 15:18   #140
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 sinbad7 View Post
I seem to have some problems reducing the number of colors to 127.

...

Can you recommend a simple freeware utility?
ImageMagick is the most comprehensive graphics conversion tool I am aware of. It is a command line tool.

The command would be probably be:
Code:
convert original.tif -colors 127 new.tif
There is a Windows version, which is what I use for the photo conversions.

EDIT: It also includes a display command (I think that is what it is) that gives you very detailed info about any image.

-dan
dacust is offline   Reply With Quote
Old 15-10-2009, 16:06   #141
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
Dan..

Had a look at the ImageMagick website but I am not sure how to download and install all the files and directories shown. I am used to downloading just one file. Here it seems you also have to download VisualStudio from MS?? Perhaps a bit complicated for my use?
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 15-10-2009, 17:06   #142
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 sinbad7 View Post
Dan..

Had a look at the ImageMagick website but I am not sure how to download and install all the files and directories shown. I am used to downloading just one file. Here it seems you also have to download VisualStudio from MS?? Perhaps a bit complicated for my use?
You must be looking at where to download the source and compile it yourself.

Here is a link to the .exe download

-dan
dacust is offline   Reply With Quote
Old 16-10-2009, 00:49   #143
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
Marco..

I seem to have some problems reducing the number of colors to 127.
I have a number of graphics progs. incl Photoshop and CorelPaint,Gimp, Picture Publisher etc. and I thought I manged to reduce the Hamburg.tif file to 127 colors but some of my progs still show it as 256?? Can you recommend a simple freeware utility?

Thanks Dan for the CODE tag tip...
Hi, you say you use GIMP. Well, read my post #135. I just report here what I wrote there:

To convert the file, load the image in GIMP, then you need to convert the image in 2 steps: to RGB and then to 127 colours. The commands in GIMP Italian menu is

1) Immagine->modalità->RGB
2) Immagine->modalità->Indicizzata->127 colori

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 16-10-2009, 05:56   #144
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
Dan..

ImageMagic seems to be a very comprehensive graphic handling program,great!!
I've skipped through the user codes but can not find one which displays the number of colors in an image. Is there such a thing? Would be handy to check .tif files.

Marco. I use Gimp now and again to create transparent .gif's but not so familiar with it's other commands. Thanks for the tip,I will check it out.
I have no luck at all displaying the converted Hamburg.tif map even after reducing the number of colors to 127. Could you have a go? Maybe something is missing in the map?
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 16-10-2009, 07:42   #145
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by sinbad7 View Post
...
Marco. I use Gimp now and again to create transparent .gif's but not so familiar with it's other commands. Thanks for the tip,I will check it out.
I have no luck at all displaying the converted Hamburg.tif map even after reducing the number of colors to 127. Could you have a go? Maybe something is missing in the map?
Tore, the hamburg-64.tif has been rescaled! If you change the dimension in pixel of the image the whole template has to be recalculated (all x,y values changes). Moreover the template had the keyword REF and the PLY swapped.

This is the right template (HamburgTemplate.kap):

Code:
VER/2.00
BSB/NA=Hamburg port,NU=,RA=2400,1675,DU=60
KNP/SC=25000,GD=WGS84,PR=MERCATOR,PP=53.0,PI=0.0,SP=
    SK=0.0000000,TA=00,UN=METERS,SD=MEAN LOW WATER SPRINGS
    DX=5.0,DY=5.0
CED/SE=2002,RE=1,ED=2009
REF/1,943,280,53.5394,09.9052
REF/2,1266,727,53.5145,09.9354
REF/3,1982,513,53.5266,10.0026
REF/4,1451,288,53.5391,09.9527
PLY/1,53.5551,10.0414
PLY/2,53.5551,09.8168
PLY/3,53.4616,09.8168
PLY/4,53.4616,10.0414
So: take hamburg.tif and change colours to 127 without touching the dimension or rescaling. Then run tif2bsb using the above template for the kap generation.

Ciao, Marco.
GPS-Marco is offline   Reply With Quote
Old 16-10-2009, 08:47   #146
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 sinbad7 View Post
I've skipped through the user codes but can not find one which displays the number of colors in an image. Is there such a thing? Would be handy to check .tif files.
The ImageMagick command would be:

Code:
identify -verbose yourimage.ext
-dan
dacust is offline   Reply With Quote
Old 16-10-2009, 08:51   #147
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
Marco..

I changed the Hamburg.tif to 127 colors using this command line:
convert Hamburg.tif -colors 127 Hamburg127.tif but the GIMP info still shows the file as 256 colors? I then used the header as shown in your last message and converted a new Hamburg127.kap file which does NOT work??
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 16-10-2009, 09:20   #148
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
Dan...

Thanks for the ImageMagick display command for image info. works great..

Only trouble is,all my .tif files converted to 127 colors using the formula 'convert original.tif -colors 127 new.tif ' you gave me earlier are still showing as 256 colors??
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 16-10-2009, 09:49   #149
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 sinbad7 View Post
Dan...

Thanks for the ImageMagick display command for image info. works great..

Only trouble is,all my .tif files converted to 127 colors using the formula 'convert original.tif -colors 127 new.tif ' you gave me earlier are still showing as 256 colors??
I only thought that might work.

This is contorted, but try:
Code:
convert original.tif -colors 127 new.gif
convert new.gif -colors 127 new.tif
Only a thought. I don't guarantee anything. We are quickly getting outside my knowledge, here. There is an ImageMagick forum listed on their site. You can ask in there.

EDIT: Here is a command list for all ImageMagick commands. Of course, most everything is done through the convert command, but they have some specialized commands for other uses.

-dan
dacust is offline   Reply With Quote
Old 16-10-2009, 10:20   #150
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
Dan..

Nope... did not work either.. I will have a read from their manual thanks..

Tore
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 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 03:36.


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.