bsbreprojector - Reprojection program for BSB format files such as nautical charts
bsbreprojector [-t][-r][-c][-o outfile][-v][-p paramfile][-d degree_input_mode]
infile ...
-t | output TIFF format with world file. |
-r | output raw format (huge). |
-v | print the version number. |
-d mode | specify how latitude and longitude will be specified. Modes are: 0=+/-DDDMMMSSS.SS; 1=+/-DDDMMSS.SS; 2=+/-DDD.DDD. Leading zeros are ignored and unnecessary. |
-p paramfile | supply new projection parameters from paramfile instead of standard input. |
-o outfile | output to outfile instead of requesting file name later. |
-c | allow for compressed read if low on memory. Not recommended; the program seems to be slower even if there isn't much memory. Your experience may vary. |
There are two components to the distribution package: the executable and this
document.
You will probably wish to rename the executable to something shorter than the distribution name.
The executable may be placed anywhere you desire, but it is most useful to
put it somewhere where your PATH environment variable will find it.
To find your PATH with Windows, start a command prompt window (a.k.a. DOS window) and use the path command.
To find your PATH on a Unix-like system, use the command
echo $PATH
.
Once you move or copy the executable to a location where the system will look for it, you can execute it simply by typing its name on the command line.
In a GUI environment (e.g., Windows or X), you can start the program by double-clicking on its icon,
but you will not have the options provided by the command line.
Reprojection done using decimal degrees as inputs:
bsbreprojector -d 2 11009_1.kap
Batch mode done by specifying the input files on the command line and
setting parameters by responding to prompts. The metacharacter usage
will only work on Unix-like systems.
bsbreprojector 11*.kap
Batch mode processing using a shell loop (this is shown as a Unix example,
but the idea works in DOS as well). Assume you have created a file called
'paramfile' with the entries you would normally type in at the prompts.
for file in 112*.kap
do
newfile=`basename $file
.kap`_stplane.kap
bsbreprojector -o $newfile
-p paramfile $file
done
The following is an example of a paramfile with comments on each line to explain the input. These comments would not be in a paramfile. Each projection has different inputs and hence the paramfile needed varies. The easiest way to determine the inputs for the paramfile is by running the program and keeping track of your answers. Those answers are the inputs that make up the paramfile.
7 #the projection (Polyconic)
-90000000 # the central meredian in DDDMMMSSS.SSS format
30000000 # the origin of latitude in DDDMMMSSS.SSS format
0 # false easting in meters
0 # false northing in meters
2 # output units are meters
y # change the datum
99 # use datum NAD83
out.kap # output file (not needed if -o option used)
Note: When using the program interactively, there are options to list the
datums or zones to get the correct input number. These are typically '-999'
to get the list and 'y' to keep paging until you find what you want.
These should not be entered into the paramfile.