Documentation / @interstellar-tools/maps / inverseStereographic
Function: inverseStereographic()
ts
function inverseStereographic(
x: number,
y: number,
R: number,
options?: AzimuthalOptionsInterface
): GeographicCoordinatesInterface;Defined in: projections/stereographic.ts:124
Find the point on a sphere for a point on a stereographic map: the inverse of stereographic.
Units
- Inputs:
x,yandRin m,phi0andlambda0in radians. - Output:
{ phi, lambda }in radians, within (−π, π].
Notes
- Every point on the plane has an inverse; the farther from the centre, the closer it is to 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, anyis the same point.
Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | Distance east of the centre in m (finite). |
y | number | Distance north of the centre in m (finite). |
R | number | Radius |
options? | AzimuthalOptionsInterface | phi0 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
phi0is outside [−π/2, π/2], orR <= 0.
Example
ts
inverseStereographic(419_375, 419_375, 3_389_500, { phi0: toRad(-90) });
// ≈ { phi: 80° S, lambda: 45° E }, in radiansSee
- stereographic
- https://doi.org/10.3133/pp1395 Snyder (1987), Map projections: a working manual, ch. 21