Documentation / @interstellar-tools/maps / stereographic
Function: stereographic()
ts
function stereographic(
phi: Radians,
lambda: Radians,
R: number,
options?: AzimuthalOptionsInterface
): ProjectedPointInterface;Defined in: projections/stereographic.ts:65
Project a point on a sphere with the stereographic projection: a conformal map centred on any point, the usual choice for polar maps.
Where:
and are the point's latitude and longitude (rad) and are the map's centre (rad) is the point's angular distance from the centre (rad) is the map's scale at the point, the same in every direction is the sphere's radius (m)
Units
- Inputs: angles in radians,
Rin m. - Output:
{ x, y }in m.
Notes
- Conformal: angles and small shapes are kept, and every circle on the sphere is a circle (or a line) on the map. The scale is true at the centre and grows to
away from it: a point at angular distance is from the centre, in its true direction. - With
it's the polar stereographic projection, used for polar caps, such as those of Mars, and for sea ice on Earth. - The whole sphere maps to the infinite plane except the centre's antipode, which is infinitely far away: it throws a
RangeError, as does a point within rounding of it, aboutrad.
Parameters
| Parameter | Type | Description |
|---|---|---|
phi | Radians | Latitude |
lambda | Radians | Longitude |
R | number | Radius |
options? | AzimuthalOptionsInterface | phi0 and lambda0, the map's centre (radians, both default to 0). |
Returns
The point on the map, { x, y } in m.
Throws
- If any input is not a finite number.
- If
phiorphi0is outside [−π/2, π/2],R <= 0, or the point is the centre's antipode.
Example
ts
// Mars's south polar cap: 80° S, 45° E, on a map centred on the south pole
stereographic(toRad(-80), toRad(45), 3_389_500, { phi0: toRad(-90) });
// ≈ { x: 419 375, y: 419 375 } m, 593 086 m from the poleSee
- inverseStereographic
- lambertAzimuthalEqualArea
- orthographic
- https://doi.org/10.3133/pp1395 Snyder (1987), Map projections: a working manual, ch. 21