etxinfo - Reports information about dataset earth location

SYNOPSIS

etxinfo  [ parameter=value ]  [ inputfile ]

Parameters are: varname, item, line_divs, sample_divs, target_lat, target_lon, target_line, target_sample, std_format, real_output, corner_edges.

DESCRIPTION

etxinfo calculates and reports specific information about dataset earth location. The first pair of X/Y coordinate dimensions or the user-specified varname's coordinate dimensions are used as the basis of these calculations. Assume that the sizes of the X/Y coordinate dimensions are ns and nl respectively, and that dimension indexes are 1-relative. Let ml = (nl +1)/2 and ms = (ns +1)/2. Then any or all of the following items can be calculated:

 
center_lat, center_lon, center_sun
(lat, lon, sun elev) at (y, x) = (ml, ms)
pixel_width
distance from (y, x) = (ml, ms -.5) to (ml, ms +.5)
pixel_height
distance from (y, x) = (ml -.5, ms) to (ml +.5, ms)
total_width
length along (y, x) = (ml, .5) to (ml, ns +.5)
total_height
length along (y, x) = (.5, ms) to (nl +.5, ms)
upper_left_lat, upper_left_lon, upper_left_sun, upper_left_sat
(lat, lon, sun elev, sat_elev) at (y, x) = (1 -DL, 1 -DS)
upper_right_lat, upper_right_lon, upper_right_sun, upper_right_sat
(lat, lon, sun elev, sat_elev) at (y, x) = (1 -DL, ns +DS)
lower_left_lat, lower_left_lon, lower_left_sun, lower_left_sat
(lat, lon, sun elev, sat elev) at (y, x) = (nl +DL, 1 -DS)
lower_right_lat, lower_right_lon, lower_right_sun, lower_right_sat
(lat, lon, sun elev, sat elev) at (y, x) = (nl +DL, ns +DS)
upper_edge_len
length along (y, x) = (1 -DL, .5) to (1 -DL, ns +.5)
lower_edge_len
length along (y, x) = (nl +DL, .5) to (nl +DL, ns +.5)
left_edge_len
length along (y, x) = (.5, 1 -DS) to (nl +.5, 1 -DS)
right_edge_len
length along (y, x) = (.5, ns +DS) to (nl +.5, ns +DS)
mid_upper_lat, mid_upper_lon, mid_upper_sun
(lat, lon, sun elev) at (y, x) = (1 -DL, ms)
mid_lower_lat, mid_lower_lon, mid_lower_sun
(lat, lon, sun elev) at (y, x) = (nl +DL, ms)
mid_left_lat, mid_left_lon, mid_left_sun
(lat, lon, sun elev) at (y, x) = (ml, 1 -DS)
mid_right_lat, mid_right_lon, mid_right, sun
(lat, lon, sun elev) at (y, x) = (ml, ns +DS)
gcp_mesh
(line, sample, lat, lon) at mesh points
target_lat, target_lon
(lat, lon) at (target_line, target_sample)
target_line, target_sample, target_sun
(line, sample, sun elev) at (target_lat, target_lon)
 
sat_sub_lat, sat_sub_lon
(sat subpoint lat, sat subpoint lon) at (ml, ms)

In the above equations, DL = DS = .5 if the parameter corner_edges=yes. Otherwise DL = DS = 0.

Output is reported to UNIX stdout. Distances and lengths are output in kilometers. Lengths are not simple distances; they are cumulative.

If all items are reported, or stdout is a tty, each item is labelled. Otherwise, just the item value is output.

For simplicity, all items do not include gcp_mesh, target_lat, target_lon, target_line, target_sample.

Also, lat_lon refers to target_lat and target_lon.

Finally, line_sample refers to target_line and target_sample.

PARAMETERS

varname
OPTIONAL. The image variable whose X/Y dimensions will be used in calculations. If the default value varname="" is selected, the first pair of X/Y coordinate dimensions will be used.
item
OPTIONAL. This parameter can be set to all or any of the output items listed above. The default is item=all.
target_line, target_sample
Target line, sample coordinates. Required if item is target_lat, target_lon, or lat_lon. There is no default.
target_lat, target_lon
Target latitude, longitude coordinates. Required if item is target_line, target_sample, target_sun or line_sample. There is no default.
line_divs, sample_divs
OPTIONAL. Number of line and sample mesh divisions, if item = gcp_mesh. The number of line mesh points = line_divs +1. The number of sample mesh points = sample_divs +1. Both line_divs and sample_divs must be be greater than 0. The default for each is 2.
corner_edges
OPTIONAL. If corner_edges=yes, then DL = DS = .5 in the above equations. Otherwise DL = DS = 0. The default is corner_edges=yes.
std_format
OPTIONAL. If std_format=yes, latitudes and longitudes are output in TeraScan standard format, e.g., 34 30.00 n or 120 45.00 w . See formats. If std_format=no, latitudes and longitudes are output as signed numbers, e.g., 34.5000 or -120.7500.
If item=all, the default is std_format=yes. Otherwise the default is std_format=no.
real_output
OPTIONAL. Used only if std_format=no and item is not gcp_mesh. If real_output=yes, all values are output as real numbers with decimal places. Otherwise, all values are output as integers.
If item=all, the default is real_output=yes. Otherwise the default is real_output=no.

EXAMPLES

The following example shows etxinfo for a master file based on a rectangular projection. As expected for this projection,

left_edge_len = total_height = right_edge_len

upper_edge_len < total_width < lower_edge_len

total_width = num_samples * pixel_width

total_heigtht = num_lines * pixel_height

% master MRECT projection : char( 13) ? rect center_lat : char( 15) ? 34 30 n center_lon : char( 15) ? 120 45 w num_lines : int ? 512 num_samples : int ? 640 pixel_width : real ? [1.1132] pixel_height : real ? [1.1132] rotate_angle : real ? [0] move_center : char( 3) ? [no]

% etxinfo MRECT varname : char( 31) ? []

center_lat : 34 30.00 N center_lon : 120 45.00 W pixel_width : 1.1132 pixel_height : 1.1132 total_width : 712.4480 total_height : 569.9584

upper_edge_len : 689.8663 lower_edge_len : 733.6076 left_edge_len : 569.9584 right_edge_len : 569.9584

upper_left_lat : 37 3.60 N upper_left_lon : 124 37.97 W upper_right_lat : 37 3.60 N upper_right_lon : 116 52.03 W lower_left_lat : 31 56.40 N lower_left_lon : 124 37.97 W lower_right_lat : 31 56.40 N lower_right_lon : 116 52.03 W

mid_left_lat : 34 30.00 N mid_left_lon : 124 37.97 W mid_right_lat : 34 30.00 N mid_right_lon : 116 52.03 W mid_upper_lat : 37 3.60 N mid_upper_lon : 120 45.00 W mid_lower_lat : 31 56.40 N mid_lower_lon : 120 45.00 W

center_sun : unknown upper_left_sun : unknown upper_right_sun : unknown lower_left_sun : unknown lower_right_sun : unknown mid_left_sun : unknown mid_right_sun : unknown mid_lower_sun : unknown mid_upper_sun : unknown

SEE ALSO

datasets, formats, passinfo, getinfo


Last Update: $Date: 1998/08/31 17:31:52 $