c_ckunit - Checks a projection unit code

SYNTAX

#include "worgen.h"

FUNCTION c_ckunit (inunit,outunit)

     char               *inunit;
     long               *outunit;

PARAMETERS

inunit (input, character)

Input unit code string. This string is contained in the DDR and must be converted to an integer format for use with the Projection Transformation Package. The routine currently supports the following code strings:

          radians 
          feet 
          meters 
          seconds   (Seconds of arc or arc seconds)
          degrees   (Degrees of arc or arc degrees)
          dms       (Packed DMSDDDMMMSSS.SS)
The input unit string is converted to upper-case thereby allowing the routine to handle case combinations of the above.

outunit (output, long)

Output unit code. This value is an integer code value that can be used with the Projection Transformation Package for unit type conversions. This value will be set to a -1 if an undefined input unit string is specified (or user defined) and can thus be used to check for valid projection unit codes.

DESCRIPTION

The c_ckunit() call is used to return an integer unit code that corresponds to the unit code string stored in the DDR. Because a value of -1 is returned for undefined input unit codes, the routine can also be used to check for valid projection unit codes.

RETURN VALUE

c_ckunit() returns

     E_SUCC (0) --> successful completion 
     E_FAIL (-1) --> undefined input projection unit code