MASTER(1)               TeraScan Command                MASTER(1)



NAME
master, master2, master4 - generates a base map and  projec-
tion for a user specified area.

SYNOPSIS
master  [ _p_a_r_a_m_e_t_e_r=_v_a_l_u_e ... ]  [ _o_u_t_p_u_t_f_i_l_e ]
master2  [ _p_a_r_a_m_e_t_e_r=_v_a_l_u_e ... ]  [ _o_u_t_p_u_t_f_i_l_e ]
master4  [ _p_a_r_a_m_e_t_e_r=_v_a_l_u_e ... ]  [ _o_u_t_p_u_t_f_i_l_e ]

Parameters   for   master   are   projection,    center_lat,
center_lon,     num_lines,     num_samples,     pixel_width,
pixel_height,   standard_lat,   rotate_angle,   move_center,
new_center_lat, new_center_lon.

Parameters for master2  are  projection,  min_lat,  max_lat,
min_lon,  max_lon,  square_aspect,  num_lines,  num_samples,
estim_center,    center_lat,    center_lon,    standard_lat,
rotate_angle.

Parameters  for  master4   are   projection,   estim_center,
center_lat,    center_lon,    rotate_angle,    standard_lat,
num_lines,    num_samples,     up_left_lat,     up_left_lon,
low_left_lat,   low_left_lon,   up_right_lat,  up_right_lon,
low_right_lat, low_right_lon.


DESCRIPTION
These  functions  generate  a  (master)  dataset  containing
attributes  that  parameterize  an  earth  transform.   This
transform relates line and sample  coordinates  to  latitude
and  longitude  coordinates  for a user defined geographical
region  using  a  user  specified  map  projection.   master
defines the region by the center latitude and longitude, and
the pixel size at the center.  master2  defines  the  region
using  a  bounding  latitude/longitude box.  master4 defines
the region using corner (lat/lon) coordinates.

Master datasets are used by a variety  of  ingest  functions
such  as  hrptin  and rtdin to limit data extraction to only
the rectangular subset of sensor data  that  intersects  the
geographical area specified by a master dataset.

Master datasets are most often used to interpolate  data  in
sensor  coordinates  onto  the  region defined by the master
dataset.  This is done by using registration functions  such
as  fastreg(1).   fastreg  takes  all  of the data within an
input dataset and  interpolates  that  data  onto  the  grid
defined  by  the  master  dataset.  Data falling outside the
master dataset are discarded by fastreg.

Master datasets can also be used by passcover  and  catcover
to  determine  whether  a satellite pass intersects a master



TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           1






MASTER(1)               TeraScan Command                MASTER(1)



dataset.

Master datasets contain two dimensions _l_i_n_e and _s_a_m_p_l_e, plus
attributes   that   describe  the  map  projection.   Master
datasets also contain a null (empty) variable called  master
with  line  and  sample  dimensions.   This  variable can be
displayed to create and blank background  overwhich  various
overlays  (geopolitical  boundaries,  lat/lon  grids) can be
drawn.

PARAMETERS
projection
  Name of the map projection.  Valid responses are stere-
  ographic,   rectangular,   orthographic,   polarstereo,
  equidist_azim, mercator, utm, polyconic,  lambert_azim,
  lambert_conic, and albers_conic.  There is no default.

  polarstereo is not supported by master2.

  polarstereo, lambert_conic,  and  albers_conic  projec-
  tions  are  based  on a geodetic (elliptic) earth.  All
  other projections are based on a spherical earth.

  These map projections are defined  in  the  publication
  entitled  Map  Projections  used by the U.S. Geological
  Survey, Bulletin 1532 by John P. Snyder.

  For minimal distortion, rectangular and  mercator  pro-
  jections  should not be used for maps centered near the
  poles.

estim_center
  Option to estimate the mathematical  projection  center
  in  master2  and  master4.  Valid responses are yes and
  no.  The default is yes.

center_lat, center_lon
  Center (lat, lon) coordinates used for the mathematical
  definition  of the map projection.  They may not appear
  at the center of the master dataset, however, depending
  on  other parameters.  See formats(7) for valid ways to
  specify latitude and longitude.  There  is  no  default
  value.

  [   Exception.    When   projection=polarstereo,    the
  mathematical center latitude is taken to be the nearest
  pole to the user specified center_lat.  The master data
  center  is  _m_o_v_e_d  to the user specified center_lat and
  center_lon by adjusting  the  master  dataset's  affine
  transform attribute. ]

  center_lat and center_lon are not used  by  master2  or



TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           2






MASTER(1)               TeraScan Command                MASTER(1)



  master4 unless estim_center=no.

min_lat, max_lat
  Latitude limits used by master2.   See  formats(7)  for
  valid  ways  to specify latitude.  min_lat must be less
  than max_lat.  There is no default.

min_lon, max_lon
  Longitude limits used by master2.  See  formats(7)  for
  valid  ways to specify longitude.  min_lat is the left-
  most longitude; max_lon  is  the  rightmost  longitude.
  There is no default.

up_left_lat, up_left_lon, up_right_lat, up_right_lon
  Upper left corner and upper  right  corner  (lat,  lon)
  coordinates  used by master4.  They apply to the center
  of the corner pixels, not to  the  outer  corner.   See
  formats(7) for valid ways to specify latitude and long-
  itude.  There are no defaults.

low_left_lat, low_left_lon, low_right_lat, low_right_lon
  Lower left corner and lower  right  corner  (lat,  lon)
  coordinates  used by master4.  They apply to the center
  of the corner pixels, not to  the  outer  corner.   See
  formats(7) for valid ways to specify latitude and long-
  itude.  There are no defaults.

