addheader (image)
Description
addheader (written by A. Y. / JCU, July 1990) converts an ACRES-format Landsat MSS image into a scanline-headed landsat_rec file (landsat.h), attaching nominal WRS-1/WRS-2 orbital track parameters (path, row, scene center latitude/longitude, altitude, track azimuth, and across/along-track pixel dimensions) to every scanline.
CLI Options & Usage
addheader -in <acres_file> -out <landsat_rec_file> \
-path <n> -row <n> -cent_lat <deg> -cent_lon <deg> [-blue]
-in <acres_file>: Input ACRES-format Landsat image (with 90-byte header).-out <landsat_rec_file>: Outputlandsat_recscanline file.-path <n> -row <n>: Landsat World Reference System path and row numbers.-cent_lat <deg> -cent_lon <deg>: Scene center latitude and longitude in decimal degrees.-blue: Sets theblueband indicator flag (1) in the output scanline header.
Algorithm
- Reads the 90-byte ACRES header from
<acres_file>and initializes default Landsat MSS orbital geometry:scan_pixel_size = 56.0 m,track_pixel_size = 79.0 m,altitude = 918.0 km, and nominal descending track azimuthazi = 190.0°. - Computes the geographic coordinates
(start_lat, start_lon)of the top-center pixel (row 0) from(cent_lat, cent_lon)by projecting backward alongazi - 180°over1170scanlines (1170 à 79 m) usinggeog_posn(). - Steps through all
2340scanlines, advancing(lat, lon)alongazibytrack_pixel_size(79 m) per row and writing alandsat_recstructure (header +3240pixel bytes) for each line. Fine ground-control registration can then be applied usingcontrol_points.