c_rtcoef - Finds transformation coefficients that map image coordinates to projection coordinates

SYNTAX

FUNCTION c_rtcoef (proj_coord, image_coord, coef, flag)

     double             proj_coord[8];
     long               image_coord[8];
     double             coef[6];
     long              *flag;

PARAMETERS

proj_coord (input, double, length (8))

Input image corner projection coordinates. The eight elements are ordered as follows:

          [0] = upper left y
          [1] = upper left x
          [2] = lower left y
          [3] = lower left x
          [4] = upper right y
          [5] = upper right x
          [6] = lower right y
          [7] = lower right x

image_coord (input, long, length (8))

Input image corner line, sample coordinates. The eight elements are ordered as follows:

          [0] = upper left y
          [1] = upper left x
          [2] = lower left y
          [3] = lower left x
          [4] = upper right y
          [5] = upper right x
          [6] = lower right y
          [7] = lower right x

coefs (output, double, length (6))

Coefficients mapping image coordinates to projection coordinates, including projection coordinate systems which are rotated from the image coordinate system. The coefficients are applied as follows.

          proj_y = (coef[0] * line) + (coef[1] * sample) + coef[2];
          proj_x = (coef[3] * line) + (coef[4] * sample) + coef[5];

flag (input, long)

TRUE or FALSE. Suppresses the printing of error messages if set to FALSE.

DESCRIPTION

c_rtcoef() calculates first order polynomial coefficients mapping image coordinates to projection coordinates of a rotated projection space using four common points in each coordinate system.

RETURN VALUE

c_rtcoef() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed