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 Rating: Thread Rating: 4 votes, 2.00 average. Display Modes
Old 06-04-2011, 14:36   #1066
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
Re: Charts

Quote:
Originally Posted by sinbad7 View Post
Have a look at this..
Sadly it's only printed charts.. You can get the same ones from Bellingham chart printers in black and white affordably
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 10-04-2011, 16:00   #1067
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
Re: Charts

Well!! Take a closer look,and use your imagination....

Tore
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 14-04-2011, 23:26   #1068
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: .jpg-.gif-.tif

Quote:
Originally Posted by dacust View Post
So, now I'll just recap what I said at the very beginning. tif2bsb requires a palette type tif. But Imagemagick convert, when converting from a RGB type image to a tif, will create a RGB type tif. When converting from a palette type image, it will create a palette type tif. So, for it to work for us, we will have to create the tif from a palette type image. Well, when converting from any image to a gif, since gif is only a palette type image, convert will create a palette type gif.

So, now you know. From a jpg, we have to convert to gif first, and then convert that to a tif so we get a palette type tif.
Hi, fwiw, another quantization method using Imagemagick and noting problems with NetPBM's equivalent, is documented here:
https://trac.osgeo.org/grass/browser..._template#L593

Code:
convert - -colors 127 -compress RLE "$OUTFILE.tif" < "$INFILE.ppm"
gif isn't needed per se; "convert -colors 127" is needed.

Hamish
HamishB is offline   Reply With Quote
Old 15-04-2011, 05:34   #1069
Obsfucator, Second Class
 
dacust's Avatar

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,745
Re: .jpg-.gif-.tif

Quote:
Originally Posted by HamishB View Post
Hi, fwiw, another quantization method using Imagemagick and noting problems with NetPBM's equivalent, is documented here:
https://trac.osgeo.org/grass/browser..._template#L593

Code:
convert - -colors 127 -compress RLE "$OUTFILE.tif" < "$INFILE.ppm"
gif isn't needed per se; "convert -colors 127" is needed.

Hamish
Going from a .jpg to .tif I used -colors 127. It does not work. It produces an RGB .tif.

However, what you have different is the "-compress RLE". What I read says this is to compress for a fax. Could be it forces it to convert to a palette? Maybe a fax uses only palette style .tif?

On the other hand, best I can tell a .ppm is a palette type image so I would expect it to work already. So the question is, will the above statement work with a .jpg as an input?

Sorry, I don't have ImageMagick on this computer so I can't easily test it.

-dan
dacust is offline   Reply With Quote
Old 16-04-2011, 06:50   #1070
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: .jpg-.gif-.tif

Colour reduction for charts...
A bit of a digression,but
Check this out,per quantization and colour reduction for charts over on imgkap thread
http://www.cruisersforum.com/forums/...tml#post667790

Md'J is right into this stuff.and might know.
HappySeagull is offline   Reply With Quote
Old 16-04-2011, 16:40   #1071
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: .jpg-.gif-.tif

Quote:
Originally Posted by dacust View Post
Going from a .jpg to .tif I used -colors 127. It does not work. It produces an RGB .tif.
shrug, works for me. maybe pnmquant could help too, but see notes in the script.
I assume your output RGB .tif has been reduced to 127 colors, just without a palette?

Quote:
However, what you have different is the "-compress RLE". What I read says this is to compress for a fax. Could be it forces it to convert to a palette? Maybe a fax uses only palette style .tif?
RLE (run line encoding) is just one of many forms of compression you can use with tiff files. I chose it because I don't like wasting disk space, most software supports that scheme, and AFAIR that's what BSB uses. Nothing to do with faxes beyond its heritage perhaps, and it doesn't change the data any, just the internal method of zipping it.
No idea what assumptions imagemagick makes based on it though.

Quote:
On the other hand, best I can tell a .ppm is a palette type image so I would expect it to work already. So the question is, will the above statement work with a .jpg as an input?
ppm is raw rgb.

see also the man page for pnmcolormap from NetPBM tools.


Hamish
HamishB is offline   Reply With Quote
Old 16-04-2011, 16:44   #1072
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: Charts

from the other thread:
Quote:
>convert myfile -colors 127 -depth 8 -dither None myfile.tif

Otherwise the risk is to have a tif file with 127 colors, but in 24-bit (RGB) is random depending on the type of image origin.
maybe the `-depth 8 -dither None` helps?

Hamish
HamishB is offline   Reply With Quote
Old 17-04-2011, 02:02   #1073
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 65
Re: Charts

Quote:
Originally Posted by HamishB View Post
from the other thread:


maybe the `-depth 8 -dither None` helps?

Hamish
Hello,

-dither none or +dither explained http://www.cruisersforum.com/forums/...tml#post667790

After, the question is libbsb requiring 8-bits TIFF palette with 127 colors maximum.

Doing this with imagemagick is not so simple, -depth can be used to specify the size of 8 bits, but depth also applies to other color format.
And you can generate a TIFF file in RGB, so no color palette with only 127 colors.

With a jpg, you must first decompress the image and to specify the format and process to form the output file.

> convert original.jpg +compress +dither -type palette -depth 8 r.tif

make indexed r.tif with 256 colors in 8 bits.

> convert original.jpg +compress +dither -colors 127 r.tif
make indexed r.tif with 127 colors in 8 bits.

> convert original.jpg +compress +dither -colors 127 -type TrueColor r.tif
make r.tif with 127 colors in RGB 24bits


M'dJ
MdJ is offline   Reply With Quote
Old 18-04-2011, 04:49   #1074
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: Charts

