Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 2.00 average. Display Modes
Old 05-10-2009, 14:46   #76
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Dave is doing a great job with OpenCPN and I don't think shouting is warranted.
I also think that the work needed to write a calibration program is underestimated by some, especially considering that tif2bsb really works quite shaky.

/J
__________________

__________________
jonasaberg is offline   Reply With Quote
Old 05-10-2009, 15:50   #77
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Jonas

Great that you are up and running. At least we now know that it's possible even with windows(xp).

The amount of info and tags vary a lot between different .kap files.
Both SeaClear and OpenCPN support these files based on reverse engineering, and all tags may not be used.
Maybe Dave will chip in here and tell us exactly which tags means anything to opencpn. It would also be interesting to know the "needs" of SeaClear.
Quote:
SD=MEAN LOW WATER in my other files
SD simply must be set to the correct datum used for soundings on the original chart. For most NZ charts this is Lowest Astronomical Tide.

Dan
I have run head into this problem a couple of times, but still have some hope that maybe this can be rectified with "convert" from the Image Magic package. My knowledge in this area is very limited though.........

Lets all have a perspective on what we are actually doing in this thread......it is not the "final" solution, but may work in some circumstances.
In the end we need a "free" chart format, not encumbered by a heritage of legal and commercial luggage. It would be a dead end to spend a lot of time to perfect the conversion to the bsb3 format. Maybe kml is one way, as has been discussed before.

For now I'm enjoying the excellent kiwi charts.

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 05-10-2009, 15:56   #78
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
Jonas..

Come on!! where's your sense of humor?
It was not meant as a shout rather than a sigh after all the difficulties trying to cope with the .kap translations.

I am the first to admit Dave must have bust his gut in long hours searching for devious programing errors to satisfy our ever increasing demands.

For me there is no hurry,I have literally hundreds of calibrated charts in both Fugawi,OziExplorer and SeaClear amongst others.

Thanks also for YOUR help trying to solve the .kap conversion problem.
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 05-10-2009, 16:08   #79
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 jonasaberg View Post
Something to try:
When you use MapCal you can save the calibration as a chartcal.dir file. This file contains a lot of the info needed. maybe it is possible to use mapcal and write a script that creates the template file for use with tif2bsb from the chartcal.dir file. It is a bit of a workaround but might be faster than writing a whole new app and faster than finding the calibration points manually. MapCal is, i think...., reported to work well in Wine for you Linux guys and gals.

...

A lot is obvious comparing with the nz53.txt.

/J
Very nice. Good work! Maybe be MapCal can be kludged in.

-dan
dacust is offline   Reply With Quote
Old 05-10-2009, 16:14   #80
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
Whilst we are talking about header files,look at this jumbo file from one of our Brazilian .kap files.
In addition there are also .bsb files to match.

