Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 13-03-2011, 11:25   #16
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

Aah,too late to edit above.Sorry.I think I have it.
If you want the new fixed or edited kap to have a really different name...
You should therefore (carefully)change the name in the header to agree with the new input image...
as in what I edited mine TO
.....
BSB/NA=KAP Googlescotlandfixed AT 12/03/2011
NU=UNKNOWN,RA=....

where before as extracted,it said,
"Googlescotland7 10" and I think it would have stayed in there-in the new one when I put the kap back together as "GoogleScotlandfixed.kap" ??

I did change the name in here with notepad.So,my point being,If you don't,you may find it difficult to edit the NEW kap again ...and also,maybe charting programs will display the wrong name from the header...

I guess you could even change/correct other things in there too on occasion etc....very cool!


PS I think I got this right but Mdj-you will correct me?
__________________

__________________
HappySeagull is offline   Reply With Quote
Old 13-03-2011, 14:07   #17
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

Thanks,M'dj.
I'm still her-pouring rain again so I wrote a windoze batch script to make kaps.(the first posted I had to delete,in case some one noticed...but this one does work,for what it's worth!)
What you need?Not much.Just imgkap.exe and the picture in the same folder the prompt starts in.You also need upper left and lower right lat/longs in decimal degrees.
A carefully trimmed screen grab from open cpn,or google,should work to play with...there's a lot of ways to get these from various things you want to chart but in opencpn just push the cursor into the corners and write down the positions you'll see along the bottom.You can of course play with the picture and resave it with any name-just don't change the size.
imgkapMakeaKap.doc
it looks like this in action
Click image for larger version

Name:	script in action.jpg
Views:	191
Size:	80.5 KB
ID:	25018

note that you must wait until it says "press any key"-let her blink until it does.
It makes the command line a little more accessible? and is quite verbose!
..but really,I find just copying and pasting the whole line in at the prompt is faster!Oh,well.
__________________

__________________
HappySeagull is offline   Reply With Quote
Old 14-03-2011, 10:01   #18
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

Quote:
Originally Posted by Surveyor View Post
This is a great tool! I find it especially useful to create kaps from the 3600x2400 pixel images available at the "Exploring Google Maps for FSX" site.

Thanks for sharing!
Ok!surveyor!Good link!
Exploring Google Maps

I got the screengrab plugin for Firefox and this works great!
it's Perfect and simple for imgkap !
__________________
HappySeagull is offline   Reply With Quote
Old 14-03-2011, 10:10   #19
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

A couple more scripts for imgkap that I made up for my XP
These are to quickly split a kap and subsequently rebuild it with the same name with EX on the end...
to use,rename as .bat put em in a work folder with imgkap and the kap you want to play with.
imgkap_Extract2Edit.doc
imgkap_Rebuild.doc
__________________
HappySeagull is offline   Reply With Quote
Old 16-03-2011, 11:56   #20
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool Tweaking the header and the scale.

