Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-01-2010, 05:11   #106
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 GPS-Marco View Post
I don't know why bmp does not work to you.
Well, it does, if the bmp is in good shape. The problem was imagemagick making so many of those "black" ones, which MapCal wouldn't open.
It doesn't seem to have a problem with pngs, so I'll just use (and advise people to use) pngs instead.

Quote:
About the manual, ... The processes on linux and windows are really similar. Why not describing a generic process ...
I'll look into it. Actually, for Windows, I could just point to the mc2bsbh page which is pretty much all you need.

Quote:
the mean latitude of you chart (not critical)... is not exact: under Latitude you should put 0 (zero) for mercator projections.
Ah. Well. I that was the latitude the projection referred to, you know, with big Mercator charts, use you dividers at the approx latitude you are, as it's not constant throughout, so give it the average... but I guess the calibration calculates it.
I guess it asks the latitude for non-mercator charts, then... in which case, what would you advise I advise? Put 0 for mercator (though then it shouldn't matter), chart average for other projections?

- D
__________________

__________________
http://gandalf.it/astronav/
Don B. Cilly is offline   Reply With Quote
Old 09-01-2010, 05:41   #107
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Marco,
Totally missed KapGen while being away a few weeks when it was released...
what a great tool! Thanks!

Is it possible to use wildcards to automate the generation of the kap files from the calibrations in the chartcal.hdr file?

Something like
c:\kapgen *

The workaround would be to pipe the output of kapgen -l to a text file, strip the textdescriptions of the files and then use it in a kapgen_batch.bat replica of tif2bsb_batch.bat, but maybe this has been done already?

Jonas
__________________

__________________
jonasaberg is offline   Reply With Quote
Old 09-01-2010, 11:17   #108
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
Er,
first of all, sorry about the huge Youtube window, I didn't expect it to do that.
When I realized I went to edit the post, but 30 minutes had passed (I was doing other things) and could not. Well, now I know.

On the bmp/png/blackmagick thing, I'm sorry to say, I spoke too early. The tests went well, but I had done too few of them. It seems that some pngs are created "black" too, they just don't say so in the thumbnail (which is even worse if anything). They look good, but Mapcal won't open them. Some yes, some no. Like the bmps.
So problem not solved.
Note that this only applies to linux, in Windows it opens all bmps and pngs, black or colorful. Let's hope we find a solution. Again this has to do with imagemagick conversions in linux.

On the tif2bsb_batch script (I added a bit on it to the "manual"), see that, but something that could be useful for use with it is
Code:
for i in `find * -depth`; do (mv $i `echo $i|tr [:upper:] [:lower:]`); done
which converts all your files in the current directory to lowercase.

- D.
__________________
http://gandalf.it/astronav/
Don B. Cilly is offline   Reply With Quote
Old 10-01-2010, 01:14   #109
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by jonasaberg View Post
...
Is it possible to use wildcards to automate the generation of the kap files from the calibrations in the chartcal.hdr file?
...
Hi Jonas, I use the following KapGenAll.cmd. It does more or less:

1) For all available charts in CHARTCAL
2) if a map (kap file) is not already built, call kapgen

Code:
@echo off

FOR /F "tokens=1 delims= " %%A IN ('bin\mc2bsbh -l Calibration\CHARTCAL.DIR') DO (
  if not exist BSB/%%A.kap call KapGen %%A
)
copy paste in a text file, call it KapGenAll.cmd and put it in the same place of KapGen.cmd

P.S. It is a very rough tool. For example it does not rebuild a chart whose CHARTCAL data or whose source image has changed... I'll work on a better update tool after the NZ portfolio will be completed.

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 10-01-2010, 01:26   #110
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by Don B. Cilly View Post
Ah. Well. I assumed that was the latitude the projection referred to, you know, with big Mercator charts, use you dividers at the approx latitude you are, as it's not constant throughout, so give it the average... but I guess the calibration calculates it.
I guess it asks the latitude for non-mercator charts, then... in which case, what would you advise I advise? Put 0 for mercator (though then it shouldn't matter), chart average for other projections?

- D
Don, this latitude refers to the parallel of projection (at least this is written in the MapCal/Seaclear manual) and this parallel is the equator (the tangent to the cilinder) for mercator (at least for the map we use for navigation). So latitude=0.

You maybe refer to the parallel of true scale of a mercator projection. This data (reported on maps in parenthesis after the scale value) shall be put in a BSB field called KNP/PP. This data is totally missing in the MapCal data base and shall be added in the BSB header by hand or using the "advanced" feature of mc2bsbh that uses the MapCal comment field to add BSB special parameters (as KapGen does....)

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 10-01-2010, 02:29   #111
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Marco,
Regarding KapGenAll.bat
It works as a charm.

Really good fun to browse around the south pacific for a while also.

Thanks!

/J
__________________
jonasaberg is offline   Reply With Quote
Old 10-01-2010, 16:03   #112
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
Ok, Marco, I rephrased the mapcal entry in the manual, which was also lacking a few fine points.

Pity no-one has any ideas on fixing the black magick thing, it really puts a dent in the linux-convert thing. I have to do a lot of the mapcal with windows...

Anyway, the rest of it I do with linux just fine, I also made a few cilly little hacks that automate some of the processes if anyone else converts maps with linux, here they are, remove the .doc.

- D.
Attached Files
File Type: doc jpgconv.zip.doc (1.4 KB, 1324 views)
__________________
http://gandalf.it/astronav/
Don B. Cilly is offline   Reply With Quote
Old 10-01-2010, 16:42   #113
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by Don B. Cilly View Post
Pity no-one has any ideas on fixing the black magick thing, it really puts a dent in the linux-convert thing. I have to do a lot of the mapcal with windows...
- D.
Don, in KapGen I use nconvert.exe (a command line image converter from xnview). There is a linux version. The only problem is that you have to convert to 64 colours since it does not support converting to 127. Give it a try... And tell me if it helps you.

Or, at last, move to a true O.S.

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 10-01-2010, 18:35   #114
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
Marco,

Tried. It does support 127 - at least it doesn't complain when I tell it to.
I tried with 63 too, but... with the same results.
It does exactly the same thing as imagemagick. Random black bmps or (good-looking) pngs that won't open in mapcal in linux. ('tacci sua...)
The advantage seems to be the syntax which is simpler than the imagemagick one and allows for good sensible batch conversions.

