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 22-03-2017, 02:14   #1
Registered User

Join Date: Aug 2009
Location: Lake Macquarie NSW
Boat: Chamberlin 11.6 catamaran
Posts: 886
re calibrating raster charts

This is almost not an OpenCPN question but I will ask it here.

I have some raster charts that say "Chart Georef accuracy is poor". It certainly is. Although the raster charts are well scanned they have my course going over land in some parts, unlike the ENC charts and other raster ones.

I tried going into Notepad and changing the Refs to be the same as the Lat-Long in the corners. That would have been fine with 4 refs but I have multiple - about 24 in some charts. There are 4 plys. When I got rid of more than the first four refs and fixed those four to be the 4 corners of the chart the chart would not load.

I would like to be able to get the charts to be accurate. I have tried finding some sort of info on Kap charts but am spending lots of time getting nowhere.

Can anyone send me in the right direction?

cheers

Phil
catsketcher is offline   Reply With Quote
Old 22-03-2017, 03:01   #2
Registered User

Join Date: Jan 2016
Posts: 26
Re: re calibrating raster charts

Phil,

you can try the small command line tool imgkap to store the included image in a file and convert it to KAP with new references using the plugin weather fax.

Martin
BlueShip is offline   Reply With Quote
Old 22-03-2017, 03:34   #3
Registered User

Join Date: Aug 2009
Location: Lake Macquarie NSW
Boat: Chamberlin 11.6 catamaran
Posts: 886
Re: re calibrating raster charts

No - it wouldn't load the KAP files.

This OpenCPN is pretty hard work getting files for Australia. I would be very happy to pay. I am using a fair bit of time butting my head against a wall. I am much better with epoxy and sandpaper than with command prompts.

Thanks anyway

Phil
catsketcher is offline   Reply With Quote
Old 22-03-2017, 04:35   #4
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,734
Re: re calibrating raster charts

Phil,

for Australia there are the Vector File sets from AHS for non-commercial vessel.
You need the S-63 plug-in plus a S-63 UserPermit (available for OCPN at o-charts) to license the charts.

Hubert
bcn is offline   Reply With Quote
Old 22-03-2017, 06:09   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: re calibrating raster charts

Quote:
Originally Posted by catsketcher View Post
This is almost not an OpenCPN question but I will ask it here.

I have some raster charts that say "Chart Georef accuracy is poor". It certainly is. Although the raster charts are well scanned they have my course going over land in some parts, unlike the ENC charts and other raster ones.

I tried going into Notepad and changing the Refs to be the same as the Lat-Long in the corners. That would have been fine with 4 refs but I have multiple - about 24 in some charts. There are 4 plys. When I got rid of more than the first four refs and fixed those four to be the 4 corners of the chart the chart would not load.

I would like to be able to get the charts to be accurate. I have tried finding some sort of info on Kap charts but am spending lots of time getting nowhere.

Can anyone send me in the right direction?

cheers

Phil

Have a look at https://www.opencpn.org/wiki/dokuwik...version_manual. You can find some help there.

*Don't use Notepad to edit a kap file. Notepad adds windows line endings behind your back and destroys the file. A pure text editor or a binary editor is what you need. Notepad+ is reported to work.

*After you have changed a kap file you must run the little program "bsbfix" from libbsb (fix the index table).

*4 REFs should be enough if the picture is undistorted.

*Even this does not guarantee that the chart will be correct, as even some up to date modern charts are simply not charted correctly. You then have to move the whole picture in relation to it's lat/long reference with the DTM parameters in the kap file. This of course assumes that the error is uniform for the whole chart, which may not be the case.......

Good Luck!

Thomas
cagney is offline   Reply With Quote
Old 22-03-2017, 09:55   #6
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: re calibrating raster charts

Quote:
Originally Posted by cagney View Post
Have a look at https://www.opencpn.org/wiki/dokuwik...version_manual. You can find some help there.

*Don't use Notepad to edit a kap file. Notepad adds windows line endings behind your back and destroys the file. A pure text editor or a binary editor is what you need. Notepad+ is reported to work.


*After you have changed a kap file you must run the little program "bsbfix" from libbsb (fix the index table).

*4 REFs should be enough if the picture is undistorted.
What if the picture _is_ distorted?

4 refs is also not enough for certain projections

Also, if the paper is not flat when scanned etc... Opencpn can compute the 3rd order coefficients using many ref points, and (in opengl) mode, the image will be correctly rendered in whatever projection unwarping it.


Basically you just need to know the lat/lon and pixel coordinates for many positions on the chart. The weatherfax plugin only works for undistorted images since it only uses 2 reference points.

