Skip to content

Documentation / @interstellar-tools/maps / lambertAzimuthalEqualArea

Function: lambertAzimuthalEqualArea() ​

ts
function lambertAzimuthalEqualArea(
  phi: Radians,
  lambda: Radians,
  R: number,
  options?: AzimuthalOptionsInterface
): ProjectedPointInterface;

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

Project a point on a sphere with the Lambert azimuthal equal-area projection: an equal-area map centred on any point, with true directions from the centre.

cos⁡c=sin⁡φ0sin⁡φ+cos⁡φ0cos⁡φcos⁡(λ−λ0),k′=21+cos⁡cx=Rk′cos⁡φsin⁡(λ−λ0),y=Rk′(cos⁡φ0sin⁡φ−sin⁡φ0cos⁡φcos⁡(λ−λ0))

Where:

  • φ and λ are the point's latitude and longitude (rad)
  • φ0 and λ0 are the map's centre (rad)
  • c is the point's angular distance from the centre (rad)
  • R is the sphere's radius (m)

Units

  • Inputs: angles in radians, R in m.
  • Output: { x, y } in m.

Notes

  • Equal-area: a region's area on the map is its area on the sphere. A point at angular distance c from the centre is 2Rsin⁡(c/2) from it on the map, in its true direction, so shapes are kept near the centre and squashed towards the edge.
  • The whole sphere fits in a circle of radius 2R, and one hemisphere in a circle of radius 2R. Polar caps and the hemispheres of planets and moons are often mapped with it.
  • The centre's antipode is the whole edge circle, so it has no single place on the map: it throws a RangeError, as does a point within rounding of it, about 10−15 rad. 1+cos⁡c is computed in haversine form, so points close to the antipode keep their precision.

Parameters ​

ParameterTypeDescription
phiRadiansLatitude φ in radians (finite, in [−π/2, π/2]).
lambdaRadiansLongitude λ in radians (finite).
RnumberRadius R of the sphere in m (finite, > 0).
options?AzimuthalOptionsInterfacephi0 and lambda0, the map's centre (radians, both default to 0).

Returns ​

ProjectedPointInterface

The point on the map, { x, y } in m.

Throws ​

  • If any input is not a finite number.
  • If phi or phi0 is outside [−π/2, π/2], R <= 0, or the point is the centre's antipode.

Example ​

ts
// The Moon's far side, centred on 0° N, 180° E: the limb, 90° from the centre, is √2 R away
lambertAzimuthalEqualArea(0 as Radians, toRad(90), 1_737_400, {
  lambda0: toRad(180)
});
// ≈ { x: −2 457 055, y: 0 } m

See ​