Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 25-09-2010, 10:37   #166
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 chartnut View Post
...

Sinbad7: I am new to graphics, but I thought the jpeg format was not a lossless format, especially when compressed. If my understanding is correct, using jpeg in the conversion process will diminish the quality of the end product. I have been sticking to GIF, TIF, or PNG during the conversion process because all these formats are lossless.
You are correct. I think Sinbad7 was starting from a JPG.

-dan
__________________

dacust is offline   Reply With Quote
Old 25-09-2010, 15:47   #167
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by chartnut View Post
Thanks for all the quick responses!

SP field: I agree with dpons comment - "Specifies the coordinate system of the chart and the interval in feet". This field contains 2 parameters separated by a comma. Sorry, I am a syntax freak! I do believe that mc2bsbh should be updated to remove the UNKNOWN from the "SP=" entry and leave it blank.
...
Hello,

Do you have any SW that complains with the value SP=UNKNOWN?

I have different BSB chart samples from different producers (USA-NOAA, Brasil, etc.) and all of them use different conventions for the unused/not applicable fields: blank, 0.0, UNKNOWN, no field at all.

We do not have the real BSB specifications since BSB is a proprietary format but fortunately the intent of mc2bsbh is not to prepare official BSB charts but just to prepare a kap header that works fine with "most" of the SW out there and that definitely works fine with OpenCPN and SeaClear.

So, if no SW complains with the mc2bsbh header, I think we should not be worried.

Ciao, marco.
__________________

__________________
GPS-Marco is offline   Reply With Quote
Old 25-09-2010, 16:30   #168
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 305
Quote:
Originally Posted by dacust View Post
You are correct. I think Sinbad7 was starting from a JPG.

-dan
Absolutely, jpg should be regarded as pest and cholera. Never ever use it during scanning and/or conversion of charts.

/Jonas
__________________
jonasaberg is offline   Reply With Quote
Old 25-09-2010, 20:18   #169
Registered User

Join Date: Sep 2010
Location: Canada
Boat: Niagara 35
Posts: 7
GPS-Marco said "Do you have any SW that complains with the value SP=UNKNOWN? --- 8< --- So, if no SW complains with the mc2bsbh header, I think we should not be worried."

No, I do not know of any SW that complains, but I will continue to manually override this in my chart conversions.

Googling this afternoon, I got this off a gdal posting relating to what PI= may be all about:
"I think KNP/PI= has something to do with roughly how much distance 1 pixel covers, anyway here is a scale : PI ratio for a number of NOAA charts:
SC=400000,PI=30.000
SC=80000,PI=10.000
SC=40000,PI=5.000
SC=15000,PI=1.000
SC=10000,PI=1.000 "
__________________
chartnut is offline   Reply With Quote
Old 28-09-2010, 14:13   #170
Registered User

Join Date: Sep 2010
Location: Canada
Boat: Niagara 35
Posts: 7
WGS72 corrections

I am converting a chart that is based on WGS72. The chart indicates that WGS 84 positions should be moved 0.11 min southward and 0.04 min westward. In MapCal, I set the Datum to WGS72 and I put in Lat Shift: 000 00.110 S and in Long Shift: 000 00.040 W. This generated the following entry in ChartCal.dir:
DS=-0.00183333333333333,-0.000666666666666667

I do not see this information showing up in the .hdr file created by mc2bsbh.
__________________
chartnut is offline   Reply With Quote
Old 29-09-2010, 02:54   #171
Registered User

Join Date: Sep 2009
Location: Rome
Posts: 320
Quote:
Originally Posted by chartnut View Post
I am converting a chart that is based on WGS72. The chart indicates that WGS 84 positions should be moved 0.11 min southward and 0.04 min westward. In MapCal, I set the Datum to WGS72 and I put in Lat Shift: 000 00.110 S and in Long Shift: 000 00.040 W. This generated the following entry in ChartCal.dir:
DS=-0.00183333333333333,-0.000666666666666667

I do not see this information showing up in the .hdr file created by mc2bsbh.
Hello chartnut,

you should find a non zero DTM/ field. The two values in the DTM field are shifts in seconds.

Ciao, Marco.
__________________
GPS-Marco is offline   Reply With Quote
Old 29-06-2011, 13:37   #172
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: mc2bsbh - MapCal Template to BSB Template Conversion

Hi ...

