Help for RPC2CUBE

PURPOSE
     The RPC's in a label give the transformation of a non-orthorectified image
     (line,sample) to rectified (lon,lat) coordinates.  Mathematically, the
     equations (RPF's) are reversed from lon-lat to line-sample.  This routine
     creates an ultrafine grid (should be finer than the underlying DTED used)
     that is equivalent to the transformations.

     The cubic form of the grid is useful for solving for rpc's.  A spacecraft
     modelled distortion to the cube of points can be used to update an rpc.  It
     is envisioned that the spacecraft angles can be updated this way.
	   
CALL

There are two modes

     rpc2cube INP=rpcim OUT=outgrid NAH=nah NAV=nav NAZ=naz DZ=dz
  WHERE:
     rpcim          is the input data set (must have a GeoTIFF label with RPC's)
     dted           is a dted data set (must have a GeoTIFF label, lon-lat)
     outgrid        is the output ultrafine grid cols=(lon,lat,elv,line,samp)
     nah            is the number of areas horizontally in the grid (points-1)
     nav            is the number of areas vertically in the grid (points-1)
     naz            is the number of areas in the z direction in the grid (points-1)
     dz             is the distance between the elevation layers

and

     rpc2cube INP=(rpcim,dted) OUT=outgrid NAH=nah NAV=nav NAZ=naz DZ=dz LON1=lon1                 LAT1=lat1 LON2=lon2 ...etc
  WHERE:
     rpcim          is the input data set (must have a GeoTIFF label with RPC's)
     dted           is a dted data set (must have a GeoTIFF label, lon-lat)
     outgrid        is the output ultrafine grid cols=(lon,lat,elv,line,samp)
     nah            is the number of areas horizontally in the grid (points-1)
     nav            is the number of areas vertically in the grid (points-1)
     naz            is the number of areas in the z direction in the grid (points-1)
     dz             is the distance between the elevation layers
     lon1,lat1      is the first corner in clockwise order
     lon2,lat2      is the second corner in clockwise order
     lon3,lat3      is the third corner in clockwise order
     lon4,lat4      is the fourth corner in clockwise order
  
OPERATION

In mode one, the corner (lon,lat) points are obtained from the label (these should
always be present for RPC labels).  The corners are enlarged outward by 5% so the
generated quadrangle will cover the image data better.

In mode two, the (lon,lat) points are given by the user.  The user should take care
to cover data.

Then the dted us used to look up elevation for each point using bilinear interp-
olation.  Then the RPCFWD routine is used to calculate (line,sample) for each
point.

The columns are always in that order.  The ncols parameter can add extra columns to
the file.

PERFORMANCE

The file is (nah+1)*(NAV+1)*(NAZ+1) in length.  Almost all of the time will be spent in
RPCFWD.

Restrictions
------------



Original Programmer: A. L. Zobrist, 16 Mar, 2005
Current Cognizant Programmer: A. L. Zobrist
2022-08-10 B. Crocco afids to opensource (untested)


PARAMETERS:


INP

Input file with GeoTIFF, RPC's and a DTED file

OUT

Output file name, ultra-fine grid for image warping

NCOL

Number of columns to put in grid

NAH

Number of areas horizontally

NAV

Number of areas vertically

NAZ

Number of areas in elevation

LON1

Longitude of 1st corner point clockwise

LAT1

Latitude of 1st corner point clockwise

LON2

Longitude of 2d corner point clockwise

LAT2

Latitude of 2d corner point clockwise

LON3

Longitude of 3d corner point clockwise

LAT3

Latitude of 3d corner point clockwise

LON4

Longitude of 4th corner point clockwise

LAT4

Latitude of 4th corner point clockwise

DZ

distance (meters) between elevation layers .END

See Examples:


Cognizant Programmer: