proj_factors: Compute map projection factors for coordinates

View source: R/proj_factors.R

proj_factorsR Documentation

Compute map projection factors for coordinates

Description

Computes map projection factors (distortion measures) for a set of geographic coordinates and a given projected CRS. Returns a matrix with one row per input coordinate and one column per factor.

Usage

proj_factors(lp, crs)

Arguments

lp

A two-column numeric matrix of geographic coordinates (longitude, latitude) in decimal degrees.

crs

A PROJ CRS definition string for the target projection (e.g. a PROJ string, WKT, or authority code such as "EPSG:3112"). Using a CRS (rather than a '+proj=' operation string) requires PROJ >= 8.2.

Details

Rows for coordinates where the factors computation fails (for example latitudes outside +/-90) are filled with NaN. Missing input coordinates give NA output.

Value

A numeric matrix with nrow(lp) rows and the following columns:

meridional_scale

Meridional scale factor (h)

parallel_scale

Parallel scale factor (k)

areal_scale

Areal scale factor (s)

angular_distortion

Angular distortion (omega), in radians

meridian_parallel_angle

Meridian-parallel angle (theta prime), in radians

meridian_convergence

Meridian convergence (conv), in radians

tissot_semimajor

Tissot semimajor axis (a)

tissot_semiminor

Tissot semiminor axis (b)

dx_dlam

Partial derivative dx/dlambda

dx_dphi

Partial derivative dx/dphi

dy_dlam

Partial derivative dy/dlambda

dy_dphi

Partial derivative dy/dphi

References

PROJ PJ_FACTORS documentation

Examples

# Lambert Azimuthal Equal Area
proj_factors(cbind(147, -42), "+proj=laea +lon_0=147 +lat_0=-42 +type=crs")

# Multiple coordinates
pts <- cbind(c(130, 147, 160), c(-20, -42, -35))
proj_factors(pts, "EPSG:3112")


PROJ documentation built on July 10, 2026, 9:08 a.m.