User's Guide

RECTIFY

Generate a geometric mapping grid and optionally generate an angles grid.

Function:

Generates a geometric mapping grid and optionally generates an angles grid. The geometric mapping grid defines a transformation from the image's current projection to another projection. This grid can then be used by GEOM to transform the image into a new projection.

The angles grid contains the satellite zenith, the solar zenith, and the relative azimuth angles .

Parameters:

IN
Input image. The image file which has the navigation and navigation height files associated with it. Input projection information and location information is obtained from the associated files, IPROJKEY parameter, and PIXSIZ parameter.

INPROJ
Input projection definition file. This file contains projection-related information describing the image projection. INPROJ can contain more than one set of projection parameters for input and output. IPROJKEY and OPROJKEY specify the projection to be used. If there are two sets of projection parameters with the same projection key, the first one is used.

INPROJ is generated by PROJPRM. A description of the file may be found in the LAS Programmer's Manual. INPROJ is a labeled table file; the format has limited flexibility. It must have attributes of PROJKEY, PROJTYPE, PROJZONE, PROJUNITS, PROJSPH, and PROJPARMS.

COORS
Coordinates. These coordinates are used to define the frame of the output area. Coordinates are entered as Y (latitude or northing), and X (longitude or easting). Three modes of processing are possible:


o  When four values are specified and COORUNIT = DMS,
   RAD, SEC, or DEG, the upper-left corner and
   lower-right corner of a geographic input space are 
   defined.  These corner coordinates, along with the
   pixel dimensions, make up the framing parameters.
   The framing parameters are projected into the
   specified output projection space, and minimums
   and maximums in X and Y are recorded along the
   borders of the projected space.  These minimums
   and maximums are used to define the boundaries of
   the output space.

o  When four values are specified and COORUNIT = PRO,
   a coordinate somewhere within the output space
   frame and the lower-right corner coordinate in the
   output projection space are given.  The first
   coordinate is paired with the LSCOOR parameter and
   is adjusted internally to pixel 1,1.  These
   coordinates are the minimum and maximums in X and
   Y and are used to define the boundaries of the
   output space.

o  When two values are specified and COORUNIT = PRO,
   a coordinate somewhere within the output space
   frame is given.  This coordinate is paired with
   the LSCOOR parameter to determine the upper-left
   corner coordinate in the output space.  This
   mode of processing requires that NL and NS are
   also given.  When the NL and NS values are
   combined with the PIXSIZ parameter, the lower-
   right corner of the output space projection can
   be found, giving minimum and maximum coordinates
   in X and Y, thereby defining the boundaries of
   the output space.

GEOGRID
Geometric mapping grid. File containing the geometric mapping grid, statistical information related to the gridding process, and projection and framing information of the output space.

ANGGRID(--)
Angles grid. File containing the satellite and solar zenith angles and the relative azimuth angle.

ELEV(--)
Elevation image. The image supplying the elevation in meters for each pixel of the output image. If an image is not supplied, the elevation for each pixel will be set to zero.

OZONE(--)
Ozone image. The image supplying the ozone measurements for each pixel of the output image. If an image is not supplied, the ozone values will be set to zero.

WATER(--)
Water vapor image. The image supplying the water vapor measurements for each pixel of the output image. If an image is not supplied, the water vapor values will be set to zero.

OPROJKEY(--)
Output projection key. The key of the projection system in INPROJ which describes the output coordinate system. When the null value is given, the first set of projection parameters in INPROJ is used.

PIXSIZ(1000)
Pixel dimensions. PIXSIZ defines the dimension of each pixel in the transformed (output) coordinate space.

COORUNIT(DEG)
Coordinate units. The type of units in which COORS are entered.


  = DMS: Deg Min Sec
  = RAD: Radians
  = DEG: Degrees
  = SEC: Seconds
  = PRO: Projection coordinates in output space

LSCOORS(1,1)
Line/sample coordinates. The image coordinates of the first coordinate pair entered in COORS when projection parameters are being specified directly. The default is to the upper-left corner of the output image space (1,1).

NL(--)
Number of lines. The number of lines in the output area, specified when only the first projection coordinate pair is given in COORS.

NS(--)
Number of samples. The number of samples in the output area, specified when only the first projection coordinate pair is given in COORS.

NLGRID(10)
Number of lines per grid. The number of lines contained in each output grid cell.

NSGRID(10)
Number of samples per grid. The number of samples contained in each output grid cell.

PRINT(TERM)
Output destination. The destination of the output.


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

