Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 30-12-2009, 16:16   #46
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
>Not sure what you mean the chart does not show up in 'preview'?

It looks like this:


As you see, it's a white box with a yellow dot in the top left-hand corner.

Whereas a "normal" chart looks like this:


so one can "preview" it and know by habit which of his favorite charts it is.
Great feature of opencpn, BTW, I prefer it to the "quilting" that CNP does.

>Could you please tell me EXACTLY where you found the wrong calibration

That's easy enough, put you cursor on, say, the crosslines at 39N, 1E.
Opencpn gives that cursor position as 3911'N, 059E. As you progress eastward, longitude seems to go more off, take the 130' line and it's a 118' cursor position.
You'll also notice that the 39th parallel is split at 1E. So that's a tiling error... but hey, I promise, I'll try the calibration thing myself as soon as possible, if I may just ask, since you did the tiling, if you could get the whole thing tiled correctly, no hurry, I'd sure be very happy.

Thanks again

D.
__________________

__________________
Don B. Cilly is offline   Reply With Quote
Old 30-12-2009, 16:51   #47
Senior Cruiser
 
sinbad7's Avatar

Cruisers Forum Supporter

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,717
Images: 57
Send a message via Skype™ to sinbad7
1. None of the .kap conversions show up in the preview window. Perhaps something missing in the conversion header?

2. Did the calibration rather quickly but the differences are minimal and certainly not 12 nm.

3. Can not follow your '39 parallel split' agument. All the tiling was done in sequence from top to bottom.

Suggest you study the thread concerning the .kap conversion procedure.
__________________

__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 31-12-2009, 04:31   #48
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by bdbcat View Post
I think these are very early (early 90s) Maptech raster charts. They are tiff files, I think, and the georef is contained in a header file of some sort.

Blast from the past.....

Should be possible, if laborious, to combine the tiffs into one big tiff, manually decode the header file, and proceed from there.....

Dave
I got inspired by this thread to dig into these files a bit. Digging a bit in my chart files revealed I actually had some old Imray-Iolaire files of the Caribbean in this format to play around with.
ImageMagic came to help once again. As with many things, once you see the "light" it is fairly easy to do.

Every chart has its own directory witch is structured in vertical columns. The name convention is that all files in the second column is named MI0A*.B* . First star for actual chart-number, second star for consecutive number starting at top. So you have a "coordinate system" starting with A from left to right, and numbers from top to bottom.

To stitch all the pictures together vertically, using once again the second column:
Code:
convert MI0A*.B* -append ptest2.pcx
The key is the "-append" witch stitches vertically.
To finish the job stich all the vertical panels together horizontally.
Code:
convert ptest*  +append new1.pcx
The "+append" stitches horizontally.


A quick and dirty script to produce a chart tif of Imray Chart A12
looks like this.
Code:
#!/bin/sh
convert MI0A*.A* -append ptest1.pcx
convert MI0A*.B* -append ptest2.pcx
convert MI0A*.C* -append ptest3.pcx
convert MI0A*.D* -append ptest4.pcx
convert MI0A*.E* -append ptest5.pcx
convert MI0A*.F* -append ptest6.pcx
convert MI0A*.G* -append ptest7.pcx
convert MI0A*.H* -append ptest8.pcx
convert MI0A*.I* -append ptest9.pcx
convert MI0A*.J* -append ptest10.pcx
convert ptest1.pcx ptest2.pcx ptest3.pcx ptest4.pcx ptest5.pcx ptest6.pcx ptest7.pcx ptest8.pcx ptest9.pcx ptest10.pcx  +append new1.pcx

convert new1.pcx -colors 127 new1.gif
convert new1.gif -colors 127 new1.tif
Notice that I convert pcx to tif at the end of the script.

This can of course easily be refined, developed and even to a degree automated. To make an OpenCPN chart, proceed according to the instructions in the Chart thread.

To summarize these old Maptech charts can with a bit of Image Magic be treated like any other tif chart file.

Happy New Year to all OpenCPN users!

Thomas
Attached Thumbnails
Click image for larger version

Name:	test11.png
Views:	318
Size:	340.1 KB
ID:	12276   Click image for larger version

Name:	test12.png
Views:	313
Size:	120.9 KB
ID:	12278  

