Function file: [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().

INPUT ARGUMENTS:

  • X1 is a column vector containing by default the first coordinates (X or geodetic longitude) in the source system.
  • Y1 is a column vector containing by default the second coordinates (Y or geodetic latitude) in the source system.
  • Z1 is a column vector containing by default the third coordinates (Z or height) in the source system.
  • t1 is a column vector containing by default the fourth coordinates (time) in the source system.
  • par1 is a text string containing the parameters for the source system, in PROJ ’+’ format, as EPSG code or as a WKT definition.
  • par2 is a text string containing the parameters for the destination system, in PROJ ’+’ format, as EPSG code or as WKT definition.

OUTPUT ARGUMENTS:

  • X2 is a column vector containing by default the first coordinates (X or geodetic longitude) in the destination system
  • Y2 is a column vector containing by default the second coordinates (Y or geodetic latitude) in the destination system.
  • Z2 is a column vector containing by default the third coordinates (Z or height) in the destination system.
  • t2 is a column vector containingby default the fourth coordinates (time) in the destination system.

The coordinate vectors X1, Y1, Z1, and t1 must be all scalars or all column vectors (of the same size). X2, Y2, Z2, and t2 will be according to the input dimensions.

Angular units are by default radians and linear meters, although other can be specified in par1 and/or par2, so X1, Y1, Z1, and t1 must be congruent with them. The same applies to the coordinate order at input and output.

If a transformation error occurs the resultant coordinates for the affected points have all Inf value and a warning message is emitted (one for each erroneous point).

See also: _op_fwd, _op_inv.

Package: octproj