Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 24-11-2020, 13:14   #1
Registered User

Join Date: May 2014
Posts: 846
Images: 2
Questions about KAP files

I have a question regarding the header in KAP files.

I have two KAP files for the same chart, one works perfectly and the second produces a chart that is in the form of a parallelogram. I looked at the headers and in particular the REF/x.

The incorrect file:

REF/1,1991,687,13.9666666667,-61.0250000000
REF/2,189,688,13.9666666667,-61.0333333333
REF/3,2511,275,13.9686111111,-61.0225000000
REF/4,2556,1172,13.9644444444,-61.0225000000


This looks wrong I would expect 2 sets of N and 2 sets of W co-ord for the Ref starting at 1 bottom left clockwise to 4 bottom right. So thought I understood why this didn't work.


Checked the file that works and found 32 REF entries

REF/1,362,1595,13.9633333333,-61.0333333333
REF/2,724,1595,13.9633333333,-61.0316666667
REF/3,1086,1595,13.9633333333,-61.0300000000
REF/4,1448,1595,13.9633333333,-61.0283333333
REF/5,1810,1595,13.9633333333,-61.0266666667
REF/6,2172,1595,13.9633333333,-61.0250000000
REF/7,2534,1595,13.9633333333,-61.0233333333
REF/8,2896,1595,13.9633333333,-61.0216666667
REF/9,362,1240,13.9650000000,-61.0333333333
REF/10,724,1240,13.9650000000,-61.0316666667
REF/11,1086,1240,13.9650000000,-61.0300000000
REF/12,1448,1240,13.9650000000,-61.0283333333
REF/13,1810,1240,13.9650000000,-61.0266666667
REF/14,2172,1240,13.9650000000,-61.0250000000
REF/15,2534,1240,13.9650000000,-61.0233333333
REF/16,2896,1240,13.9650000000,-61.0216666667
REF/17,362,884,13.9666666667,-61.0333333333
REF/18,724,884,13.9666666667,-61.0316666667
REF/19,1086,884,13.9666666667,-61.0300000000
REF/20,1448,884,13.9666666667,-61.0283333333
REF/21,1810,884,13.9666666667,-61.0266666667
REF/22,2172,884,13.9666666667,-61.0250000000
REF/23,2534,884,13.9666666667,-61.0233333333
REF/24,2896,884,13.9666666667,-61.0216666667
REF/25,362,529,13.9683333333,-61.0333333333
REF/26,724,529,13.9683333333,-61.0316666667
REF/27,1086,529,13.9683333333,-61.0300000000
REF/28,1448,529,13.9683333333,-61.0283333333
REF/29,1810,529,13.9683333333,-61.0266666667
REF/30,2172,529,13.9683333333,-61.0250000000
REF/31,2534,529,13.9683333333,-61.0233333333
REF/32,2896,529,13.9683333333,-61.0216666667

Any explanation as to why there are 32 ref points? and that they don't seem to be grouped in pairs. Just trying to understand.
Tupaia is online now   Reply With Quote
Old 25-11-2020, 11:43   #2
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,422
Re: Questions about KAP files

Perhaps it's the software (or the operator of the software) that made it.They appear to be "generated" automatically. The full header might reveal the software, but...without seeing the image I can't guess for sure but t'were it me, I'd strip the image out as a "png" and redo it.


