Interface GeoRawProjection

Raw projections are point transformation functions that are used to implement custom projections; they typically passed to d3.geoProjection or d3.geoProjectionMutator. They are exposed here to facilitate the derivation of related projections. Raw projections take spherical coordinates [lambda, phi] in radians (not degrees!) and return a point [x, y], typically in the unit square centered around the origin.

interface GeoRawProjection {
    invert?(x, y): [number, number];
    (lambda, phi): [number, number];
}
  • Projects the specified point [lambda, phi] in radians, returning a new point [x, y] in unitless coordinates.

    Parameters

    • lambda: number

      Spherical lambda coordinate in radians.

    • phi: number

      Spherical phi coordinate in radians.

    Returns [number, number]

Methods

Methods

  • Inverts the projected point [x, y] in unitless coordinates, returning an unprojected point in spherical coordinates [lambda, phi] in radians.

    Parameters

    • x: number

      x-coordinate (unitless).

    • y: number

      y-coordinate (unitless).

    Returns [number, number]