Home    |    Concepts   |   API   |   Samples
Concepts > Geometry > Coordinate References > Coordinate Systems > Geographic Coordinate Systems
Defining a Geographic Transformation

The Projection Engine has many predefined geographic transformations. If you need to convert between two data with a predefined transformation, the easiest way is to use the predefined macro.

PE_GEOGTRAN nad27_to_wgs84 = pe_factory(PE_GT_NAD_1927_TO_WGS_1984_1);

You can also define your own transformation using a predefined method. Say you have a very accurate set of parameters that convert between NAD 1927 and WGS 1984 in the Great Lakes region of the United States and Canada. The parameters (three translations, three rotations, and a scale difference) are:

(-9.2, 158.7, 183.1, 0.382, -1.451, -0.720, 2.482)

The translations are always specified in meters, while the rotations are in decimal seconds. The scale difference is in parts per million (ppm).

The rotation values are defined for the Coordinate Frame method.

PE_PARAMETER gt_par[PE_PARM_MAX];

for (i=0; i < PE_PARM_MAX; i++)
{
    gt_par[i] = NULL;
}

gt_par[PE_PARM_DX] = pe_parameter_new("X_Axis_Translation", -9.2);
gt_par[PE_PARM_DY] = pe_parameter_new("Y_Axis_Translation", 158.7);
gt_par[PE_PARM_DZ] = pe_parameter_new("Z_Axis_Translation", 183.1);
gt_par[PE_PARM_RX] = pe_parameter_new("X_Axis_Rotation", 0.382);
gt_par[PE_PARM_RY] = pe_parameter_new("Y_Axis_Rotation", -1.451);
gt_par[PE_PARM_RZ] = pe_parameter_new("Z_Axis_Rotation", -0.720);
gt_par[PE_PARM_DS] = pe_parameter_new("Scale_Difference", 2.482);

PE_GEOGTRAN nad2wgs84_gl = pe_geogtran_new("NAD27_to_WGS84_GLakes", pe_factory(PE_GCS_NAD_1927), pe_factory(PE_GCS_WGS_1984), pe_factory(PE_MTH_COORDINATE_FRAME), gt_par);
feedback | privacy | legal