I am actually working on a script which should create a BSB header (in txt format) for a Google Map screenshot.

It is intended to be processed by imgkap (M'dJ replacement for tiff2bsb - see Imgkap - kap File Converter Tool ).

So here are my questions:
  1. Which values do I absolutely need to add?
    BSB/
    NA= name of the map / OK
    NU= number / OK
    RA= width,height in pixel / OK
    DU= dpi/ppi shouldn't matter but could be 72 / OK

    KNP/
    SC= scale, is it really needed for OCPN to display the kap? / ??
    GD=WGS84 / OK
    PR=MERCATOR / OK
    PP= projection parameter, any needed for Mercator? / ??
    PI=UNKNOWN, / ??
    SP=UNKNOWN, / ??
    SK=0.0, / ??
    TA=90.0 / ??
    UN=METERS, / ??
    SD=UNKNOWN / ??

    OST/
    what is this one good for? needed? / ??

    CED / ??

    CPH/0.0 / ??

    DTM/0,0 / ??

    KNQ / ??

    REF / OK

    PLY / OK
  2. Is the order important?
    If so, which one is the correct one?
  3. Would it have any advantages if there are more REF points than just the 4 corners of the image?
Any help is much appreciated!

Many thanks in advance,
Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 29-06-2011, 17:54   #173
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: mc2bsbh - MapCal Template to BSB Template Conversion

Quote:
Originally Posted by Netsurfer View Post
I am actually working on a script which should create a BSB header (in txt format) for a Google Map screenshot.
maybe it helps:
https://trac.osgeo.org/grass/browser...t.kap_template


Hamish
__________________
HamishB is offline   Reply With Quote
Old 29-06-2011, 17:59   #174
Registered User
 
HamishB's Avatar

Join Date: Jan 2010
Location: New Zealand
Posts: 286
Re: mc2bsbh - MapCal Template to BSB Template Conversion

oh yeah, and for correctly calculating the local map scale based on Web Tile zoom level and latitude, see line 1140 here:

SourceForge.net Repository - [gpsdrive] Contents of /trunk/scripts/gpsfetchmap.pl

(This same formula is used by OpenStreetMap tiles, Google Map tiles, Microsoft Map tiles, ... the cartographic abomination that is spherical mercator)


Hamish
__________________
HamishB is offline   Reply With Quote
Old 30-06-2011, 01:30   #175
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: mc2bsbh - MapCal Template to BSB Template Conversion

Gunther
See this post:Google Earth to BSB / KAP

Thomas
__________________
cagney is offline   Reply With Quote
Old 30-06-2011, 10:03   #176
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: mc2bsbh - MapCal Template to BSB Template Conversion

ABSOLUTELY? but why not have it all?Imgkap writes a lot of it automatically...because
Unfortunately,OpenCPN is very rugged and opens just about anything,while other apps are more sensitive.You saw this post?I didn't get into it much but some charts won't open in anything but OpenCPN,which is ok!but still a little disturbing.
Imgkap - kap File Converter Tool

"KNP/
SC= scale, is it really needed for OCPN to display the kap? / ??"

It tells a program how to quilt ie in what order.OpenCPN uses this to line up along the chart bar,so it's important.I've tested this by changing it.Imgkap does it automatically quite well.There's just a few home-calibrated images that needed moving...ie small graphics covering large areas don't look well

"PP= projection parameter, any needed for Mercator? / ??"

Mercator charts I have use the Middle latitude as in"BSB/NA=APPROACHES TO/ APPROCHES A TSEHUM HARBOU,NU=3476,RA=8170,11658,DU=254..KNP/SC=10000,GD=NAD27,PR=MERCATOR.. PP=48.68333, PI= 0.50000,SP=UNKNOWN,7 SK= 0.00.. UN=METERS,SD=LNT,DX= 1.00,DY= 1.00..CED/SE=3476,RE= 347601,ED=01/24/96..VER/1.0..OST/1..IFM/4..REF/1,246,11285,48.6375944,-123.4352000..REF/2,7740,11287,48etc.etc"
...I think it's better to have it as it relates to the Lat-versus-Long geometry in the projection...
and you see that SP is UNKNOWN,so that's an answer per Mercators.

OpenCPN likes to have the UN value, of course.It's a very useful feature where charts are a mixed bag of Fathoms and Meters like sailing betwixt USA and Canada

SD..I don't know what uses this in display but while UNKNOWN works ok and Google Earth charts don't need it...UNKNOWN is probably better than putting something in that another app wouldn't understand...I can't remember just now if MSL for MeanSeaLevel worked outside of OpenCPN,but OpenCPN didn't care.
Actually what Open CPN can display on the hover over a kap in the chart bar might be a good indicator of what it'd be nice to have in the chart header outside of what's "necessary"?
__________________
HappySeagull is offline   Reply With Quote
Old 30-06-2011, 11:25   #177
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: mc2bsbh - MapCal Template to BSB Template Conversion

about as simple as it gets from my pile of junk..from imgkap to see in OpenCPN.RA,DU,KNP/SC are written by imgkap but can be rewritten but Scale is needed though.It can't be UNKNOWN

! 2011 imgkap 1.1 - at 30/06/2011 from rectangletest1EX.tif..!SeagullTest..VER/2.0..CED/SE=1,RE=1,ED=30/06/2011..BSB/NA=.. NU=UNKNOWN,RA=1030,616,DU=254..KNP/SC=30064,GD=WGS 84,PR=MERCATOR,PP=0.00.. PI=UNKNOWN,SP=UNKNOWN,SK=0.0,TA=90.. UN=UNKNOWN,SD=UNKNOWN,DX=3.00,DY=3.01..REF/1,0,0,49.516666,etc

If I make scale UNKNOWN it's nogo.Likewise skew is needed as something ..

I'm still uncomfortable with the idea of charts that only work in OpenCPN.What's Open about that?
__________________
HappySeagull is offline   Reply With Quote
Old 01-07-2011, 11:17   #178
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: mc2bsbh - MapCal Template to BSB Template Conversion

Hamish, Thomas and HappySeagull ...

thanks for your support!
Sorry, was still busy with the basics ... .

Well, AFAIS the only thing I (the script) has to calculate is the scale value.

@Hamish
I had a look at the linked script but I do not really understand where all the values in the formula come from?

I have the following values:
  • Lat/Lng values of every point of the map
  • Lat/Lng for every pixel and its position
Is it possible to calculate the scale from these values?
BTW: The screen capture is meant for small areas like a harbour plan/view. Not for large maps. So it is unlikely that the latitude degrees span more than 1 degree at a maximum.

Which latitude value should be taken for the calculation?
The most northward one (if in the Northern hemisphere)? Or the most southward one? Or the one of the center of the map?

Thanks

Gunther

PS: Just to avoid any misunderstandings - Google Maps uses WGS84 and Mercator projection. So I guess nothings else to put to the header, correct?
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 01-07-2011, 12:02   #179
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: mc2bsbh - MapCal Template to BSB Template Conversion

Hi,Netsurfer,
yes,Mercator and WGS84 work for me all the time in imgkap at the large scales I use but
I stumbled on this one day- GE isn't actually Mercator.. it's "Cylindrical Projection".

quoting from the link below..."Google Earth uses Simple Cylindrical projection for its imagery base. This is a simple map projection where the meridians and parallels are equidistant, straight lines, with the two sets crossing at right angles. This projection is also known as Lat/Lon WGS84."

link is About Datums and Projections - Google Earth Help

Does it matter?My own homemades work well enough matching waypoints but I bear this detail in mind when they don't..so GE is just a useful picture that is in the same location...and(just thinking), maybe,the best way is to centre the dangers(rocks reefs) if that's the purpose of the GEmap being made...hmmm.
__________________
HappySeagull is offline   Reply With Quote
Old 01-07-2011, 12:05   #180
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: mc2bsbh - MapCal Template to BSB Template Conversion

HappySeagull ...

you are totally right, but ...

I am talking about Google MAPS not Google Earth!

And the biggest advantage imho of GM over GE is that it uses WGS84 and Mercator.

Gunther
__________________

__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Reply

Tags
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
Bahamas Explorer Charts in BSB Format? geoffschultz Navigation 29 16-05-2015 11:21
Free (and Legal) BSB Charts from Maptech! exposure Navigation 15 31-07-2013 12:51
Sales Agreements - Template Anyone? cyberkitty Dollars & Cents 3 11-02-2010 15:49
OpenCPN with BSB v4 selkie Navigation 4 03-08-2009 12:32
Survey Template bbhflts Construction, Maintenance & Refit 3 23-06-2009 23:42



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 11:32.


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.