square_aspect
  Option in master2 to make pixel width the same as pixel
  height.  If square_aspect=yes, only num_samples is user
  specified; num_lines is computed using the lat/lon lim-
  its and num_samples.  In the case, the pixel height and
  width near the center of the master dataset will rarely
  be a round number.

  If square_aspect=no, chances are that the pixel  aspect
  near the center of the master dataset will not be one.

num_lines, num_samples
  Height and width  of  the  master  dataset  in  pixels.
  There  is  no  default.   In  the  case  of master2, if
  square_aspect=yes, only num_samples is user  specified;
  num_lines is computed.

pixel_width, pixel_height
  Pixel width and height in kilometers, at the projection
  center,  before  any  rotation.   Note, for projections
  polarstereo, lambert_conic and albers_conic, pixel size
  is  enforced  along  the standard parallels, not at the
  center.

  The valid range for  pixel_width  and  pixel_height  is



TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           3






MASTER(1)               TeraScan Command                MASTER(1)



  [.001, 1000.].  The default is 1.1132 km = 0.01*(degree
  of latitude).  These parameters are used only  by  mas-
  ter.

standard_lat
  If projection=polarstereo,  then  standard_lat  is  the
  standard parallel of the projection, e.g., the latitude
  at which the plane intersects the earth.   The  default
  is 70.

  If the projection is lamber_conic or albers_conic, then
  standard_lat  is  the distance from the center_latitude
  to the standard parallels, e.g.,  the  latitudes  where
  the cone intersects the earth.  The default is 5.

  Otherwise, standard_lat does not  apply.   standard_lat
  is    not   used   by   master2   or   master4   unless
  estim_center=no.

rotate_angle
  This parameter allows  the  north  end  of  the  master
  dataset  to  be  rotated  clockwise through this angle.
  Normally, line 1 is the northern most line.  The  valid
  range is [-180 to 180].  The default is 0.

  rotate_angle is not used by master2 or  master4  unless
  estim_center=no.

move_center, new_center_lat, new_center_lon
  Option in master to move the master dataset center away
  from     the     mathematical     projection    center.
  new_center_lat and  new_center_lon  are  used  only  if
  move_center=yes.   See  formats(7)  for ways to specify
  latitude and longitude.

  When projection=polarstereo, move_center is  not  used.
  The  center  of the master dataset is _m_o_v_e_d to the user
  specified center_lat and center_lon.  See the Exception
  noted above.

EXAMPLES
This example illustrates the building of a base map  located
in  the  vicinity  of  the  Hawaiian  Islands.  The base map
defines an approximately square area, 1024x1.1132 kilometers
on a side.

[1] % master
output file     : char(255) ? [Master]
projection      : char( 13) ? rect
center_lat      : char( 15) ? 21 N
center_lon      : char( 15) ? 157 W
num_lines       : int       ? 1024



TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           4






MASTER(1)               TeraScan Command                MASTER(1)



num_samples     : int       ? 1024
pixel_width     : real      ? [1.1132]
pixel_height    : real      ? [1.1132]
rotate_angle    : real      ? [0]
move_center     : char(  3) ? [yes]

The next two examples illustrate the usage of master2.   The
master  datasets  are  bounded by the rectangle [30n, 50n] X
[120w,   90w].    Both   methods   for   controlling   pixel
width/height aspect ratio are shown.

% master2
output file    : char(255) ? [Master]
projection     : char( 13) ? stereo
min_lat        : char( 15) ? 30 n
max_lat        : char( 15) ? 50 n
min_lon        : char( 15) ? 120 w
max_lon        : char( 15) ? 90 w
square_aspect  : char(  3) ? [yes]
num_samples    : int       ? 1000
master2: 836 lines, 1000 samples,
      2.91724 km pixel height, 2.91724 km pixel width
%
% master2
output file    : char(255) ? [Master]
projection     : char( 13) ? stereo
min_lat        : char( 15) ? 30 n
max_lat        : char( 15) ? 50 n
min_lon        : char( 15) ? 120 w
max_lon        : char( 15) ? 90 w
square_aspect  : char(  3) ? [yes] n
num_lines      : int       ? 850
num_samples    : int       ? 1000
master2: 850 lines, 1000 samples,
      2.86643 km pixel height, 2.91724 km pixel width

The last example illustrates the usage  of  master4.   Note,
that  because the projection is rectangular, and the corners
are _p_e_r_f_e_c_t, the pixel errors  are  extremely  small.   This
would not normally be the case with other projections.

% master4
output file    : char(255) ? [Master]
projection     : char( 13) ? [utm] rect
estim_center   : char(  3) ? [yes]
num_lines      : int       ? 1024
num_samples    : int       ? 1024
up_left_lat    : char( 15) ? 40n
up_left_lon    : char( 15) ? 140w
low_left_lat   : char( 15) ? 30n
low_left_lon   : char( 15) ? 140w
up_right_lat   : char( 15) ? 45n



TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           5






MASTER(1)               TeraScan Command                MASTER(1)



up_right_lon   : char( 15) ? 120w
low_right_lat  : char( 15) ? 35n
low_right_lon  : char( 15) ? 120w
Pixel errors: max = 5.08423e-13, mean = 4.21531e-13, std dev = 1.97176e-13
%

SEE ALSO
etx(7), formats(7), fastreg(1).

NOTES
master4 uses least squares to determine the _b_e_s_t values  for
the et_affine attribute.  Pixel height, width, and the angle
of rotation are encoded within this attribute.   The  affine
transform is discussed in the etx(7) man page.









































TeraScan    Last change: $Date: 1995/04/10 20:07:11 $           6