Fooling around more...indeed the header file is editable...
One example:I think(but don't know!) imgkap creates a scale automatically depending on the size of the image compared to the calibrated corners.I guess it writes the DU as well...This usually works fine.But you can tweak the scale in the header.kap and rebuild for interesting results...!(I actually like my bat script for this)
...See,I have a very large homemade kap showing airtraffic overhead-it's kinda blurry and doesn't compare well to the same scales that would quilt with it so,I moved it "Out" by increasing the scale...I also tried moving it "in" to the closeup side and that was interesting too, in OpenCPN...!
Another useful experiment that might work even better is to extract the tif and header,shrink the tif,and rebuild with the same header.

of course unknowns can be filled in here too.I guess best advice would be to examine a professional chart and use the same lingo or a charting program less forgiving than openCPN may not like em.It might help to fill some of these in."NU" is easy.It's the number as in NU=3547,per the ol' CHS paper chart.

By the way,I've tried imgkap charts in VisNav 4.0 and they work.VisNav has some gobbledeegook showing in the title in "ChartTable" dialogue but loads em fine.Any other reports?
__________________
HappySeagull is offline   Reply With Quote
Old 16-03-2011, 12:17   #21
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: imgkap - kap File Converter Tool

Happy

The meaning of the different fields in the bsb header file has been fairly well documented through the chart thread. I made a summary here, this link also points to Marcos summary. As OpenCPN is free software, anyone can poke into the code, and all the comments, to see just how a header-file is treated.

Thomas
__________________
cagney is offline   Reply With Quote
Old 16-03-2011, 14:25   #22
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: imgkap - kap File Converter Tool

The header format is described KAP (incompletely) in libbsb - BSB File format

I'm working on a solution on color reduction algorithm because FreeImage WU is buggy.

Soon
M'dJ
__________________
MdJ is offline   Reply With Quote
Old 16-03-2011, 20:00   #23
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

M'dj,Cagney...
I should have posted those!Thanks!
But here's what I was thinking about...later down the post,per a test of charts in ol'VisNav....

Click image for larger version

Name:	ComparisonsStorebought+homemade.jpg
Views:	213
Size:	172.6 KB
ID:	25162

see,storebought ones on top-( don't give me a hard time for being sloppy-a seagull after all!...and it makes no diff anyways)

So,some of these are Map2kap,some are imgkap,the one in the background and on the part of list is M'dj's Tiff2kap and you see Blue Marble? VisNav won't accept it.It screams and dies in fact. It won't accept a lot of homemade charts but imgkap scores well-most load- even with the gobbledeegook in the header VisNav shows...
I don't care (OpenCpn is way better) but it was a test and I'm curious...and wonder what other nav programs will think...for instance do they care if I write MSL instead of Mean Sea Level? VisNav doesn't care if NU is UNKNOWN but note that the storebought ones don't mention it...so it's something specific,right? Spacing?..
...what was it EXPECTING...that's what I was about...
__________________
HappySeagull is offline   Reply With Quote
Old 16-03-2011, 20:06   #24
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

here-the last wasn't too clear...

Click image for larger version

Name:	again.jpg
Views:	154
Size:	128.3 KB
ID:	25163
__________________
HappySeagull is offline   Reply With Quote
Old 18-03-2011, 10:09   #25
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

M'dj...sorry to "bug" you( a tiny joke) but if you look up from your work and need a simple break,I was wondering:

What is the proper order of these switches?
should it be
"imgkap -n -s MSL -f ..."etc.etc.

0r "imgkap -s MSL -f -n ...."etc.etc
...I've been putting "-n" as last switch
Also:
"-s MSL -f...."
or
"-f -s MSL..."
Yes,it's a silly question I can discover quickly but better to ask you so everyone can know.
__________________
HappySeagull is offline   Reply With Quote
Old 19-03-2011, 15:40   #26
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 61
Re: imgkap - kap File Converter Tool

Quote:
Originally Posted by HappySeagull View Post
What is the proper order of these switches?
Hello HappySeagull

There is no order for options, you can put them at the beginning, middle or end of arguments.

For colors (Bug on WU), I'm going on a fast algorithm based on histogram and Octree ...

(I also went to my sailing club near Paris (France) to attend the annual work.)

M'dJ
__________________
MdJ is offline   Reply With Quote
Old 19-03-2011, 17:43   #27
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

Thanks,M'dJ...(Oui,Printemps c'est arrive!)
__________________
HappySeagull is offline   Reply With Quote
Old 31-03-2011, 19:42   #28
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,395
Re: imgkap - kap File Converter Tool

An idea I've had...
Make a BOX with OpenCPN's Route tool.When it asks whether to use the nearby waypoint (this closes the box) of course,say yes.

Export this GPX and edit it in notepad or a suitable xml editor...see this thread for several options: Adding Information to Waypoints

the idea is to straighten-up the box ...you don't need me to describe this but ...I will.
in a counter-clockwise-made box....

corner1lat=corner4lat corner2lat=corner3lat.

corner1long=corner2long corner3long=corner4long.

Copy and paste is your friend throughout,from the gpx file.Note that OpenCPN uses decimal degrees in GPX and this is VERY convenenient for Imgkap...
Next,delete the unsquare route and import the fixed square boxroute into OpenCPN. Do a screen grab.Notice that once you have the gpx template,you can apply the grab to various charts and zoom levels.

Click image for larger version

Name:	Bunsbydemo.jpg
Views:	161
Size:	419.3 KB
ID:	25729

Next,crop the screengrab to the borders of the box.It's quite easy in many basic editors to move the lines near-exactly before cropping.You can split the arrows of the routebox.


Click image for larger version

Name:	Bunsbydemocropped.jpg
Views:	126
Size:	173.7 KB
ID:	25730

Now,use it in IMGKAP,using two diagonal corner positions from GPX copied+pasted or just typed in...Personally,I use a tif all the way through this and reduce it's colours to 128 or less for kap-making speed but it'll work without this too.


The idea of a box-route will have other uses,even if I haven't found em yet! One,is to paste a picture or whatever into this template crop.It'll show as a chart in the chart bar wherever you made the box ...You could therefore correct a PORTION of a chart.Paper charts used to be (and still are) corrected with paste-on bits....or it could be a picture of your mother,as a chart...
You could also extract the tiff with IMGKAP and paste the correction in but that's another story.
__________________
HappySeagull is offline   Reply With Quote
Old 01-04-2011, 07:50   #29
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 333
Re: imgkap - kap File Converter Tool

[QUOTE=MdJ;644656]The header format is described KAP (incompletely) in libbsb - BSB File format

Is there any information is the header to crop the white boarders known as collars from a standard chart. I would assume so as the NOAA charts are nicely stitched together in OCPN..just wondering how to do it as it would be very helpfull when creating custom charts.

Best regards and thanks

/ch
__________________
sailias is offline   Reply With Quote
Old 01-04-2011, 07:58   #30
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 333
Re: imgkap - kap File Converter Tool

Quote:
Originally Posted by HappySeagull View Post
I got the screengrab plugin for Firefox and this works great!
it's Perfect and simple for imgkap !
Greets SGull....where did you find that? A URL would be great.

Regards

/ch
__________________

__________________
sailias is offline   Reply With Quote
Reply

Tags
imgkap

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
Development Debugging Environment - Setup Help rgleason OpenCPN 577 11-11-2017 06:02
OpenCPN Beta Version 3.1.814 Released bdbcat OpenCPN 185 14-09-2012 08:43
Route File Transfer via SDcard to Garmin 441s four winds Navigation 11 25-02-2012 09:34
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 22:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 05:31



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 08:44.


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.