Typically, a simple mercator chart is a rectangle and indeed, the four corners are best/simpler if they "match" to make right angles.
Typically, only 4 REF points are required in a simple rectangle AND 4 PLY points to delineate the displayed portion (ie: so you don't see borders.)
However

SOME old paper charts got re-imagined as kaps have several smaller harbour plans. In this case, it will rely on several versions of kap , using different REFs and PLYs to see each plan as an individual chart...or as an alternate, cropping the images and calibrating them individually.
HappySeagull is offline   Reply With Quote
Old 25-11-2020, 12:09   #3
Registered User

Join Date: Feb 2011
Posts: 804
Re: Questions about KAP files

This seems to be Marigot Harbour, in St Lucia. Is it the case?
P_Dub is offline   Reply With Quote
Old 26-11-2020, 02:25   #4
Registered User

Join Date: May 2014
Posts: 846
Images: 2
Re: Questions about KAP files

Quote:
Originally Posted by P_Dub View Post
This seems to be Marigot Harbour, in St Lucia. Is it the case?
Yes, some friends were following the ARC and were berating O for the failure to display this chart properly. I found the second good chart on the web and was interested to know why and how they were different.

Interestingly the colors RGB codes are also different so must have been created by different persons maybe from the same printed source using a different scanner.
Tupaia is online now   Reply With Quote
Old 26-11-2020, 04:19   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,845
Re: Questions about KAP files

Quote:
Originally Posted by Tupaia View Post
I have a question regarding the header in KAP files.

........
.......

Any explanation as to why there are 32 ref points? and that they don't seem to be grouped in pairs. Just trying to understand.
Since many years OpenCPN is very good at reading and rendering kap charts , aka BSB 3 charts.
For a correct Mercator chart picture,a REF in each corner, is more than enough and produces a good chart.
If the picture is dodgy, not quite Mercator...., one remedy is to throw in quite a few REF point, which forces OpenCPN to use polynomial interpolation and may lead to an acceptable chart.

We still don't know anything about the pictures used in your example.

The 32 REF point seems to be laid out very logically. The author uses 4 latitudes and goes through 8 latitudes for each. These lat&longs are probably printed on the chart picture, so the x/y pixels are easy to get for each intersection. Why there are 32 REFs we don't know. Years ago it was a common practice to use more REFs than is needed now.

Be aware that there are plenty with crap charts/pictures out there, in odd cases, even from reputable sources.

Thomas
cagney is offline   Reply With Quote
Old 26-11-2020, 04:30   #6
Registered User

Join Date: May 2014
Posts: 846
Images: 2
Re: Questions about KAP files

Here are the two examples. My questions were more for my interest than to solve any problems.
Attached Thumbnails
Click image for larger version

Name:	KAP1.jpg
Views:	27
Size:	107.2 KB
ID:	227633   Click image for larger version

Name:	KAP2.jpg
Views:	23
Size:	94.3 KB
ID:	227634  

Tupaia is online now   Reply With Quote
Old 26-11-2020, 09:28   #7
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,845
Re: Questions about KAP files

Quote:
Originally Posted by Tupaia View Post
Here are the two examples. My questions were more for my interest than to solve any problems.
Just to be clear... the picture we're talking about is the picture that is used to render the chart. If you have "imgkap" installed you can extract it from the .kap file like this
Code:
imgkap mykap.kap myimg.png
Thomas
cagney is offline   Reply With Quote
Old 26-11-2020, 12:03   #8
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 3,983
Re: Questions about KAP files

The Imray oeRNCs show this - workflow uses imgkap:
Attached Thumbnails
Click image for larger version

Name:	Captura de pantalla 2020-11-26 a las 19.59.26.jpg
Views:	19
Size:	308.0 KB
ID:	227664   Click image for larger version

Name:	Captura de pantalla 2020-11-26 a las 19.59.52.jpg
Views:	15
Size:	423.9 KB
ID:	227665  

bcn is offline   Reply With Quote
Old 27-11-2020, 12:08   #9
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,422
Re: Questions about KAP files

well then, it looks like software generated all the refs because the image was skewed. Or perhaps some human offered the bad refs for the four cornersof a decent image and the software did the rest... Or a combination of the two.
HappySeagull is offline   Reply With Quote
Reply

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
Converting PNG files to KAP files for usage in OpenCPN 58gschol OpenCPN 3 07-09-2019 06:46
KAP chart files for Greece - Help! Camp Director G OpenCPN 2 26-10-2012 16:19
Sharing kap Files made from GE into OpenCpn lucseawalker OpenCPN 49 01-07-2012 00:08
.kap files header r2b2s OpenCPN 5 14-05-2012 09:13

Advertise Here


All times are GMT -7. The time now is 01:18.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.