DSK/10,220,210,150
DSK/11,200,185,145
DSK/12,255,40,0
DSK/13,150,150,150
DSK/14,150,150,150
NGT/1,254,254,254
NGT/2,0,0,0
NGT/3,200,15,200
NGT/4,210,140,220
NGT/5,0,35,185
NGT/6,80,70,215
NGT/7,50,140,70
NGT/8,70,170,70
NGT/9,210,210,0
NGT/10,200,190,130
NGT/11,185,170,125
NGT/12,195,30,0
NGT/13,0,0,0
NGT/14,0,0,0
REF/1,0,9580,-38.000000000037,-59.000000000000
REF/2,726,9580,-38.000000000037,-55.222078224093
REF/3,1451,9580,-38.000000000037,-51.444156448187
REF/4,2177,9580,-38.000000000037,-47.666234672280
REF/5,2903,9580,-38.000000000037,-43.888312896373
REF/6,3628,9580,-38.000000000037,-40.110391120467
REF/7,4354,9580,-38.000000000037,-36.332469344560
REF/8,5080,9580,-38.000000000037,-32.554547568653
REF/9,5805,9580,-38.000000000037,-28.776625792747
REF/10,6531,9580,-38.000000000037,-24.998704016840
REF/11,0,8516,-33.484136958406,-59.000000000000
REF/12,726,8516,-33.484136958406,-55.222078224093
REF/13,1451,8516,-33.484136958406,-51.444156448187
REF/14,2177,8516,-33.484136958406,-47.666234672280
REF/15,2903,8516,-33.484136958406,-43.888312896373
REF/16,3628,8516,-33.484136958406,-40.110391120467
REF/17,4354,8516,-33.484136958406,-36.332469344560
REF/18,5080,8516,-33.484136958406,-32.554547568653
REF/19,5805,8516,-33.484136958406,-28.776625792747
REF/20,6531,8516,-33.484136958406,-24.998704016840
REF/21,0,7451,-28.717591678712,-59.000000000000
REF/22,726,7451,-28.717591678712,-55.222078224093
REF/23,1451,7451,-28.717591678712,-51.444156448187
REF/24,2177,7451,-28.717591678712,-47.666234672280
REF/25,2903,7451,-28.717591678712,-43.888312896373
REF/26,3628,7451,-28.717591678712,-40.110391120467
REF/27,4354,7451,-28.717591678712,-36.332469344560
REF/28,5080,7451,-28.717591678712,-32.554547568653
REF/29,5805,7451,-28.717591678712,-28.776625792747
REF/30,6531,7451,-28.717591678712,-24.998704016840
REF/31,0,6387,-23.721111372549,-59.000000000000
REF/32,726,6387,-23.721111372549,-55.222078224093
REF/33,1451,6387,-23.721111372549,-51.444156448187
REF/34,2177,6387,-23.721111372549,-47.666234672280
REF/35,2903,6387,-23.721111372549,-43.888312896373
REF/36,3628,6387,-23.721111372549,-40.110391120467
REF/37,4354,6387,-23.721111372549,-36.332469344560
REF/38,5080,6387,-23.721111372549,-32.554547568653
REF/39,5805,6387,-23.721111372549,-28.776625792747
REF/40,6531,6387,-23.721111372549,-24.998704016840
REF/41,0,5322,-18.523368119885,-59.000000000000
REF/42,726,5322,-18.523368119885,-55.222078224093
REF/43,1451,5322,-18.523368119885,-51.444156448187
REF/44,2177,5322,-18.523368119885,-47.666234672280
REF/45,2903,5322,-18.523368119885,-43.888312896373
REF/46,3628,5322,-18.523368119885,-40.110391120467
REF/47,4354,5322,-18.523368119885,-36.332469344560
REF/48,5080,5322,-18.523368119885,-32.554547568653
REF/49,5805,5322,-18.523368119885,-28.776625792747
REF/50,6531,5322,-18.523368119885,-24.998704016840
REF/51,0,4258,-13.160795456491,-59.000000000000
REF/52,726,4258,-13.160795456491,-55.222078224093
REF/53,1451,4258,-13.160795456491,-51.444156448187
REF/54,2177,4258,-13.160795456491,-47.666234672280
REF/55,2903,4258,-13.160795456491,-43.888312896373
REF/56,3628,4258,-13.160795456491,-40.110391120467
REF/57,4354,4258,-13.160795456491,-36.332469344560
REF/58,5080,4258,-13.160795456491,-32.554547568653
REF/59,5805,4258,-13.160795456491,-28.776625792747
REF/60,6531,4258,-13.160795456491,-24.998704016840
REF/61,0,3193,-7.676782627613,-59.000000000000
REF/62,726,3193,-7.676782627613,-55.222078224093
REF/63,1451,3193,-7.676782627613,-51.444156448187
REF/64,2177,3193,-7.676782627613,-47.666234672280
REF/65,2903,3193,-7.676782627613,-43.888312896373
REF/66,3628,3193,-7.676782627613,-40.110391120467
REF/67,4354,3193,-7.676782627613,-36.332469344560
REF/68,5080,3193,-7.676782627613,-32.554547568653
REF/69,5805,3193,-7.676782627613,-28.776625792747
REF/70,6531,3193,-7.676782627613,-24.998704016840
REF/71,0,2129,-2.120201096641,-59.000000000000
REF/72,726,2129,-2.120201096641,-55.222078224093
REF/73,1451,2129,-2.120201096641,-51.444156448187
REF/74,2177,2129,-2.120201096641,-47.666234672280
REF/75,2903,2129,-2.120201096641,-43.888312896373
REF/76,3628,2129,-2.120201096641,-40.110391120467
REF/77,4354,2129,-2.120201096641,-36.332469344560
REF/78,5080,2129,-2.120201096641,-32.554547568653
REF/79,5805,2129,-2.120201096641,-28.776625792747
REF/80,6531,2129,-2.120201096641,-24.998704016840
REF/81,0,1064,3.456653211410,-59.000000000000
REF/82,726,1064,3.456653211410,-55.222078224093
REF/83,1451,1064,3.456653211410,-51.444156448187
REF/84,2177,1064,3.456653211410,-47.666234672280
REF/85,2903,1064,3.456653211410,-43.888312896373
REF/86,3628,1064,3.456653211410,-40.110391120467
REF/87,4354,1064,3.456653211410,-36.332469344560
REF/88,5080,1064,3.456653211410,-32.554547568653
REF/89,5805,1064,3.456653211410,-28.776625792747
REF/90,6531,1064,3.456653211410,-24.998704016840
REF/91,0,0,9.000507571604,-59.000000000000
REF/92,726,0,9.000507571604,-55.222078224093
REF/93,1451,0,9.000507571604,-51.444156448187
REF/94,2177,0,9.000507571604,-47.666234672280
REF/95,2903,0,9.000507571604,-43.888312896373
REF/96,3628,0,9.000507571604,-40.110391120467
REF/97,4354,0,9.000507571604,-36.332469344560
REF/98,5080,0,9.000507571604,-32.554547568653
REF/99,5805,0,9.000507571604,-28.776625792747
REF/100,6531,0,9.000507571604,-24.998704016840
PLY/1,-38.000000000037,-59.000000000000
PLY/2,-38.000000000037,-24.998704016840
PLY/3,9.000507571604,-24.998704016840
PLY/4,9.000507571604,-59.000000000000
CPH/0.000000000000
WPX/3,11331.2276436952,191.967842193344,1.230540303244 19e-009
-0.00272343873768745,5.70715332281067e-011,4.85187668000661e-012
-2.16149267445587e-005,6.24933994084993e-013,1.21394689550968e-013
-1.39282872655015e-014
WPY/3,1726.60212688351,-8.64517911341108e-009,-190.64101784325
-2.12015481709017e-010,2.13494063354466e-012,-0.0465887398483065
-1.66777593984234e-012,1.53397137939873e-014,2.47370618340671e-014
-0.0122777434358298
PWX/3,-59.0004365183709,0.00520661136943545,-5.52744694524311e-016
-1.55425228645534e-010,-6.8787959621775e-020,1.80076301193939e-019
1.5865383420184e-014,-3.7271299091841e-024,9.83349486294423e-024
-1.40864579221579e-023
PWY/3,9.00967753917689,3.66423454611376e-016,-0.00520950693155378
-3.69088988647324e-020,-2.05415807899597e-019,-2.33677756768479e-008
1.02126924233322e-023,-1.4986705638315e-023,2.92679053952445e-023
5.74760348510528e-012
ERR/1,-0.08,2.61,-0.0113867424781,0.000436518372055
ERR/2,0.30,2.61,-0.0113867424788,-0.00156571002658
ERR/3,-0.34,2.61,-0.0113867424793,0.00176573782164
ERR/4,0.00,2.61,-0.0113867424797,-1.81852743779e-005
ERR/5,0.34,2.61,-0.01138674248,-0.00174749443184
ERR/6,-0.34,2.61,-0.0113867424801,0.00174749443242
ERR/7,-0.00,2.61,-0.0113867424802,1.81852749748e-005
ERR/8,0.34,2.61,-0.0113867424803,-0.00176573782101
ERR/9,-0.30,2.61,-0.0113867424803,0.00156571002723
ERR/10,0.08,2.61,-0.0113867424803,-0.000436518371348
ERR/11,-0.08,-2.75,0.0153131182417,0.000436518371252
ERR/12,0.30,-2.75,0.0153131182412,-0.0015657100273
ERR/13,-0.34,-2.75,0.0153131182409,0.001765737821
ERR/14,0.00,-2.75,0.0153131182407,-1.81852749463e-005
ERR/15,0.34,-2.75,0.0153131182406,-0.00174749443234
ERR/16,-0.34,-2.75,0.0153131182407,0.00174749443198
ERR/17,-0.00,-2.75,0.0153131182407,1.81852746053e-005
ERR/18,0.34,-2.75,0.0153131182408,-0.00176573782133
ERR/19,-0.30,-2.75,0.0153131182409,0.00156571002696
ERR/20,0.08,-2.75,0.015313118241,-0.000436518371561
ERR/21,-0.08,-2.71,0.00853055417676,0.000436518370854
ERR/22,0.30,-2.71,0.00853055417651,-0.00156571002763
ERR/23,-0.34,-2.71,0.00853055417638,0.00176573782073
ERR/24,0.00,-2.71,0.00853055417636,-1.81852751595e-005
ERR/25,0.34,-2.71,0.00853055417643,-0.0017474944325
ERR/26,-0.34,-2.71,0.00853055417656,0.00174749443187
ERR/27,-0.00,-2.71,0.00853055417673,1.81852745342e-005
ERR/28,0.34,-2.71,0.00853055417692,-0.00176573782136
ERR/29,-0.30,-2.71,0.0085305541771,0.00156571002698
ERR/30,0.08,-2.71,0.00853055417724,-0.000436518371519
ERR/31,-0.08,0.52,-0.00194545037082,0.000436518370762
ERR/32,0.30,0.52,-0.00194545037093,-0.00156571002768
ERR/33,-0.34,0.52,-0.00194545037093,0.00176573782073
ERR/34,0.00,0.52,-0.00194545037083,-1.81852751169e-005
ERR/35,0.34,0.52,-0.00194545037067,-0.00174749443242
ERR/36,-0.34,0.52,-0.00194545037046,0.00174749443198
ERR/37,-0.00,0.52,-0.00194545037023,1.81852746763e-005
ERR/38,0.34,0.52,-0.00194545036999,-0.00176573782119
ERR/39,-0.30,0.52,-0.00194545036978,0.00156571002717
ERR/40,0.08,0.52,-0.00194545036963,-0.000436518371313
ERR/41,-0.08,2.04,-0.0125742437936,0.000436518370869
ERR/42,0.30,2.04,-0.0125742437937,-0.00156571002753
ERR/43,-0.34,2.04,-0.0125742437936,0.0017657378209
ERR/44,0.00,2.04,-0.0125742437934,-1.81852749179e-005
ERR/45,0.34,2.04,-0.0125742437932,-0.00174749443219
ERR/46,-0.34,2.04,-0.012574243793,0.00174749443222
ERR/47,-0.00,2.04,-0.0125742437927,1.81852749321e-005
ERR/48,0.34,2.04,-0.0125742437925,-0.00176573782093
ERR/49,-0.30,2.04,-0.0125742437923,0.00156571002743
ERR/50,0.08,2.04,-0.0125742437922,-0.00043651837105
ERR/51,-0.08,2.49,-0.0084361815496,0.000436518371082
ERR/52,0.30,2.49,-0.00843618154957,-0.00156571002731
ERR/53,-0.34,2.49,-0.00843618154945,0.00176573782115
ERR/54,0.00,2.49,-0.00843618154928,-1.81852746692e-005
ERR/55,0.34,2.49,-0.00843618154906,-0.00174749443194
ERR/56,-0.34,2.49,-0.00843618154884,0.00174749443248
ERR/57,-0.00,2.49,-0.00843618154863,1.81852751879e-005
ERR/58,0.34,2.49,-0.00843618154845,-0.00176573782068
ERR/59,-0.30,2.49,-0.00843618154834,0.00156571002766
ERR/60,0.08,2.49,-0.0084361815483,-0.000436518370829
ERR/61,-0.08,0.08,-0.0013684507849,0.000436518371295
ERR/62,0.30,0.08,-0.00136845078487,-0.00156571002709
ERR/63,-0.34,0.08,-0.00136845078477,0.00176573782135
ERR/64,0.00,0.08,-0.00136845078463,-1.81852744632e-005
ERR/65,0.34,0.08,-0.00136845078446,-0.00174749443175
ERR/66,-0.34,0.08,-0.00136845078431,0.00174749443266
ERR/67,-0.00,0.08,-0.00136845078418,1.81852753443e-005
ERR/68,0.34,0.08,-0.0013684507841,-0.00176573782055
ERR/69,-0.30,0.08,-0.0013684507841,0.00156571002777
ERR/70,0.08,0.08,-0.00136845078419,-0.000436518370758
ERR/71,-0.08,-1.71,0.0116150279608,0.000436518371401
ERR/72,0.30,-1.71,0.0116150279608,-0.001565710027
ERR/73,-0.34,-1.71,0.0116150279608,0.00176573782143
ERR/74,0.00,-1.71,0.0116150279609,-1.81852744134e-005
ERR/75,0.34,-1.71,0.011615027961,-0.00174749443173
ERR/76,-0.34,-1.71,0.011615027961,0.00174749443265
ERR/77,-0.00,-1.71,0.011615027961,1.81852753016e-005
ERR/78,0.34,-1.71,0.0116150279609,-0.00176573782063
ERR/79,-0.30,-1.71,0.0116150279608,0.00156571002764
ERR/80,0.08,-1.71,0.0116150279605,-0.000436518370936
ERR/81,-0.08,-2.56,0.00942233617362,0.000436518371302
ERR/82,0.30,-2.56,0.00942233617352,-0.00156571002712
ERR/83,-0.34,-2.56,0.00942233617344,0.00176573782127
ERR/84,0.00,-2.56,0.00942233617338,-1.81852746124e-005
ERR/85,0.34,-2.56,0.00942233617329,-0.00174749443197
ERR/86,-0.34,-2.56,0.00942233617318,0.00174749443236
ERR/87,-0.00,-2.56,0.009422336173,1.81852749535e-005
ERR/88,0.34,-2.56,0.00942233617273,-0.00176573782103
ERR/89,-0.30,-2.56,0.00942233617236,0.00156571002718
ERR/90,0.08,-2.56,0.00942233617185,-0.000436518371455
ERR/91,-0.08,1.99,-0.00916996757305,0.000436518370904
ERR/92,0.30,1.99,-0.0091699675733,-0.00156571002757
ERR/93,-0.34,1.99,-0.00916996757353,0.00176573782077
ERR/94,0.00,1.99,-0.00916996757377,-1.81852751666e-005
ERR/95,0.34,1.99,-0.00916996757405,-0.00174749443259
ERR/96,-0.34,1.99,-0.00916996757438,0.00174749443168
ERR/97,-0.00,1.99,-0.00916996757478,1.81852742074e-005
ERR/98,0.34,1.99,-0.00916996757529,-0.00176573782185
ERR/99,-0.30,1.99,-0.00916996757593,0.00156571002629
ERR/100,0.08,1.99,-0.00916996757671,-0.000436518372435
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 06-10-2009, 08:12   #81
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
Thomas..
The libbsb 'read me' file says tha MSYS and MinGW programs have to be installed for the win xp version. Is that really neccessary? A huge file 110MB and complicated configuration. Don't think it is for me with my sparse technical skills. And what about the bsbfix program. Should that also be run on the finished NZ53.kap?

