Skip to content

Documentation / @interstellar-tools/maps / inverseLambertAzimuthalEqualArea

Function: inverseLambertAzimuthalEqualArea() ​

ts
function inverseLambertAzimuthalEqualArea(
  x: number,
  y: number,
  R: number,
  options?: AzimuthalOptionsInterface
): GeographicCoordinatesInterface;

Defined in: projections/lambert-azimuthal-equal-area.ts:124

Find the point on a sphere for a point on a Lambert azimuthal equal-area map: the inverse of lambertAzimuthalEqualArea.

ρ=x2+y2,c=2arcsin⁡ρ2Rφ=arcsin(cos⁡csin⁡φ0+ysin⁡ccos⁡φ0ρ),λ=λ0+arctan⁡xsin⁡cρcos⁡φ0cos⁡c−ysin⁡φ0sin⁡c

Units

  • Inputs: x, y and R in m, phi0 and lambda0 in radians.
  • Output: { phi, lambda } in radians, with λ in (−π, π].

Notes

  • Only points within 2R of the centre have an inverse: a point beyond that circle throws a RangeError. The circle itself is the centre's antipode.
  • φ and λ are found with atan2, which keeps full precision near the poles, and the arctangent takes the quadrant into account. At a pole, any λ is the same point.

Parameters ​

ParameterTypeDescription
xnumberDistance east of the centre in m (finite, on the map).
ynumberDistance north of the centre in m (finite, on the map).
RnumberRadius R of the sphere in m (finite, > 0).
options?AzimuthalOptionsInterfacephi0 and lambda0, the map's centre (radians, both default to 0).

Returns ​

GeographicCoordinatesInterface

The point on the sphere, { phi, lambda } in radians.

Throws ​

  • If any input is not a finite number.
  • If the point is more than 2R from the centre, phi0 is outside [−π/2, π/2], or R <= 0.

Example ​

ts
inverseLambertAzimuthalEqualArea(-2_457_055, 0, 1_737_400, {
  lambda0: toRad(180)
});
// ≈ { phi: 0, lambda: 90° E }, in radians

See ​