pe_nga_geogtran_error

Calculates estimated errors for geographic (datum) transformations.

Usage syntax

int pe_nga_geogtran_error (PE_GEOGTRAN gt1, PE_GEOGTRAN gt2, int n, double coord[ ][2], double ce90[ ], double le90[ ], double se90[ ]);

Parameters
gt1 Geographic transformation object; may be a NULL pointer
gt2 Geographic transformation object; may be a NULL pointer
n Number of points to calculate
coord[][2] Two-dimensional array of points
ce90[] Array of 90% circular error values
le90[] Array of 90% linear error values
se90[] Array of 90% spherical error values
Description

The National Geospatial Intelligence Agency (NGA) publishes a set of datum keywords. Each 'datum' is actually a geographic (datum) transformation linked to a set of parameter values and associated error estimates. This function will calculate 90% circular (CE90), linear (LE90), and spherical (SE90) errors based upon those error estimates. The NGA transformations are always from a local datum to WGS 1984. The function is designed to convert between any two NGA datums. For instance, you could calculate errors induced by converting from NAS-C (NAD 1927 for the lower 48 states) and to NAR-C (NAD 1983 for the same area) using the NGA transformations. The gt1 parameter converts from a local geographic coordinate system (datum) to WGS 1984. The gt2 parameter converts from WGS 1984 to a local geographic coordinate system (datum). If you wish to do one or the other only, pass in NULL for the other geographic transformation.

Geographic transformations that are not published by NGA do not have the same information and cannot be used with this function. If a transformation is not supported by or does not have error values associated with it, -1 is returned for the CE90, LE90, and SE90 values.

Returns

Number of points calculated successfully

Examples

int out;
double pnt[1][2];
double ce[1];
double le[1];
double se[1];
PE_GEOGTRAN gt1;
PE_GEOGTRAN gt2;

pnt[0][0] = -117.0;
pnt[0][1] = 34.0;
ce[0] = {1};
le[0] = {1};
se[0] = {1};

gt1 = pe_factory_geogtran(PE_GT_NAD_1927_TO_WGS_1984_6);
gt1 = pe_factory_geogtran(PE_GT_NAD_1983_TO_WGS_1984_1);

out = pe_nga_geogtran_error(gt1,gt2,1,ce,le,se);