bsbfix
------
The utility bsbfix fixes the index table in a BSB file that has become
invalid. A BSB file becomes invalid whenever you edit the cartographic
information in the ASCII text header at the start of a BSB file using a text
editor like vi or emacs.
E.g.
Edit the BSB file to change registration points in the text header:
vi australia4c.kap
Fix the binary index table in the BSB file:
bsbfix australia4c.kap
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 06-10-2009, 09:12   #82
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Successful import of a tiff chart

Hi I've successfully imported in OpenCPN a chart (from a GIF file). The process was:

1) saved the image as tiff, 6 bit palette (6bpp or 64 unique colours)

used tif2bsb with the following template:

VER/2.00
BSB/NA=Roma_Area_VFR_01,NU=,RA=3912,2584,DU=254
KNP/SC=350000,GD=LOCAL DATUM UNKNOWN,PR=LAMBERT CONFORMAL CONIC,PP=42.44,PI=5.200,SP=
SK=0.0000000,TA=90.0000000,UN=METERS,SD=MEAN LOW WATER SPRINGS DX=1.50,DY=1.50
CED/SE=2000,RE=1,ED=01/01/2007
OST/1
REF/1,413,209,42.0,12.0
REF/2,413,2172,41.25,12.0
REF/3,3869,2137,41.25,13.75
REF/4,3828,175,42.0,13.75
PLY/1,42.05,11.8
PLY/2,41.2,11.8
PLY/3,41.2,13.75
PLY/4,42.05,13.75

