: [X,Y] = op_fwd(lon,lat,params)

This function projects geodetic coordinates into cartesian projected coordinates in the defined cartographic projection using the PROJ function proj_trans_generic().

lon contains the geodetic longitude. lat contains the geodetic latitude. params is a text string containing the projection parameters in PROJ format (ONLY format ’+’ style, see https://proj.org/usage/index.html).

lon or lat can be scalars, vectors or 2D matrices. Angular units are by default radians, although other units can be specified in params, so lon and lat must be congruent with params

X contains the X projected coordinates. Y contains the Y projected coordinates.

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). Linear units are by default meters, although other can be specified in params, so X and Y will be congruent with params.

See also: op_inv, op_transform.

Package: octproj