I really wonder what the problem is with these image conversions in linux.

Quote:
Or, at last, move to a true O.S.
Well man, if you have one, I'll try it... where is it?

- D.

P.S. Have you tried nconvert -help ?
It (says it) supports about a trillion file formats, including things like ZX Spectrum Hobetta, Pixar picture files, Punk Productions Pictures, LucasFilm Formats, Blazing Paddles(?)... and.. Fugawi Maps?
__________________
http://gandalf.it/astronav/
Don B. Cilly is offline   Reply With Quote
Old 11-01-2010, 10:22   #115
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Don B
What about sending me one of your problem pics (pcx or gif), so I can check it out?
I don't know what's up. SeaClear/MapCal works amazingly well with wine.But, for sure, there is a difference, between wine and a "native" environment.

Meanwhile there is another(?) black problem. Some of mine converted tifs, show up with a deep, semitransparent, gray layer. Underneath a distorted chart picture is just visible.
When running tif2bsb on these pics you get the dreaded message:
Code:
No support for TIFF files with BITSPERSAMPLE=2 (only 4 or 8 bits per sample supported)
It seems that if you have a pure black/white chart picture to start with, it is not enough to convert the usual way, via gif. I managed to get around this by adding a few colors in one corner,then saving as a new gif, and then, in gimp, saving as a tif.

Thomas
__________________
cagney is offline   Reply With Quote
Old 11-01-2010, 11:25   #116
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Quote:
Originally Posted by cagney View Post
...Meanwhile there is another(?) black problem. Some of mine converted tifs, show up with a deep, semitransparent, gray layer. Underneath a distorted chart picture is just visible.
When running tif2bsb on these pics you get the dreaded message:
Code:
No support for TIFF files with BITSPERSAMPLE=2 (only 4 or 8 bits per sample supported)
It seems that if you have a pure black/white chart picture to start with, it is not enough to convert the usual way, via gif. I managed to get around this by adding a few colors in one corner,then saving as a new gif, and then, in gimp, saving as a tif.

Thomas
I got this often when doing the Terraserver charts. When it was an area that there were no images, it substitutes a B&W cell (Black with a white X). If the entire consolidated .jpg was nothing but these B&W cells, I got the same error as you did above. Since these were charts with absolutely no useful information on them, I just used it as a natural way to weed out the useless charts.

-dan
dacust is offline   Reply With Quote
Old 11-01-2010, 11:46   #117
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
One thing that must be possible to do with ImageMagic is to automate what I did with Gimp.
*Find a command that add some colors in the upper left corner.
*Save the new picture, perhaps as png, and then transform it to gif and finally tif, in the usual way.
I think this will force the picture to be acceptable to tif2bsb.
Anyone with some deeper knowledge in ImageMagic??
I'll do some RTFM:ing later.......

Thomas
__________________
cagney is offline   Reply With Quote
Old 11-01-2010, 14:34   #118
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 cagney View Post
Don B
SeaClear/MapCal works amazingly well with wine.
Yes, it does.
The problem has to be with the images... or at least with how linux recognizes them... here is one bmp, 10 megs uncompressed, less that 200K zipped.
As I was looking for a "small" bmp I noticed something...
See this:



You see, all "black" ones are above 10 megs.
Does that give anyone a clue? Is Mr. Holmes reading this?

- D.
Attached Files
File Type: doc selvagem-grande.zip.doc (191.2 KB, 30 views)
__________________
Don B. Cilly is offline   Reply With Quote
Old 11-01-2010, 14:42   #119
Senior Cruiser
 
idpnd's Avatar

Cruisers Forum Supporter

Join Date: Sep 2007
Location: Almerķa, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,551
Could be a setting on "thumbnailing images" which is limited to a certain size.. happens in gnome.
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 11-01-2010, 15:04   #120
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
idpnd,
It could be.
Googling 'gnome thumbnailing images size limit setting' returns some pointers.
How that same setting would affect mapcal (with wine) not loading them, is a mystery I'm sure Mr. Holmes would er.. love to solve. We've seen worse things though.

[edit] Hm. It wouldn't explain the pngs that do thumbnail but don't open in mapcal...

[edit2] I'm probably looking in the wrong direction. Depending on the type of list, the "black" files change. Obiously, the one I attached for Thomas shows up under another type of view. So disregard. I just assumed it was those files that mapcal didn't open. I'll have to check further - not tonight.
Thanks for the tip idpnd.
__________________

__________________
http://gandalf.it/astronav/
Don B. Cilly is offline   Reply With Quote
Reply

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:56.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.