Note: the most important info that must be absolutely correct for a specific image are:
RA=xxx,yyy (the image width/height in pixels)
the REF points
the PLY limits (also the order matters)

I georeferenced the image by hand (look at the pixel x,y where the coordinate grids crosses, and write down the REF line (REF/n,x,y,lat,lon)

Note that OpenCPN loads some info from .kap files when you select chart folders. If you make changes to the .kap file, unistall the chart folder and re-install it to let OpenCPN to rescan the .kap files

Ciao, Marco.

P.S. I've not been able to tell OpenCPN that the chart is not MERCATOR but LAMBERT projection (it simply seem to ignore the PR= info). Maybe it's my fault.
__________________
GPS-Marco is offline   Reply With Quote
Old 06-10-2009, 14:25   #83
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Sindbad,
regarding #81.

It is mentioned under "for win32 native builds..."

This is programming lingo for combining compiled code with all the bits and pieces needed for a working program. You will not need that to just run the existing .exe files in the libbsb-0.0.7 folder.

/J
__________________
jonasaberg is offline   Reply With Quote
Old 07-10-2009, 06:13   #84
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
Thank you Thomas !!

You've given me new faith in the raster to .kap conversion program.

Have a look at the detailed Auckland harbor chart with nine AIS targets exactly where they should be. Still having problems with using my win32 version on Vista but have a feeling I need to learn more about compatible .tif formats as well as the requirements of the header file.
Attached Thumbnails
Click image for larger version

Name:	NZ5322 MAP.jpg
Views:	224
Size:	238.7 KB
ID:	10365  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 07-10-2009, 17:44   #85
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
opencpn and KAP headers

Hello all....
The question has been asked, "What KAP header fields are recognized and utilized by opencpn?"
So, here is the list of minimum required KAP header information, directly from the code.

BSB/RA NA DU
KNP/SC SK UN GD
RGB
PLY
REF

Following are optional, not necessary for basic chart display and navigation.

DAY (optional daylight and night color palettes)
NGT

WPX (BSB Version 3 precomputed georeferencing constants.)
WPY
PWX
PWY

CPH Longitude phase adjuster
DTM Datum offsets.
CED Chart Edition Date info

There seems to be some good progress being made on converting Tif to BSB. I applaud the effort. Its a very "open source" kind of thing to do! Keep up the good work.

Good luck....
Dave
__________________
bdbcat is online now   Reply With Quote
Old 07-10-2009, 23:39   #86
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Dave,
I guess you have access to the BSB specification to have been able to import and use BSB charts in OpenCPN.
Is it possible to make it available?

This would make it more likely that someone could write a generic "MapCal" that could produce calibrated maps in BSB as well as a possible future open format.

If not why? (..assuming there might be some signing of confidentiality/nondisclosure involved ...)

/Jonas
__________________
jonasaberg is offline   Reply With Quote
Old 08-10-2009, 02:33   #87
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by bdbcat View Post
Hello all....
The question has been asked, "What KAP header fields are recognized and utilized by opencpn?"
So, here is the list of minimum required KAP header information, directly from the code.

BSB/RA NA DU
KNP/SC SK UN GD
RGB
PLY
REF

Following are optional, not necessary for basic chart display and navigation.

DAY (optional daylight and night color palettes)
NGT

WPX (BSB Version 3 precomputed georeferencing constants.)
WPY
PWX
PWY

CPH Longitude phase adjuster
DTM Datum offsets.
CED Chart Edition Date info

There seems to be some good progress being made on converting Tif to BSB. I applaud the effort. Its a very "open source" kind of thing to do! Keep up the good work.

Good luck....
Dave
1) I then understand that OCPN does not consider the projection (maybe it only handles mercator)

