|
|
13-03-2011, 10:25
|
#16
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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?
|
|
|
13-03-2011, 13:07
|
#17
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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
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.
|
|
|
14-03-2011, 09:01
|
#18
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
Re: imgkap - kap File Converter Tool
Quote:
Originally Posted by Surveyor
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 !
|
|
|
14-03-2011, 09:10
|
#19
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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
|
|
|
16-03-2011, 10:56
|
#20
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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?
|
|
|
16-03-2011, 11:17
|
#21
|
Registered User
Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
|
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
|
|
|
16-03-2011, 13:25
|
#22
|
Registered User
Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 65
|
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
|
|
|
16-03-2011, 19:00
|
#23
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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....
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...
|
|
|
16-03-2011, 19:06
|
#24
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
Re: imgkap - kap File Converter Tool
here-the last wasn't too clear...
|
|
|
18-03-2011, 09:09
|
#25
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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.
|
|
|
19-03-2011, 14:40
|
#26
|
Registered User
Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 65
|
Re: imgkap - kap File Converter Tool
Quote:
Originally Posted by HappySeagull
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
|
|
|
19-03-2011, 16:43
|
#27
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
Re: imgkap - kap File Converter Tool
Thanks,M'dJ...(Oui,Printemps c'est arrive!)
|
|
|
31-03-2011, 18:42
|
#28
|
Registered User
Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
|
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: http://www.cruisersforum.com/forums/...nts-57693.html
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.
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.
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.
|
|
|
01-04-2011, 06:50
|
#29
|
Registered User
Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
|
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
|
|
|
01-04-2011, 06:58
|
#30
|
Registered User
Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
|
Re: imgkap - kap File Converter Tool
Quote:
Originally Posted by HappySeagull
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
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|