Reposted here from flyspray FS#54 : Chart shading for night mode.

- Brilliant to see fullscreen mode coming in. I'd put in another vote for mapping that to F11.

- xcalib on linux is brilliant, thanks for the tip!

- I had a chance to try out bit-shifting the .kap file color tables on Marco's NZ charts: worked really well. Only caveat is that first shift gives you dusk mode, second shift gives you full night mode. Third shift probably only useful as black-hole mode.
So probably floor(value/{1,2,3,4}) as the four stages is the sweet spot?

For 255,255,255 white, instead of bit-shifting I made it red by hand. I didn't shift black,near-black.

- q&d Method: copy nz123.kap to nz123_dusk.kap and nz123_night.kap. open in vi, edit the RGB header lines; rebuild chart list.
"_d" comes before "_n" so in quilt mode they are ordered 1,2,3 so you know which ones to kick out quickly.

a sed or awk script could easily make three raster chart sets for you.

still, for non-NOAA raster charts it sure would be nice for the sunset button to do that for us.


here are my NZ color rules:
Code:
#day (orig)
RGB/1,255,255,255
RGB/2,10,10,10
RGB/3,200,0,255
RGB/4,241,185,255
RGB/5,60,190,217
RGB/6,197,235,244
RGB/7,98,171,116
RGB/8,246,200,110


#dusk     floor(value/2)
RGB/1,95,10,10
RGB/2,10,10,10
RGB/3,100,0,127
RGB/4,129,92,127
RGB/5,30,95,108
RGB/6,98,117,122
RGB/7,49,85,58
RGB/8,123,100,55


#night     floor(value/4)
RGB/1,55,0,0
RGB/2,10,10,10
RGB/3,50,0,63
RGB/4,60,46,63
RGB/5,15,47,54
RGB/6,49,58,61
RGB/7,24,42,29
RGB/8,61,50,27
cheers,
Hamish
HamishB is offline   Reply With Quote
Old 18-04-2011, 14:05   #1075
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Re: Charts

Hello Hamish,

try to put in a NZ chart following palette. It works fine.

Ciao, Marco.

Code:
RGB/1,255,255,255
RGB/2,10,10,10
RGB/3,200,0,255
RGB/4,241,185,255
RGB/5,60,190,217
RGB/6,197,235,244
RGB/7,98,171,116
RGB/8,246,200,110
DAY/1,255,255,255
DAY/2,10,10,10
DAY/3,200,0,255
DAY/4,241,185,255
DAY/5,60,190,217
DAY/6,197,235,244
DAY/7,98,171,116
DAY/8,246,200,110
DSK/1,63,63,63
DSK/2,2,2,2
DSK/3,50,0,63
DSK/4,60,46,63
DSK/5,15,47,54
DSK/6,49,58,61
DSK/7,24,42,29
DSK/8,61,50,27
NGT/1,0,0,0
NGT/2,30,30,30
NGT/3,30,0,30
NGT/4,15,10,15
NGT/5,0,10,25
NGT/6,0,5,15
NGT/7,0,15,0
NGT/8,20,10,0
GPS-Marco is offline   Reply With Quote
Old 18-04-2011, 19:24   #1076
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: Charts

Off topic but related to charts. Has anyone tested the Pilot charts on the latest build. For some reason they dont seem to load with the latest beta build of OCPN. Tried everything including changing permissions but they just refuse to load. Clueless in Canada..

/ch
sailias is offline   Reply With Quote
Old 18-04-2011, 20:00   #1077
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: Charts

works with WinXP, with and without quilting

Quote:
Originally Posted by sailias View Post
Off topic but related to charts. Has anyone tested the Pilot charts on the latest build. For some reason they dont seem to load with the latest beta build of OCPN. Tried everything including changing permissions but they just refuse to load. Clueless in Canada..

/ch
LeaseOnLife is online now   Reply With Quote
Old 19-04-2011, 04:28   #1078
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: Charts

OK good to know. Perhaps its a linux thing. Will give her another try but so far no success. Will sheck the logs on loading to see whats going on.

/ch
sailias is offline   Reply With Quote
Old 19-04-2011, 04:58   #1079
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: Charts (Pilot Charts)

Test: load only the pilot charts and check for rendering. Note that the scale arrows do not appear on the header bar. Secondly the charts are loaded (3) and so confirmed in the log:
-------------------------------
07:38:01 AM: Chartdb: Chart directory list follows
07:38:01 AM: Chart directory #0: /home/chris123/MyMarineCharts/Charts/extras_not_in_build/NAN08.kap
07:38:01 AM: Chart directory #1: /home/chris123/MyMarineCharts/Charts/extras_not_in_build/NAN09.kap
07:38:01 AM: Chart directory #2: /home/chris123/MyMarineCharts/Charts/extras_not_in_build/NAN10.kap
07:38:01 AM: MemoryStatus: mem_total: 2052456 kb, mem_initial: 311740 kb
---------------------------------
But nothing can be displayed. Test system Ubuntu 10.10 with latest build as of yesterday.
Attached Thumbnails
Click image for larger version

Name:	OCPN.png
Views:	173
Size:	120.4 KB
ID:	26346  
sailias is offline   Reply With Quote
Old 19-04-2011, 05:05   #1080
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: Charts (Pilot Charts)

Quote:
Originally Posted by sailias View Post
Test: load only the pilot charts and check for rendering. Note that the scale arrows do not appear on the header bar. Secondly the charts are loaded (3) and so confirmed in the log:
Aren't you selecting A CHART instead of A DIRECTORY ?
sailorF54 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 19:45.


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.