2) The RGB values are automatically computed and added by tiff2bsb.

3) Please Dave, do not forget in OCPN to correct the PLY values with the DTM offsets in order to correctly draw the chart limits for datum shifted charts.

While all parameters basic are rather clear now, what is the "CPH Longitude phase adjuster"? How it is used by OCPN?

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 08-10-2009, 07:56   #88
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Charts

All...

Unfortunately, there seems to be no generally available specification for BSB chart format. Everything I know I learned from reverse engineering, random Googling, and reading libbsb source code. Sorry.

GPS-Marco:

Opencpn uses only Mercator projections. BSB charts of other projections will be read with distortions.

The CPH factor is something that appeared in BSB Version 3. As far as I can tell, it is used with charts having pre-calculated georef constants which cross the Intl Date Line. The georef equations are created by treating the IDL as a virtual longitude 0. Longitude values generated at run time by these georef equations are then adjusted by CPH (depending on their phase) to produce the expected negative longitude for W, positive for E.
I don't think I have actually ever seen it in a chart. I simply copied the relevent code from libbsb in case it should be seen. So I am guessing.....

Anybody seen a KAP header with CPH populated (non-zero)?

Re your #3:
Code:
3) Please Dave, do not forget in OCPN to correct the PLY values with the DTM offsets in order to correctly draw the chart limits for datum shifted charts.
I believe we are doing this now, as we draw the chart outlines.

