Skip to content

Documentation / @interstellar-tools/maps / inverseSinusoidal

Function: inverseSinusoidal() ​

ts
function inverseSinusoidal(
  x: number,
  y: number,
  R: number,
  options?: ProjectionOptionsInterface
): GeographicCoordinatesInterface;

Defined in: projections/sinusoidal.ts:122

Find the point on a sphere for a point on a sinusoidal map: the inverse of sinusoidal.

φ=yR,λ=λ0+xRcos⁡φ

Units

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

Notes

  • Only points on the map have an inverse: a y beyond a pole, or an x beyond the edge meridians, |x|>πRcos⁡φ, throws a RangeError.
  • Every longitude meets at a pole, so there λ is λ0.

Parameters ​

ParameterTypeDescription
xnumberDistance east of the origin in m (finite, on the map).
ynumberDistance north of the origin in m (finite, on the map).
RnumberRadius R of the sphere in m (finite, > 0).
options?ProjectionOptionsInterfacelambda0, the central meridian (radians, defaults 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 off the map, or R <= 0.

Example ​

ts
inverseSinusoidal(1_364_551, 1_819_401, 1_737_400);
// ≈ { phi: 60° N, lambda: 90° E }, in radians

See ​