This function unprojects cartesian projected coordinates (in a defined cartographic projection) into geodetic coordinates using the PROJ function proj_trans_generic().
X contains the X projected coordinates. Y contains the Y projected coordinates. params is a text string containing the projection parameters in PROJ format (ONLY format ’+’ style, see https://proj.org/usage/index.html).
X or Y can be scalars, vectors or 2D matrices. Linear units are by default meters, although other can be specified in params, so X and Y must be congruent with params.
lon is the geodetic longitude. lat is the geodetic latitude.
If a projection error occurs, the resultant coordinates for the affected points have both Inf value and a warning message is emitted (one for each erroneous point). Angular units are by default radians, although other units can be specified in params, so lon and lat will be congruent with params
See also: op_fwd, op_transform.
Package: octproj