Example:

  1. LAS> rectify in=avhrr inproj=avhrr coors=(41.35 -107.75 37.90 -100.10) geogrid=avhrr anggrid=avhrr atmgrid=avhrr elev=elev oprojkey=out pixsiz=1100 coorunit=deg print=(term,lp)

    The output projection information for avhrr;img is obtained from the projection definition file avhrr;proj using a key of "OUT". The output image is framed around an upper-left latitude/longitude of 41.35 degrees north, 107.75 degrees west and a lower-right corner of 37.90 degrees north, 100.10 degrees west. World elevation data is contained in elev;img. The pixel size of the output image is 1100 meters in the line direction by 1100 meters in the sample direction. The resulting geometric mapping grid is saved in avhrr;grid, the angles grid is saved in avhrr;ang. A summary is displayed on the terminal and printed to the printer defined by the TAE global variable $PRINTER.

Description/Algorithm:

RECTIFY determines the input and output space (image) framing and projection parameters.

The projection parameters for the output space are read from the projection definition file using the INPROJ and OPROJKEY parameters and the output pixel size is determined from the PIXSIZ parameter. Three methods are provided for specifying the output space frame:

  Method 1:

     o  The user defines the upper-left and lower-right corner
        coordinates of the area of interest in geographic
        coordinates.  This forms a rectangle in geographic
        coordinates.

     o  This rectangular space is projected into the output
        projection coordinate system.  This usually results in a
        nonrectangular area.

     o  The boundaries of this projected area are searched for
        minimum and maximum X and Y coordinates in the output
        projection coordinate system.  This forms a minimum
        bounding rectangle in the output space of the area of
        interest.
     
     o  The upper-left corner (the minimum X, maximum Y) is
        adjusted outward to the next X and Y multiples of the
        pixel size, an arbitrary step which simplifies the
        combining of images with different scales.  It does not
        alter the internal image geometry, it slightly adjusts
        the size of the image frame.

     o  The upper-left corner projection coordinate is assigned
        to image coordinate (1,1).

  Method 2:

     o  The user defines:  

        a.  An output space projection coordinate at some image
            coordinate defined by LSCOOR.  When LSCOOR defaults
            to image coordinate (1,1), the output space
            coordinate given is the upper-left corner of the
            output space.  

        b.  The lower-right corner in the output projection
            space.

     o  RECTIFY adjusts the first coordinate given to image
        coordinate (1,1) to get the minimum X and the maximum
        Y projection coordinate.  The second coordinate pair
        given is the maximum X and the minimum Y coordinate.
        The output space is now defined.


  Method 3:

     o  The user defines an output space projection coordinate
        at some image coordinate defined by LSCOOR, as in Method
        2.

     o  The user enters the number of output image lines and
        samples.

     o  The coordinate entered is adjusted to image coordinate
        (1,1) to get the minimum X and the maximum Y projection
        coordinates.

     o  The maximum X and minimum Y coordinates are calculated
        using PIXSIZ and the number of lines and samples from
        the minimum X and maximum Y projection coordinate.

When a transformation has been established, it is applied to create the geometric mapping grid and the grids for the view angles, if requested. The user can control the density of the mapping grid by specifying the number of lines and samples in each grid cell. From these, the number of rows and columns in the geometric mapping grid are calculated.

The output geometric mapping grid contains the mapping grid point values, projection information, and framing information needed by GEOM to fill the output image's DDR.

Nonfatal Error Message:

  1. [rectify-dtype] <xxxxx> image will be read as I*2

    The elevation, ozone, and water vapor images are assumed to be INTEGER*2 images. The specified image has a different data type so its pixel values will be converted to INTEGER*2 when read.

Fatal Error Messages:

  1. [rectify-alloc] Error allocating memory

    An error was encountered allocating memory. If the error persists, contact the system administrator.

  2. [rectify-env] Error retrieving <xxxxx>

    Rectify was unable to retrieve the value of the environment variable <xxxxx>. Ensure this variable is set appropriately.

  3. [rectify-fatal] Fatal error encountered

    A fatal error was encountered. The error message displayed immediately preceding this message is the specific error encountered. Processing terminates.

  4. [rectify-grid] Error creating grid

    An error was encountered while creating one of the geometric mapping grids. Contact the system administrator.

  5. [rectify-ll] Error calculating lat/long

    An error was encountered while computing the latitude and longitude coordinates for the elevation, ozone, and water vapor images. Contact the system administrator.

  6. [rectify-nomap] Unable to rectify to selected output frame

    RECTIFY was unable to create a valid geometric mapping grid for the selected output frame. This occurs mainly with global data sets, due to assumptions made during the process of gridding the output space frame into the geometric mapping grid for the geometric transformation module, GEOM. GEOM performs a locally linear interpolation between grid points. Some projection changes are not representable in this manner.

  7. [rectify-units] <xxxxx> projection units must be degrees

    The projection units of the specified image must be degrees. Ensure the image is in the geographic projection.

User Notes:

  1. The DSPGRID module can be used to display the geometric mapping grid.

  2. For diagrams and more information on the framing and gridding process, refer to the Geometric Manipulation Package Overview Document, GEOMPOD.

  3. Satellite zenith angles are negative from the first scanned pixel to nadir and positive after nadir to pixel 2048.