#include "worgen.h"
FUNCTION c_trans (inproj, inunit, outproj, outunit, inx, iny, outx, outy)
long *inproj; long *inunit; long *outproj; long *outunit; double *inx; double *iny; double *outx; double *outy;
Defines the input projection system. Refer to c_transinit() for a list of valid projection system codes.
Unit code for value in inx and iny. Refer to c_transinit() for a list of valid unit codes.
Defines the output projection system. Refer to c_transinit() for a list of valid projection system codes.
Unit code for value in outx and outy. Refer to c_transinit() for a list of valid unit codes.
Input X coordinate (X, Longitude, Easting, etc). East is taken as positive, west as negative.
Input Y coordinate (Y, Latitude, Northing, etc). North is taken as positive, south as negative.
Output X coordinate (X, Longitude, Easting, etc). East is taken as positive, west as negative.
Output Y coordinate (Y, Latitude, Northing, etc). North is taken as positive, south as negative.
This function transforms coordinate pairs from one map projection, unit, and/or datum to another. The primary workhorse for the projection conversion routines of this package is the U.S. Geological Survey's General Cartographic Transformation Package (GCTP), although it has been buffered from the application routines to minimize changes to calling programs when the GCTP is changed or added to. The datum conversion routines were implemented based on DATUMCHG, which utilizes the Bursa-Wolf 7 parameter transformation.
Before using c_trans(), the transformation package must be initialized by calling c_transinit(). Additional information and references may be found in c_transinit().
c_trans() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> coordinate transformation failed IN_BREAK (-2) --> coordinate is undefinedTable A: UTM Zone Codes, Locations and Central Meridians
Table B: Jurisdictions, State Plane Coordinate Systems, and Zone Representations
Table C: Parameters Required for Definition of Map Projections