Convert geographic coordinates (longitude/latitude) to Lambert Conformal Conic (LCC) projected coordinates, or convert projected coordinates back to geographic coordinates.

lcc_fwd(
  x,
  lon0,
  lat0 = NULL,
  stdlat = NULL,
  stdlat1 = NULL,
  stdlat2 = NULL,
  k0 = 1,
  k1 = 1
)

lcc_rev(
  x,
  y,
  lon0,
  lat0 = NULL,
  stdlat = NULL,
  stdlat1 = NULL,
  stdlat2 = NULL,
  k0 = 1,
  k1 = 1
)

Arguments

x

For forward conversion: a two-column matrix or data frame of coordinates (longitude, latitude) in decimal degrees, or a list with longitude and latitude components. Can also be a length-2 numeric vector for a single point. For reverse conversion: numeric vector of easting values (x coordinates) in meters.

lon0

Central meridian (longitude of origin) in decimal degrees.

lat0

Latitude of origin in decimal degrees (used for documentation, not in the projection calculation itself).

stdlat

Standard parallel in decimal degrees for single standard parallel (tangent cone) projections.

stdlat1, stdlat2

First and second standard parallels in decimal degrees for two standard parallel (secant cone) projections.

k0

Scale factor at the standard parallel. Default is 1.

k1

Scale factor at the first standard parallel for two standard parallel projections. Default is 1.

y

Numeric vector of northing values (y coordinates) in meters for reverse conversion.

Value

Data frame with columns:

  • For forward conversion:

    • x: Easting in meters

    • y: Northing in meters

    • convergence: Meridian convergence in degrees

    • scale: Scale factor at the point

    • lon: Longitude (echoed from input)

    • lat: Latitude (echoed from input)

  • For reverse conversion:

    • lon: Longitude in decimal degrees

    • lat: Latitude in decimal degrees

    • convergence: Meridian convergence in degrees

    • scale: Scale factor at the point

    • x: Easting (echoed from input)

    • y: Northing (echoed from input)

Details

The Lambert Conformal Conic projection is a conic map projection commonly used for aeronautical charts, state plane coordinate systems, and many national/regional coordinate systems.

Two forms are supported:

  • Single standard parallel (tangent cone): The cone is tangent to the ellipsoid at one latitude. Use lcc_fwd() and lcc_rev() with stdlat.

  • Two standard parallels (secant cone): The cone intersects the ellipsoid at two latitudes. Use lcc_fwd() and lcc_rev() with stdlat1 and stdlat2.

The projection is conformal (preserves local angles/shapes) and is best suited for mid-latitude regions with greater east-west extent.

All functions use the WGS84 ellipsoid and are fully vectorized on coordinate inputs.

See also

utmups_fwd() for UTM/UPS projections which are also conformal.

Examples

# Single standard parallel (e.g., for a state plane zone)
pts <- cbind(lon = c(-100, -99, -98), lat = c(40, 41, 42))
lcc_fwd(pts, lon0 = -100, stdlat = 40)
#>           x        y convergence    scale  lon lat
#> 1      0.00      0.0   0.0000000 1.000000 -100  40
#> 2  84146.25 111521.9   0.6427876 1.000152  -99  41
#> 3 165789.24 224013.2   1.2855752 1.000613  -98  42

# Two standard parallels (e.g., for continental US)
# CONUS Albers-like setup
lcc_fwd(pts, lon0 = -96, stdlat1 = 33, stdlat2 = 45)
#>           x        y convergence     scale  lon lat
#> 1 -339643.8 108321.8   -2.521985 0.9946660 -100  40
#> 2 -251122.5 215464.1   -1.891489 0.9950973  -99  41
#> 3 -164998.9 323691.8   -1.260993 0.9958400  -98  42

# Round-trip conversion
fwd <- lcc_fwd(pts, lon0 = -100, stdlat = 40)
lcc_rev(fwd$x, fwd$y, lon0 = -100, stdlat = 40)
#>    lon lat convergence    scale         x        y
#> 1 -100  40   0.0000000 1.000000      0.00      0.0
#> 2  -99  41   0.6427876 1.000152  84146.25 111521.9
#> 3  -98  42   1.2855752 1.000613 165789.24 224013.2