pe_geog_to_geog |
Transforms between geographic coordinate systems
int pe_geog_to_geog (PE_GEOGTRAN geogtran, int n, double coord[ ][2], double h[ ], int transform_direction);
geogtran | Geographic transformation object |
n | Number of points |
coord[ ][2] | Two-dimensional array of points |
h | Array of ellipsoidal heights; may be a NULL pointer, if so, all heights are assumed to be zero. |
transform_direction | Direction of transformation |
Pe_geog_to_geo applies a geographic (datum) transformation to the specified array of points. The transform_direction parameter indicates whether to apply the transformation in the direction in which it is defined or to reverse it. The parameter values are:
PE_TRANSFORM_1_TO_2 0>br> PE_TRANSFORM_2_TO_1 1
The first geographic coordinate system in a transformation is the "from", or "source", coordinate system. The "target" coordinate system is the second geographic coordinate system. If a transformation is defined from NAD 1927 to to NAD 1983, but the input data is defined on NAD 1983, you would specify PE_TRANSFORM_2_TO_1.Different geographic transformation methods require different types of height (or depth) values. For example, the geocentric translation method uses ellipsoidal heights. The use of heights referenced to other surfaces, such as sea level, may result in incorrect results.
Number of points transformed successfully
double pnt[2][2] = {{10,20},{10,30}};
double z[2] = {{200},{189}};
int out = pe_geog_to_geog(gt,2,pnt,z,PE_TRANSFORM_1_TO_2);