master, master2, master4 - Generates a base map and projection for a user specified
area.
SYNOPSIS
master [ parameter=value ... ] [ outputfile ]
master2 [ parameter=value ... ] [ outputfile ]
master4 [ parameter=value ... ] [ outputfile ]
Parameters for master are: projection, center_lat, center_lon, num_lines, num_samples, pixel_width, pixel_height, standard_lat, rotate_angle, earth_radius, flattening, 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, earth_radius, flattening, corner_edges, standard_lat, view_radians, rotate_angle.
Parameters for master4 are: projection, estim_center, center_lat, center_lon, rotate_angle, standard_lat, earth_radius, flattening, corner_edges, view_radians, 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. 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 dataset.
Master datasets contain two dimensions line and sample, 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 over which various overlays (geopolitical
boundaries, lat/lon grids) can be drawn.
PARAMETERS
- projection
- Name of the map projection. Valid responses are (stereographic, rectangular,
orthographic, polarstereo, equidist_azim, mercator, utm, polyconic, lambert_azim,
lambert_conic, albers_conic, mollweide, cylindrical, perspective).
There is no default.
- polarstereo is not supported by master2.
- polarstereo, lambert_conic, and albers_conic projections 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, cylindrical and mercator
projections 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, 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 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 moved 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 master4
unless estim_center=no.
- min_lat, max_lat
- Latitude limits used by master2. See formats
for valid ways to specify latitude. min_lat must be less than max_lat. There
is no default.
-
- corner_edges
- For master2, if corner_edges=yes, latitude and
longitude limits refer to the outer edges of the outer pixels. If corner_edges=no,
latitude and longitude limits refer to the centers of the outer pixels. The default is corner_edges=yes
- For master4, if corner_edges=yes, latitudes and
longitudes apply to the outer corner of the corner pixels. If corner_edges=no,
latitudes and longitudes apply to the centers of the corner pixels.
- The default is corner_edges=yes
-
- min_lon, max_lon
- Longitude limits used by master2. See formats
for valid ways to specify longitude. min_lat is the leftmost 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 for valid ways to specify latitude and
longitude. 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 for valid ways to specify latitude and
longitude. 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
limits and num_samples. In this 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.
- Valid responses are (yes, no). The default is yes.
- 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 [.001, 1000.]. The
default is 1.1132 km = 0.01*(degree of latitude). These parameters are used only by
master.
- standard_lat
- If projection=polarstereo or projection=cylindrical, then standard_lat
is the standard parallel of the projection, e.g., the latitude at which the plane
intersects the earth. The default for polarstereo is 70. The default for cylindrical
is the value of center_lat.
- 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.
-
view_radians
- If projection=perspective, then view_radians is the
radius of the viewing point in space measured in radians. The valid range is [1.,
10.]. The default is 6.611, which is the approximate orbital
radius for geostationary satellites.
-
- earth_radius
- Earth equatorial radius. The default is 6378.137 kilometers (WGS84). This parameter is
OPTIONAL for master and master2, and must be supplied on
the command line. The user is prompted for this parameter in master4.
-
- flattening
- Earth flattening. The default is 0.003352810665 (WGS84). Note that flattening does not
apply to those projections based on a spherical earth. This parameter is OPTIONAL for master
and master2, and must be supplied on the command line. The user is
prompted for this parameter in master4.
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 for ways to specify latitude and
longitude.
- When projection=polarstereo, move_center is not used. The center of the
master dataset is moved 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.
% 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
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 perfect, 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
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, formats,
fastreg.
NOTES
master4 uses least squares to determine the best values for the et_affine
attribute. Pixel height, width, and the angle of rotation are encoded within this
attribute. The affine transform is discussed on the etx
page.
Last Update: $Date: 1998/09/01 21:57:23 $