: [X2,Y2] = op_transform(X1,Y1,par1,par2)
: [X2,Y2,Z2] = op_transform(X1,Y1,Z1,par1,par2)
: [X2,Y2,Z2,t2] = op_transform(X1,Y1,Z1,t1,par1,par2)

This function transforms X/Y/Z/t, lon/lat/h/t points between two coordinate systems 1 and 2 using the PROJ function proj_trans_generic().

X1 contains the first coordinates in the source coordinate system, geodetic longitude or coordinate X. Y1 contains the second coordinates in the source coordinate system, geodetic latitude or coordinate Y. Z1 contains the third coordinates in the source coordinate system, ellipsoidal height or coordinate Z. This argument can be optional. t1 contains the time coordinates in the source coordinate system. This argument can be optional. par1 is a text string containing the projection parameters for the source system, in PROJ ’+’ format, as EPSG code or as WKT2 code. par2 is a text string containing the projection parameters for the destination system, in PROJ ’+’ format, as EPSG code or as WKT2 code.

X1, Y1, Z1 or t1 can be scalars, vectors or matrices with equal dimensions. Z1 and/or t1 can be zero-length matrices.

X2 contains the first coordinates in the destination coordinate system, geodetic longitude or coordinate X. Y2 contains the second coordinates in the destination coordinate system, geodetic latitude or coordinate Y. Z2 contains the third coordinates in the destination coordinate system, ellipsoidal height or coordinate Z. t2 contains the time coordinates in the destination coordinate system.

Angular units are by default radians, and linear meters, although other can be specified in par1, and par2, so the input data must be congruent, and output data will be congruent with the definitions.

Note that in PROJ the +proj=latlong identifier works in degrees, not radians, for this transformation task.

See also: op_fwd, op_inv.

Package: octproj