We don't, however, adjust the PLY values as the chart is read into the database. As a result, this should only affect the calculation of the chart stack at any point. In rare cases, when the screen center (or Auto-follow boat position) is outside the PLY region, but within the "DTM adjusted" chart, the chart selector buttons will not include the desired chart.

Do you have a chart/position in mind where it appears that we are not doing this properly?

Thanks
Dave
__________________
bdbcat is online now   Reply With Quote
Old 08-10-2009, 10:37   #89
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by bdbcat View Post
...
We don't, however, adjust the PLY values as the chart is read into the database. As a result, this should only affect the calculation of the chart stack at any point. In rare cases, when the screen center (or Auto-follow boat position) is outside the PLY region, but within the "DTM adjusted" chart, the chart selector buttons will not include the desired chart.

Do you have a chart/position in mind where it appears that we are not doing this properly?

Thanks
Dave
Dave, the problem I see is the opposite of what you say: It happens that the chart remains in the stack even if it is outside its usable part (just think to the opposite side of the chart respect to your example). This may cause the display of a chart that should not be considered valid in that position (OCPN actually displays the boat over the chart border). Moreover is bad to see the red border not drawn over the exact chart border. I knot it's a small issue, but we are looking for a professional SW here... :-)

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 08-10-2009, 20:33   #90
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
'nuff said


Or click here for full size.



Or click here for full size.


Or click here for full size.

The full sized ones are clear.

-dan
__________________

dacust is offline   Reply With Quote
Reply

Tags
charts, kml, raster2bsb, tiff2bsb, bsb

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
Charts on CD stxboy Navigation 43 28-01-2014 11:40
Charts for BC Charlie Navigation 11 19-04-2007 04:39
Used Charts daven Navigation 2 28-11-2006 17:47
Looking at charts - where to go to next Rippy Other 19 10-03-2006 05:27



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 06:59.


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.