gctp - Initializes projection transformation parameters and performs transformations.

SYNTAX

FUNCTION gctp (incoor, insys, inzone, inparm, inunit, indatum, ipr, efile, jpr, pfile, outcoor, outsys, outzone, outparm, outunit, outdatum, fn27, fn83, iflg)
     double       incoor[2];
     long        *insys;
     long        *inzone;
     double       inparm[15];
     long        *inunit;
     long        *indatum;
     long        *ipr;
     char         efile[];
     long        *jpr;
     char         pfile[];
     double       outcoor[2];
     long        *outsys;
     long        *outzone;
     double       outparm[15];
     long        *outunit;
     long        *outdatum;
     char         fn27[];
     char         fn83[];
     long        *iflg;

PARAMETERS

incoor (input, double, length(2))

Array of two input coordinates (X-Y, Longitude-Latitude, Northing-Easting, etc) to be translated. The nature of the coordinates is defined by insys, inzone, and inunit. The east-west dimension (X, Longitude, Easting) is first followed by the north-south (Y, latitude, Northing).

insys (input, long)

Defines the input projection system. Valid codes are:
     =  0:	GEO      (Geographic) 
     =  1:	UTM      (Universal Transverse Mercator)
     =  2:	SPCS     (State Plane Coordinates)
     =  3:	ALBERS   (Albers Conical Equal Area)
     =  4:	LAMCC    (Lambert Conformal Conic)
     =  5:	MERCAT   (Mercator)
     =  6:	PS       (Polar Stereographic)
     =  7:	POLYC    (Polyconic)
     =  8:	EQUIDC   (Equidistant Conic)
     =  9:	TM       (Transverse Mercator)
     = 10:	STEREO   (Stereographic)
     = 11:	LAMAZ    (Lambert Azimuthal Equal Area)
     = 12:	AZMEQD   (Azimuthal Equidistant)
     = 13:	GNOMON   (Gnomonic)
     = 14:	ORTHO    (Orthographic)
     = 15:	GVNSP    (General Vertical Near-Side Perspective)
     = 16:	SNSOID   (Sinusoidal)
     = 17:	EQRECT   (Equirectangular)
     = 18:	MILLER   (Miller Cylindrical)
     = 19:	VGRINT   (Van der Grinten)
     = 20:	HOM      (Hotine Oblique Mercator--HOM)
     = 21:	ROBIN    (Robinson)
     = 22:	SOM      (Space Oblique Mercator--SOM)
     = 23:	ALASKA   (Modified Stereographic Conformal--Alaska)
     = 24:	GOOD     (Interrupted Goode Homolosine)
     = 25:	MOLL     (Mollweide)
     = 26:	IMOLL    (Interrupted Mollweide)
     = 27:	HAMMER   (Hammer)
     = 28:	WAGIV    (Wagner IV)
     = 29:	WAGVII   (Wagner VII)
     = 30:	OBLEQA   (Oblated Equal Area)

inzone (input, long)

Input zone for UTM and State Plane projection systems. The UTM Coordinate System (insys = 1) and State Plane Coordinate System (insys = 2) use zone codes instead of specific projection parameters (See Table C--UTM and Table B--State Plane). For Southern Hemisphere UTM, use a negative zone code. Inzone will be ignored for all other projections.

inparm (input, double, length(15))

Array of fifteen projection parameters. These parameters are required to define each map projection. (See Table A)

inunit (input, long)

Unit code for input coordinates. Valid unit codes are:
     = 0:  radians
     = 1:  U.S. feet
     = 2:  meters
     = 3:  seconds of arc
     = 4:  degrees of arc
     = 5:  International feet
     = 6:  Table supplying the unit code, which is legislated
           for the State zone selected

indatum (input, long)

Input spheroid code. This identifies the semi-major axis and eccentricity that is to be used in the transformation process. If a negative spheroid code is entered, inparm elements 1 and 2 are to be used (See Table A). Supported spheroids include:
     =  0:  Clarke 1866 (default)
     =  1:  Clarke 1880
     =  2:  Bessel
     =  3:  International 1967
     =  4:  International 1909
     =  5:  WGS 72
     =  6:  Everest
     =  7:  WGS 66
     =  8:  GRS 1980
     =  9:  Airy
     = 10:  Modified Everest
     = 11:  Modified Airy
     = 12:  WGS 84
     = 13:  Southeast Asia
     = 14:  Australian National
     = 15:  Krassovsky
     = 16:  Hough
     = 17:  Mercury 1960
     = 18:  Modified Mercury 1968
     = 19:  Sphere of Radius 6370997 meters
Note: State Plane projection (insys = 2) only supports Clarke 1866 (indatum = 0) and GRS 1980 (indatum = 8) spheroids corresponding to datums NAD27 and NAD83 respectively (See Table B).

ipr (input, long)

Error message print flag. If ipr is zero, error messages will be printed to the terminal. If ipr is one, error messages will be printed to efile. If ipr is two, error messages will be printed to both the terminal and efile. If ipr is something else, error messages will not be printed.

efile (input, character, length(*))

The file which will contain the output error messages. efile need not be opened at this time.

jpr (input, long)

Projection parameter print flag. If jpr is zero, projection parameters will be printed to the terminal. If jpr is one, projection parameters will be printed to pfile. If jpr is two, projection parameters will be printed to both the terminal and pfile. If jpr is something else, the projection parameters will not be printed. As specified by jpr, Projection parameters are printed each time the input projection parameters (insys, inzone, inparm, inunit, indatum, outsys, outzone, outparm, outunit, and outdatum) change.

pfile (input, character, length(*))

The file which will contain the output projection parameter messages. pfile need not be opened at this time.

outcoor (output, double, length(2))

Array of two transformed coordinates. See incoor for an explanation.

outsys (input, long)

Defines the output projection system. See insys.

outzone (input, long)

Output zone for UTM and State Plane projection systems. The UTM Coordinate System (outsys = 1) and State Plane Coordinate System (outsys = 2) use zone codes instead of specific projection parameters (See Table C--UTM and Table B--State Plane). For Southern Hemisphere UTM, use a negative zone code. Outzone will be ignored for all other projections.

outparm (input, double, length(15))

Array of fifteen projection parameters. These parameters are required to define each map projection. (See Table A)

outunit (input, long)

Unit code for output coordinates. See inunit.

outdatum (input, long)

Output spheroid code. See indatum.

fn27 (input, character, length(*))

Name of the file which contains the NAD 1927 State Plane zone parameters.

fn83 (input, character, length(*))

Name of the file which contains the NAD 1983 State Plane zone parameters.

iflg (output, long)

Error flag after transformation. The error number returned will correspond to the specific error.

DESCRIPTION

This routine initializes the proper projection parameters when initialization is required. The proper informational and error message handling is initialized. Then, the incoor coordinates are converted from the insys map projection to the outsys map projection and are returned in outcoor.

RETURN VALUE

gctp() has no return value.

Table A: Parameters Required for Definition of Map Projections

Table B: Jurisdictions, State Plane Coordinate Systems, and Zone Representations

Table C: UTM Zone Codes, Locations and Central Meridians