__________________
cagney is offline   Reply With Quote
Old 31-12-2009, 04:48   #49
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
Hi, Sinbad,
(sorry, I really don't like the blue quoting, hope nobody minds.)

>None of the .kap conversions show up in the preview window
Some of them do, in my version at least... well, actually, of what you sent me, only the two little port plans do, and only the versions with soundings on them.
The chart of Mallorca, the Ibiza part-chart and the two, plans with no soundings do not.

>the differences are minimal and certainly not 12 nm.

Well, I don't know, it may be something with my version... if you put you cursor point exactly on the 3900'N, 0130'E crossline, just to the right and above the A of IBIZA, what does it read? Mine reads 039 11.076 N, 001 17.996 E, that's off by some 11 NM in lat and 12 in lon.

>Can not follow your '39 parallel split'

See this:


Follow the latitude scale on the west side. Can't you see a few odd things?

>Suggest you study the thread concerning the .kap conversion procedure

I plan to do just that, I really want to try and recalibrate the charts I have, some of them very nice and recent but sightly off... as I said, the only one I had of this area with perfect calibration was that one.

Thanks for all the help, and let's hope all this comes handy to the people here too in the end.

D.
__________________
Don B. Cilly is offline   Reply With Quote
Old 31-12-2009, 05:18   #50
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
Thanks Cagney, this forum is turning out to be a real gold mine.
I really hope this "can of course easily be refined, developed and even to a degree automated" as you say.
A nice cross-platform python script, heavy on string recognition, et voila, old charts recombining out of cyberspace like imagemagick. That would be nice (:
__________________
Don B. Cilly is offline   Reply With Quote
Old 31-12-2009, 05:39   #51
Senior Cruiser
 
sinbad7's Avatar

Cruisers Forum Supporter

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

How would you proceed with a tiling reference like this?
The numbers are running consecutively from 00000000.pcx top left to bottom and then the following columns until bottom right.
Attached Thumbnails
Click image for larger version

Name:	tile structure.jpg
Views:	252
Size:	32.2 KB
ID:	12281  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 31-12-2009, 05:47   #52
Senior Cruiser
 
sinbad7's Avatar

Cruisers Forum Supporter

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

I think we are not on the same page here. You are talking about the FIRST experimental chart conversion I sent you. The FINAL conversion with changed land colour I sent you later has correct info all around as far as I can see. As I mentioned to you,I only included the island of Ibiza and surrounding waters as we already have a good chart of Mallorca etc.

Download here:
Attached Thumbnails
Click image for larger version

Name:	Ibiza-latest.jpg
Views:	275
Size:	305.6 KB
ID:	12282  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 31-12-2009, 07:23   #53
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 sinbad7 View Post

I think we are not on the same page here. You are talking about the FIRST
Ah! I never got that one, somehow. My mistake. It looks just fine, calibration and everything.
It still shows up blank in the preview, which I guess gives us a nice little problem to solve, but otherwise, just great! Thanks.

D.
__________________
Don B. Cilly is offline   Reply With Quote
Old 31-12-2009, 08:36   #54
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by Don B. Cilly View Post
Thanks Cagney, this forum is turning out to be a real gold mine.
I really hope this "can of course easily be refined, developed and even to a degree automated" as you say.
A nice cross-platform python script, heavy on string recognition, et voila, old charts recombining out of cyberspace like imagemagick. That would be nice (:
As you read more on this forum you will find out that I'm into "nice cross-platform " Ruby scripts .... same difference as Python .

The Imray chart I was referring to came with a directory containing some sort of header files. Very short binary files with some text in, most likely not geo referencing files, more like a short version of a .bsb file. It is possible that the application running these files had built in geo referencing.

So it looks like we have to produce a bsb header file to use with tif2bsb, by hand , with MapCal or whatever.

For the kind of chart directories that comes with the Imray charts for the Caribbean I have developed the shell script a bit, so it will produce a tif file for each chart directory I'm applying it to.
For now I don't think it's worth doing more for a couple of reasons.
As Sindbad demonstrates, the naming structure varies.
I have yet to see any charts worthwhile putting any energy into.
Old GreenHand:s Caribbean charts are OK but there are many alternatives around.

Sindbad
You have to find the number of tiles in a column. Check the pictures until you see the lower edge of the chart.
Then you have to come up with some (re)naming based on this or apply some math to each tile.
For example if you have 8 tiles in each column (0 to 7) and 9 columns (0 to 8) altogether 72 tiles. Where does tile 0000028 belong? The integer part of 28/8 is 3 so you are in column 3(start counting at 0 so it is actually the 4:th column).
The rest when dividing 28 with 8 is 4(once again start counting at 0 so it is actually the 5:h element), so 28 is number 5 in the 4:th column.

Thomas
Attached Files
File Type: doc join-pcx.sh.doc (849 Bytes, 102 views)
__________________
cagney is offline   Reply With Quote
Old 31-12-2009, 08:57   #55
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
The chart format of these charts is HDR, which maptech used prior to introducing BSB charts.

Thomas
__________________
cagney is offline   Reply With Quote
Old 31-12-2009, 12:44   #56
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
Thomas,
that worked like magick!
I just had to search&replace MI* to M5* in the script (the files in my dir were M5*s) which obviously took a second or so, and bam!, I got a nice big tiff file called TIFS with my whole nice big chart, 1.2 megs, now I can really get into the calibration stuff (well, tomorrow or so (:

Thanks a lot.

D.
__________________
Don B. Cilly is offline   Reply With Quote
Old 01-01-2010, 12:18   #57
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
Well well well.
Taking advantage of World Hangover Day, when just about everyone is hungover except me, and distressed phone calls from daughters and ex-wives notwithstanding, I settled down to give the kap-making thing a good try.

I don't give up very easily, but I ran into a couple of problems I would appreciate some help with.

The first one is:
I converted a bunch of tiled images using Thomas's brilliant little script, and the shell's brilliant little up-arrow-repeat function.
I noticed some of them show up as a thumbnail in the file browser (Nautilus in this case) just fine, others just show an ugly black screen with TIFF in it.
They all open just fine in the image viewer, so I said, well, wtf.
I then proceeded to convert them to .bmp, as per instructions, even though I later learned that MapCal does opens tifs if you tell it to.

Strangely enough, even for this sort of thing, some of the "black" tiff files converted to "thumbnailable" bmps but a lot of them, including thumbnailables, turned int black bmps (which still open just fine in the image viewer).
Now, MapCal doesn't like the black ones any more than Nautilus does.

So OK I say, one thing at a time, I can always try converting the black stuff with the Gimp or something, let's try the calibration at last.
I get MapCal running with the Wine, runs fine, calibrates, purrs along, but runs me headlong into problem #2:

It's supposed to create a CHARTCAL.DIR somewhere, possibly in the same directory as the chart, right?
Well, as much as I updatedb and locate, there's no such dir on my disk.
And if I save, close MapCal and reload the map, it isn't calibrated no more.

If anyone has any idea what may be causing the Black Icons with the file conversion, and above all, where I'm going wrong with MapCal, please let me know.

D.

P.S. I thought it could be a permission thing, but I 777d the dir and everything in it, and no luck.
__________________
Don B. Cilly is offline   Reply With Quote
Old 02-01-2010, 03:15   #58
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Don B. Cilly

I had a bit of luck yesterday, some friends had some old CD:s in a dusty corner with useful HDR charts . As my box has a lack of memory, only 1 gig, I had to develop a batch script for conversion.
First I changed the previous script to accept a chart name for conversion on the command line. Then I wrote a short batch script, that has to be modified to contain the charts you want to convert.
To find the chart-numbers among the many thousands of tile-files I used
Code:
ls *A01|sort|uniq
The logic is that every chart has an .A01 tile-file. You have to strip everything but the chart-number from the output and put all these numbers on one line. Paste the result into the batch script.
More instructions in the attached file.

I don't use MapCal very much, only to convert WCI files actually.
I prefer to use tif2bsb directly together with geo-referencing in a header file, produced with some help from Gimp.

When I have converted WCI files a CHARTCAL.DIR has been created in the chart directory containing the WCI files. I think you should check Wines file system. I don't think you can take for granted that Wines default installation name the whole linux file structure in win terms. I think that in your case no CHARTCAL.DIR was created as win can't save in a directory that is nonexistent in its file structure.
It's worth checking................

I have also come across some "black" tifs, failed conversions I think. There are many things going on in my conversion script, many possible error sources. There is no guarantee that all chart pictures can be converted. To pinpoint the problem just run one part of the script at time, by commenting out everything else.
First join tiles vertically, then join the created files horizontally, then convert the produced big pcx file to gif and then finally to tif.

The reason I choose to produce tifs is that these fits straight into
the libbsb program tif2bsb.

Thomas
Attached Files
File Type: doc pcx2tif.tar.gz.doc (805 Bytes, 89 views)
__________________
cagney is offline   Reply With Quote
Old 02-01-2010, 11:06   #59
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
Thanks Thomas.
About MapCal and the Wine, you say,
> wine can't save in a directory that is nonexistent in its file structure
but hey, it's the same directory it loaded the chart from, and it's writable by everybody and their granny. So let's say it doesn't work with Wine, I'll investigate it I guess but for the moment...
I got my bucket close at hand, booted Windows, waded through the complaints, and discovered that (1) Mapcal works and it writes the chartcalc thing, and (2) that it loads the black icon files just fine.

About the black icons, I don't think it has to do with your script, I actually got more of them with direct converts to bmp than with the tiling.
Also they seem to apply only to thumbnailing, as I said they open fine in the image viewer, Gimp, etc (but not with Mapcal under Wine).
I even looked at the headers, they all look the same.
I'd like to see how libbsb deals with them. See my next post.
I'd say your tiling script is just fine, any glitches are with imagemagick.
__________________
Don B. Cilly is offline   Reply With Quote
Old 02-01-2010, 11:31   #60
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
Now, libbsb. That sounds nice.
It won't compile though :-/
Configure does not complain much, but make...
Does anyone have any binaries, deb packages, previous experience with make errors, something that will let me try libbsb on Karmic?

D.

P.S.
Make gets to
ppm2bsb.c:90: error: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result,
repeats it for lines 91 and 92, goes
make: *** [all-recursive] Error 1
and exits.
(line 90 says "fscanf(ppm, "P%d\n", &magic);"
the comment is /* Read ppm and and store width/height */ )
__________________

__________________
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 06:41.


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.