Documentation / @interstellar-tools/maps / mollweide
Function: mollweide()
ts
function mollweide(
phi: Radians,
lambda: Radians,
R: number,
options?: ProjectionOptionsInterface
): ProjectedPointInterface;Defined in: projections/mollweide.ts:107
Project a point on a sphere with the Mollweide projection: an equal-area map of the whole sphere inside an ellipse twice as wide as tall.
Where:
and are the point's latitude and longitude (rad) is an auxiliary angle, found with Newton's method (rad) is the central meridian (rad) is the sphere's radius (m)
Units
- Inputs: angles in radians,
Rin m. - Output:
{ x, y }in m.
Notes
- Equal-area: a region's area on the map is its area on the sphere. The whole sphere fills an ellipse
wide and tall, with straight parallels and elliptical meridians, which distorts shapes less near the edges than sinusoidal. Sky surveys, such as maps of the cosmic microwave background, use it. - Newton's method slows down near the poles, where
flattens out; the solver starts closer there and falls back to bisection, so it always converges. The poles themselves are solved directly. is wrapped to (−π, π]. −π itself stays on the left edge, so a line that ends there, like a ground track split at the antimeridian, isn't drawn across the map.
Parameters
| Parameter | Type | Description |
|---|---|---|
phi | Radians | Latitude |
lambda | Radians | Longitude |
R | number | Radius |
options? | ProjectionOptionsInterface | lambda0, the central meridian (radians, defaults to 0). |
Returns
The point on the map, { x, y } in m.
Throws
- If any input is not a finite number.
- If
phiis outside [−π/2, π/2], orR <= 0.
Example
ts
// The edge of the map: 180° E on the equator, and the north pole
mollweide(0 as Radians, Math.PI as Radians, 1); // { x: 2√2, y: 0 }
mollweide((Math.PI / 2) as Radians, 0 as Radians, 1); // { x: 0, y: √2 }See
- inverseMollweide
- sinusoidal
- https://doi.org/10.3133/pp1395 Snyder (1987), Map projections: a working manual, ch. 31