pj_transform()

int pj_transform( projPJ srcdefn, projPJ dstdefn, long point_count, int point_offset, double *x, double *y, double *z );

srcdefn: source (input) coordinate system.

dstdefn: destination (output) coordinate system.

point_count: the number of points to be processed (the size of the x/y/z arrays).

point_offset: the step size from value to value (measured in doubles) within the x/y/z arrays - normally 1 for a packed array. May be used to operate on xyz interleaved point arrays.

x/y/z: The array of X, Y and Z coordinate values passed as input, and modified in place for output. The Z may optionally be NULL.

return: The return is zero on success, or a PROJ.4 error code.

The pj_transform() function transforms the passed in list of points from the source coordinate system to the destination coordinate system. Note that geographic locations need to be passed in radians, not decimal degrees, and will be returned similarly. The "z" array may be passed as NULL if Z values are not available.

If there is an overall failure, an error code will be returned from the function. If individual points fail to transform - for instance due to being over the horizon - then those x/y/z values will be set to HUGE_VAL on return. Input values that are HUGE_VAL will not be transformed.