It would be possible to develop a plugin to edit charts by adding reference points, and by using partial transparency with google imagery virtually any chart could be corrected.


Another option would be to split the distorted chart images into multiple smaller images, then you can just use a few reference points or the weatherfax plugin to create the kap.
seandepagnier is offline   Reply With Quote
Old 22-03-2017, 10:15   #7
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: re calibrating raster charts

as mentioned above, Here's a link to Weatherfax plugin for open cpn ....export the kap made and check to make sure it does exist on your hdd .
https://opencpn.org/OpenCPN/plugins/weatherfax.html

not sure how big an image it'll take but your original image should be not much bigger than 4500 pixels across the top 3800 is better yet.
pngs are the best format, jpgs are lossy so work with pngs(256 colours) and convert to jpgs at the very last if you must use them.

Quote:
Although the raster charts are well scanned
That is really difficult to do! without a huge scanner. Just commenting because any distortion as to "stitching" is a pain.

Including Borders can be difficult for beginners so maybe crop them off for now...

Also every image intended for a mercator chart must be sized to agree with your images central LATITUDE. That is, a degree of longitude across the top is proportionate to the cosin of latitude. The chart should agree on all four corners. ie it's a perfectly vertical/horizontal rectangle, and it's latitudes and longitudes "agree" at the corners. as in, the two top corners have the same latitude. the right side is on the same longitude etc.

This is a good test of your "scan" and might go some way to explain your problems..


imgkap is a good tool and worth getting into. It will even spit out an error telling you how to resize your image to suit the lat/long proportions given it is a rectangle.
simply it's just a matter of upper left corner and lower right corner...


all one line
imgkap[space]-s[space]LNT[space]"yourchartimage.png"[space] youruppercornerlat[space]uppercornerlong[space] lowercornerlat[space]lowercornerlong
then enter/return on the keyboard.
LNT is LowestNormal Tide. but you can do without or substitute the datum found on your chart. s is for superstition don't ask

add well i see boat_alexandra and I are drinking the same kind of coffee! crossposting haha you win!
HappySeagull is offline   Reply With Quote
Old 22-03-2017, 10:25   #8
Registered User

Join Date: Apr 2011
Location: Cambridge MD
Boat: Carter offshore 35
Posts: 393
Re: re calibrating raster charts

Go to Sea Clear. There is a Map Cal program that might be able to do it. I've copied charts and calibrated them with it and they worked good.
DeborahLee is offline   Reply With Quote
Old 22-03-2017, 14:09   #9
Registered User

Join Date: May 2014
Boat: Shuttleworth Advantage
Posts: 2,261
Images: 2
Re: re calibrating raster charts

Quote:
Originally Posted by DeborahLee View Post
Go to Sea Clear. There is a Map Cal program that might be able to do it. I've copied charts and calibrated them with it and they worked good.
I could do with some help with this as well. Many of the chart conversion threads are out of date and software updated or superseded and links go to the old OCPN website.

I have several scanned charts .TIFFs and .JPGs that I would like to convert to .KAPs. I can get various bits of the procedure to work but am not able to tie it all together.

1. Compress the jpg using JPEGOPT.EXE
Result original TestChart.jpeg and compressed TestChartCmp.jpeg

2. Convert the compressed jpeg to palette style (16, 32, 64 colors) using GIMP2.EXE
Result TestChart.png and TestChart.tif

3. Add Scale, Projection, Datum, Description and Calibrate the chart using MAPCAL II
Result CHARTDIR.DIR

Can someone explain how I get from here to .KAP?
Do I need to create a .HDR?

Much appreciated.
Tupaia is offline   Reply With Quote
Old 22-03-2017, 18:21   #10
Registered User

Join Date: Oct 2014
Posts: 274
Re: re calibrating raster charts

Quote:
Originally Posted by Tupaia View Post
I could do with some help with this as well. Many of the chart conversion threads are out of date and software updated or superseded and links go to the old OCPN website.

I have several scanned charts .TIFFs and .JPGs that I would like to convert to .KAPs. I can get various bits of the procedure to work but am not able to tie it all together.

1. Compress the jpg using JPEGOPT.EXE
Result original TestChart.jpeg and compressed TestChartCmp.jpeg

2. Convert the compressed jpeg to palette style (16, 32, 64 colors) using GIMP2.EXE
Result TestChart.png and TestChart.tif

3. Add Scale, Projection, Datum, Description and Calibrate the chart using MAPCAL II
Result CHARTDIR.DIR

Can someone explain how I get from here to .KAP?
Do I need to create a .HDR?

