User's Guide

RELIEF2

Corrects ground control points for relief displacement

Function:

Corrects ground control points for relief displacement (see figures 1 and 2) in MSS, TM, or other non-standard Landsat formats. Corrections are made relative to a user-entered datum.

Parameters:

Subcommand -MSS:
Apply relief displacement to control points for an MSS scene in EOSAT format. The default parameters assume processing of a full MSS scene.

INTL
Input tie point location file. This file contains control points which are to be adjusted for the effects of relief. The unit of measure of the coordinates is specified in the file header record. This file can be created, for example, by merging the TPS files created by TIEPTS.

OUTTL
Output tie point location file. This file contains the adjusted coordinates. The unit of measure of the coordinates is described in the INTL header record.

PIXSIZ(57.0)
Pixel size. The pixel size in meters of the image whose control points are being corrected for relief displacement.

DATUM(0.0)
Reference datum. The elevation, relative to sea level, to which the relief displacement is adjusted. If a pixel-by-pixel terrain correction is to be performed, DATUM should be set to zero. The units of DATUM are specified in DATUNIT.

DATUNIT("METERS")
Datum unit. The unit of measure for DATUM:

  = Meters:  DATUM is in meters.
  = Feet:    DATUM is in feet.

NL(2983)
Number of lines. The number of lines in the image. The default value represents the standard size of an image.

NS(3548)
Number of samples. The number of samples in the image. The default value represents the standard size of an image.

NSVAL(3243)
Number of valid samples. The number of samples of valid image data excluding fill. This is used to calculate the slope of the nadir in the image. NSVAL is different from NS because there should always be some fill values.

PRINT("TERM")
Output destination. The destination of the output which contains the original tie point locations and the adjusted tie point locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's 
               terminal.
  = LP:        Line printer.  Output is sent to the 
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent 
               to the user-supplied file with the 
               extension ";prt".
Subcommand -TM:
Apply relief displacement to control points for an EOSAT TM scene. The default parameters assume processing of a full TM scene.

INTL
Input tie point location file. This file contains control points which are to be adjusted for the effects of relief. The unit of measure of the coordinates is specified in the file header record. This file can be created, for example, by merging the TPS files created by TIEPTS.

OUTTL
Output tie point location file. This file contains the adjusted coordinates. The unit of measure of the coordinates is described in the INTL header record.

PIXSIZ(28.5)
Pixel size. The pixel size in meters of the image whose control points are being corrected for relief displacement.

DATUM(0.0)
Reference datum. The elevation, relative to sea level, to which the relief displacement is adjusted. If a pixel-by-pixel terrain correction is to be performed, DATUM should be set to zero. The units of DATUM are specified in DATUNIT.

DATUNIT("METERS")
Datum unit. The unit of measure for DATUM:

  = Meters:  DATUM is in meters.
  = Feet:    DATUM is in feet.

NL(5965)
Number of lines. The number of lines in the image. The default value represents the standard size of an image.

NS(6967)
Number of samples. The number of samples in the image. The default value represents the standard size of an image.

NSVAL(6458)
Number of valid samples. The number of samples of valid image data excluding fill. This is used to calculate the slope of the nadir in the image. NSVAL is different from NS because there should always be some fill values.

PRINT("TERM")
Output destination. The destination of the output which contains the original tie point locations and the adjusted tie point locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's 
               terminal.
  = LP:        Line printer.  Output is sent to the 
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent 
               to the user-supplied file with the 
               extension ";prt".
Subcommand -NONSTAND:
Apply relief displacement to control points for an image in a non-standard format (see User Note 5). Processing of an entire image is assumed.

INTL
Input tie point location file. This file contains control points which are to be adjusted for the effects of relief. The unit of measure of the coordinates is specified in the file header record. This file can be created, for example, by merging the TPS files created by TIEPTS.

OUTTL
Output tie point location file. This file contains the adjusted coordinates. The unit of measure of the coordinates is described in the INTL header record.

IN
Input image. The four valid image corners will be found from the first band of this image. An associated labeled table, IN;lt, will be created containing these corner values (see User Note 4). IN must contain the full image. IN will be ignored if INLT is specified. If INLT is NULL, IN must be specified.

PIXSIZ
Pixel size. The pixel size in meters of the image whose control points are being corrected for relief displacement.

INLT(--)
Input labeled table file. Contains the four corners of valid image data (see User Note 4). If INLT is NULL, IN must be specified.

FILLVAL(0)
Fill value. The value of the fill that surrounds the image data. If a range of values exist, the first value is the lower bound and the second value will be considered the upper bound. Two ranges can be specified by setting

FILLVAL=(lower_value1 upper_value1 lower_value2 upper_value2).

DATUM(0.0)
Reference datum. The elevation, relative to sea level, to which the relief displacement is adjusted. If a pixel-by-pixel terrain correction is to be performed, DATUM should be set to zero. The units of DATUM are specified in DATUNIT.

DATUNIT("METERS")
Datum unit. The unit of measure for DATUM:

  = Meters:  DATUM is in meters.
  = Feet:    DATUM is in feet.

PRINT("TERM")
Output destination. The destination of the output which contains the original tie point locations and the adjusted tie point locations.

  = --:        No Report
  = TERM:      Terminal.  Output is sent to the user's 
               terminal.
  = LP:        Line printer.  Output is sent to the 
               printer defined by $PRINTER.
  = Filename:  User-supplied filename.  Output is sent 
               to the user-supplied file with the 
               extension ";prt".

