Cruisers Forum

Thread Tools Search this Thread Rate Thread Display Modes
Old 04-06-2014, 13:56   #16

Join Date: Dec 2012
Location: Seattle
Posts: 1,129
Re: How Are BSBs Created?

I have a file that is, I believe, the compiled imgkap program.

I can double click it, and Terminal launches. When that happens, I see this:


Last login: Wed Jun 4 13:53:12 on ttys001
Lyles-MacBook-Pro:~ Lyle$ /Users/Lyle/Desktop/imgkap ; exit;
ERROR - Usage:\imgkap [option] [inputfile] [lat0 lon0 lat1 lon1 | headerfile] [outputfile]

imgkap Version 1.11 by M'dJ

Convert kap to img :
imgkap mykap.kap myimg.png : convert mykap into myimg.png
imgkap mykap.kap mheader.kap myimg.png : convert mykap into header myheader (only text header kap file) and myimg.png

Convert img to kap :
imgkap myimg.png myheaderkap.kap : convert myimg.png into myimg.kap using myheader.kap for kap informations
imgkap myimg.png myheaderkap.kap myresult.kap : convert myimg.png into myresult.kap using myheader.kap for kap informations
imgkap mykap.png lat0 lon0 lat1 lon2 myresult.kap : convert myimg.png into myresult.kap using WGS84 positioning
imgkap -s 'LOWEST LOW WATER' myimg.png lat0 lon0 lat1 lon2 -f : convert myimg.png into myimg.kap using WGS84 positioning and options

Convert kml to kap :
imgkap mykml.kml : convert GroundOverlay mykml file into kap file using name and directory of image
imgkap mykml.kml mykap.kap: convert GroundOverlay mykml into mykap file

WGS84 positioning :
lat0 lon0 is a left,top point
lat1 lon1 is a right,bottom point
lat to be beetwen -85 and +85 degree
lon to be beetwen -180 and +180 degree
different format are accepted : -1.22 1°10'20.123N -1d22.123 ...
Options :
-n : Force compatibilty all KAP software, max 127 colors
-f : fix units to FATHOMS
-s name : fix souding datum
-t title : change name of map
-p color : color of map
- Kap to image color : ALL|RGB|DAY|DSK|NGT|NGR|GRY|PRC|PRG
ALL generate multipage image, use only with GIF or TIF - image or Kap to Kap color : NONE|KAP|MAP|IMG
NONE use colors in image file, default
KAP only width KAP or header file, use RGB tag in KAP file
MAP generate DSK and NGB colors for map scan (< 64 colors) Black -> Gray, White -> Black
IMG generate DSK and NGB colors for image (photo, satellite...)

[Process completed]


I moved both the program and the file I want to convert to the Desktop.
If you double click the compiled file, it does things, puts up the window above, and then you can't do anything with it. You can't type in the command line.

So I started a new Terminal window, and at the prompt, I typed

“imgkap 18446 A Port Madison.kap 18446 A Port Madisonheader.txt 18446 A Port Madison.png”

without the quotes.

The Terminal then says “-bash: imgkap: command not found”.
Jammer Six is offline   Reply With Quote
Old 04-06-2014, 14:54   #17
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 5,600
Re: How Are BSBs Created?

OS X looks for programs in a set of locations defined in the PATH environment variable - that's why it is essential to place imgkap in a location contained in the PATH.
Open terminal and issue
echo $PATH
From the list find a location that you like and place imgkap there. And it sure is not the Desktop.
Also you make it hard for yourself using files with spaces in the names. If you really must, you have to either escape the spaces with backslashes or enclose the individual filenames in doublequotes, so your command will be (after you move imgkap executable somewhere to your PATH):
imgkap 18446\ A\ Port\ Madison.kap 18446\ A\ Port\ Madisonheader.txt 18446\ A\ Port\ Madison.png
imgkap "18446 A Port Madison.kap" "18446 A Port Madisonheader.txt" "18446 A Port Madison.png"
Being you, I would sure rename the KAP to 18446.kap and went on with
imgkap 18446.kap 18446.txt 18446.png
as it is oh so much less confusing.

And remember, for the above to work you must be in the directory where your files are, so after running the Terminal, you will most likely need to do
cd Desktop
first to be where your KAP file is.

Maybe reading Introduction to the Mac OS X Command Line - Treehouse Blog or something like that could help you a little bit.

Good luck

nohal is offline   Reply With Quote


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
Online Ship's Log I Created shiplog General Sailing Forum 3 10-07-2010 18:47
Teak cockpit tables created equal? Patsi General Sailing Forum 5 08-04-2009 09:42
New City-sized Iceberg Created Near Antarctica CaptainK Polar Regions 1 03-04-2006 20:16

Advertise Here

All times are GMT -7. The time now is 20:22.

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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.