Much appreciated.
I usually use a Windows batch file called KapGen by Marco Certelli. KapGen automates the steps you outlined, above. Marco developed it for calibrating TIF images of New Zealand charts before NZMariner BSB/KAP charts were free.

A link to Marco's KapGen can be found about half way down this page:

MCE66 - Software

There is no need to calibrate all of the NZ TIF images into KAP charts, but the KapGen tool makes use of MapCal_2 as a GUI for GeoReferencing chart images. MapCal_2 saves the GeoRef information in a file named CHARTCAL.DIR. KapGen uses mc2bsbh.exe to convert the CHARTCAL.DIR GeoRef data into the header of a KAP file. KapGen generates complete KAP chart files.

MapCal2 is part of the SeaClear II package. The MCE66 - Software link, above, has a link to SeaClear.

More information on mc2bsbh/exe may be found here:

MapCal Utilities


Paul
.Paul. is offline   Reply With Quote
Old 23-03-2017, 10:34   #11
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: re calibrating raster charts

Quote:
Originally Posted by DeborahLee View Post
Go to Sea Clear. There is a Map Cal program that might be able to do it. I've copied charts and calibrated them with it and they worked good.
Everyone has their favourite methods. There are few all-in-one-apps with a simple Graphic interface. so I have a kits I use. A bit like a splicing kit..all kinds of stuff tends to be needed: twine, fids, knives,...

MapCal_2 is an excellent program if you can get past it's oddities (""some changes MAY not have been saved.Close anyways?") which means you have saved it!

It only does pngs and bmps. It won't save calibrations to chartcal.dir from any other format.

MY Best simple use: calibrate your pictures and check the calibrated image with the grid function for straightness then note the corner-positions it displays! they are there if you look for them.
then input theseto imgkap or weatherfax plugin.
As mentioned above, imgkap will give a useful message if your picture proportions are wrong. MapCal_2, on the other hand will calibrate just about anything "wrongly" if you want it that way. This might work for SeaClear's WCI files but that's another subject.

MapCal also does borders easily which is useful when you have the kapmaker that can use them.


I also like "Helpcal" (search here for it) which is an automatic GUI using the chartcal.dir issued by MapCal_2 with the command utilities mc2bsbh,tif2bsb,and nconvert.
HappySeagull is offline   Reply With Quote
Old 23-03-2017, 11:38   #12
Registered User

Join Date: May 2014
Boat: Shuttleworth Advantage
Posts: 2,261
Images: 2
Re: re calibrating raster charts

Quote:
Originally Posted by HappySeagull View Post
I also like "Helpcal" (search here for it) which is an automatic GUI using the chartcal.dir issued by MapCal_2 with the command utilities mc2bsbh,tif2bsb,and nconvert.
Thanks it is becoming obvious that there are multiple methods to achieve this which is a little confusing for first timers.

Can anyone tell me where I can download; Kap File Utility.exe

The only link I have:

http://opencpn.de/sites/default/file...le_Utility.exe

Is no longer valid.

Cheers
Tupaia is offline   Reply With Quote
Old 24-03-2017, 06:02   #13
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: re calibrating raster charts

I wrote a graphical tool for this, it's here:

https://github.com/dgiardini/imgcalkap/releases

You can open almost any image format and save it as kap. You can also edit the kap files.

It has some bugs, and I made it for my own use, but maybe can help someone else.
piluso is offline   Reply With Quote
Old 24-03-2017, 08:03   #14
Registered User

Join Date: May 2014
Boat: Shuttleworth Advantage
Posts: 2,261
Images: 2
Re: re calibrating raster charts

Quote:
Originally Posted by piluso View Post
I wrote a graphical tool for this, it's here:

https://github.com/dgiardini/imgcalkap/releases

You can open almost any image format and save it as kap. You can also edit the kap files.

It has some bugs, and I made it for my own use, but maybe can help someone else.
Thanks.... this makes things quick and painless. Will check the results carefully and report back with any feed back.

Although not strictly a plug-in. Could this be included in downloads as supplementary software under "Chart Support" ? I am sure others would find it useful.

Cheers
Tupaia is offline   Reply With Quote
Reply

Tags
cal, charts


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
Raster Charts or Vector Charts - Which is Best for Electronic Navigation ? Alecadi Navigation 19 28-03-2012 19:56
Calibrating Simrad Wheelpilot 32 ianjory Construction, Maintenance & Refit 0 03-01-2010 15:16
Calibrating a Barometer ? bmiller General Sailing Forum 6 11-09-2009 21:30
Re-calibrating Xantrex Link 1000 JDM2007 Electrical: Batteries, Generators & Solar 14 06-11-2007 21:42

Advertise Here


All times are GMT -7. The time now is 20: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.