Example:

  1. LAS> relief2-tm intl=control outtl=adjust datum=1341.12

    Control points (search image tie points) obtained from a full scene EOSAT formatted Landsat TM image are adjusted. The search points in CONTROL;TPL are corrected for relief displacement errors at a DATUM height of 1341.12 meters and are written to ADJUST;TPL. The results are reported to the terminal.

  2. LAS> relief2-nonstand intl=control outtl=adjust inlt=corners datum=1023.28

    Control points (search image tie points) obtained from a full scene non-standard formatted Landsat image are adjusted. The labeled table file, CORNERS;LT, contains the corner line/sample coordinates in clockwise order from the upper left corner. The search points in CONTROL;TPL are corrected for relief displacement errors at a DATUM height of 1023.28 meters and are written to ADJUST;TPL. The results are reported to the terminal.

Description/Algorithm:

The tie point location (TPL) file containing the control points to be adjusted for the effects of relief displacement is opened and its header data read. The output tie point location file is then opened, and the header record from the input file is copied to the output file.

For standard TM and MSS formats, the center latitude is calculated from the corner projection information from the TPL file header.

For non-standard formats, the slope and intercept of nadir is calculated by using the line/sample corner points in INLT.LT (see User Note 4). The center coordinate on the top of the valid image data is found by

    top_center_y = (ul_line + ur_line) / 2
    top_center_x = ((ur_sample - ul_sample) / 2) + ul_sample

The bottom center coordinate is found by

    bottom_center_y = (ll_line + lr_line) / 2
    bottom_center_x = ((lr_sample - ll_sample) / 2) + ll_sample

The slope and intercept of nadir is calculated by

    slope = (top_center_y - bottom_center_y) / (top_center_x - bottom_center_x)
    y_intercept = -(slope) * top_center_x + top_center_y

As each point record is read, the search image coordinates are adjusted for relief displacement effects in the following manner:

The NADIR pixel location is calculated for standard TM and MSS
formats by
   
    nadir = y_intercept + slope * line_number.

For non-standard formats, the nadir location is calculated by

    nadir = (line_number - y_intercept) / slope

Once the nadir location is found, the ground-range distance (S) which is related to the scan angle (d) is calculated from (see figure 3):

    S = pixel_size * (sample - nadir)

and (d) is found using the equations below;

    s = S / RE

    LOS = sqrt(RE^2 + (RE + ALT)^2 - 2.0 * RE * (RE + ALT) * cos(s))

    d = asin((RE / LOS) * sin(s))

    dd = (RE + ALT) * h * d / (RE * (ALT - h))

d is then used to calculate z;

    z = asin((RE + ALT)/(RE + H) * sin(d + dd))

d, z, s are used to calculate ds;

    ds = z - s  + -d + dd 
 
    DS = ds * RE

    change_in_pixel = DS / pixel_size

Each record is written to the output file and to a report.

Nonfatal Error Messages:

    None.

Fatal Error Message:

  1. [relief2-fatal] Fatal error encountered

    The message displayed immediately preceding this message is the specific error encountered. Processing is terminated.

  2. [relief2-ltexist] Labeled table file already exists

    INLT was NULL but a labeled table file associated with IN exists on disk. If this labeled table file represents the corner points (see User Note 4), re-run specifying INLT. If not, the labeled table file must be removed or renamed.

  3. [relief2-ltfile] Either IN or INLT must be specified

    For non-standard formats, either IN or INLT must be specified to retrieve valid image corners. Re-run specifying INLT if a labeled table exists or IN if one must be developed.

  4. [relief2-ltlocate] Error locating labeled table file

    A labeled table file was specified but could not be opened. Ensure that the file exists. If no labeled table file exists, specify IN and set INLT to NULL.

  5. [relief2-ltread] Error reading labeled table file

    The labeled table file could not be read. Be sure that the labeled table file is in the proper format (see User Note 4).

  6. [relief2-noproj] Projection information not available from header

    The projection information in INFILE;TPL is invalid. Re-run with valid header information in the tie point location file.

User Notes:

  1. This function can be used to correct for errors due to relief displacement in control points whenever elevations are available for each point pair. RELIEF2 will correct the control points to a reference datum as specified by DATUM. By correcting the control points, relief is not introduced into the geometric model; relief in the imagery is not corrected at all. The data is assumed to be in UTM, TM, or SOM projections where no rotation from the raw data has been performed since relief is performed in only the sample direction.

  2. This function is normally used just prior to the control tie point modeling step, usually performed by POLYFIT.

  3. RELIEF2 differs from RELIEF by calculating the NADIR pixel for each line instead of assuming that a straight line with the center in the middle of the scene describes the NADIR pixels. Some imagery is sloped along with the NADIR line.

  4. IMGCORNER can be used to create an input labeled table file containing the four valid corners of the image. These corners differ from the DDR and TPL file corners in that they represent valid image data without the fill and are needed to find the nadir pixel of a line for non-standard images. If INLT is specified, the labeled table file has already been created. If INLT is NULL, IMGCORNER is called to create this labeled table from the first band of IN. The format of the labeled table, INLT;lt, follows:

    		;
    		"SCENE1","CORNER COORDINATES - UL,UR,LR,LL";
    		"POLYGON","I4","POLYGON NUMBER",1,1
    		"LINE","I4","CORNER LINE NUMBER",1,1
    		"SAMPLE","I4","CORNER SAMPLE NUMBER",1,1;
    		1,3,209;
    		1,3,3319;
    		1,3173,3121;
    		1,3178,8;
    

  5. Non-standard formats may be MSS or TM scenes; however, they need not be EOSAT scenes. Images from foreign ground stations should be processed using RELIEF2-NONSTAND, especially when the fill area of an image is uneven on the left and right sides or uneven on the top and bottom.

                               Figure 1
    

                               Figure 2
    

                               Figure 3