Extended geographic projections for d3-geo. See Command-Line Cartography for an introduction.
If you use NPM, npm install d3-geo-projection
. Otherwise, download the latest release. You can also load directly from d3js.org as a standalone library. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3
global is exported:
<script src="https://d3js.org/d3-array.v1.min.js"></script> <script src="https://d3js.org/d3-geo.v1.min.js"></script> <script src="https://d3js.org/d3-geo-projection.v2.min.js"></script> <script> var aitoff = d3.geoAitoff(); </script>
Try d3-geo-projection in your browser.
Note: projections tagged [d3-geo] are exported by d3-geo, not d3-geo-projection. These commonly-used projections are also included in the d3 default bundle.
Airy’s minimum-error azimuthal projection.
Defaults to 90°.
The Aitoff projection.
Albers’ equal-area conic projection.
The armadillo projection. The default center assumes the default parallel of 20° and should be changed if a different parallel is used. Note: requires clipping to the sphere.
Defaults to 20°.
August’s epicycloidal conformal projection.
The Lambert azimuthal equal-area projection.
The azimuthal equidistant projection.
The Baker Dinomic projection.
Berghaus’ star projection. The default center assumes the default lobe number of 5 and should be changed if a different number of lobes is used. Note: requires clipping to the sphere.
If lobes is specified, sets the number of lobes in the resulting star, and returns this projection. If lobes is not specified, returns the current lobe number, which defaults to 5.
Jacques Bertin’s 1953 projection.
The Boggs eumorphic projection. More commonly used in interrupted form.
The Bonne pseudoconical equal-area projection. The Werner projection is a limiting form of the Bonne projection with a standard parallel at ±90°. The default center assumes the default parallel of 45° and should be changed if a different parallel is used.
Defaults to 45°.
The Bottomley projection “draws lines of latitude as concentric circular arcs, with arc lengths equal to their lengths on the globe, and placed symmetrically and equally spaced across the vertical central meridian.”
Defaults to 0.5, corresponding to a sin(ψ) where ψ = π/6.
The Bromley projection is a rescaled Mollweide projection.
The Chamberlin trimetric projection. This method does not support projection.rotate: the three reference points implicitly determine a fixed rotation.
The Chamberlin projection for Africa using points [0°, 22°], [45°, 22°], [22.5°, -22°].
The Collignon equal-area pseudocylindrical projection. This projection is used in the polar areas of the HEALPix projection.
The Lambert conformal conic projection.
Albers’ conic equal-area projection.
The conic equidistant projection.
The Craig retroazimuthal projection. Note: this projection tends to fold over itself if the standard parallel is non-zero; we have not yet implemented the necessary advanced clipping to avoid overlap.
Defaults to 0°.
The Craster parabolic projection; also known as Putniņš P4.
The cylindrical equal-area projection. Depending on the chosen parallel, this projection is also known as the Lambert cylindrical equal-area (0°), Gall–Peters (45°), Hobo–Dyer (37.5°), and Tobler world-in-a-square (~55.654°).
Defaults to approximately 38.58°, fitting the world in a 960×500 rectangle.
The cylindrical stereographic projection. Depending on the chosen parallel, this projection is also known as Braun’s stereographic (0°) and Gall’s stereographic (45°).
Defaults to 0°.
The Eckert I projection.
The Eckert II projection.
The Eckert III projection.
The Eckert IV projection.
The Eckert V projection.
The Eckert VI projection.
The Eisenlohr conformal projection.
The equirectangular (plate carrée) projection. The Cassini projection is the transverse aspect of the equirectangular projection.
The Fahey pseudocylindrical projection.
Foucaut’s stereographic equivalent projection.
Gilbert’s two-world perspective projection. Wraps an instance of the specified projection type; if not specified, defaults to d3.geoOrthographic.
The U.S.-centric Gingery world projection, as inspired by Cram’s Air Age. Note: requires clipping to the sphere.
Defaults to 30°.
Defaults to 6.
The Ginzburg IV projection.
The Ginzburg V projection.
The Ginzburg VI projection.
The Ginzburg VIII projection.
The Ginzburg IX projection.
The gnomonic projection.
The Gringorten square equal-area projection, rearranged to give each hemisphere an entire square.
The Guyou hemisphere-in-a-square projection. Peirce is credited with its quincuncial form.
The Hammer projection. Depending the chosen coefficient and aspect, also known as Eckert–Greifendorff, quartic authalic, and Briesemeister.
Defaults to 2.
The Hammer retroazimuthal projection. Note: requires clipping to the sphere.
Defaults to 45°.
The HEALPix projection: a Hierarchical Equal Area isoLatitude Pixelisation of a 2-sphere. In this implementation, the parameter K is fixed at 3. Note: requires clipping to the sphere.
If lobes is specified, sets the number of lobes (the parameter H in the literature) and returns this projection. If lobes is not specified, returns the current lobe number, which defaults to 4.
Hill eucyclic projection is pseudoconic and equal-area.
Defaults to 1. With a ratio of 0, this projection becomes the Maurer No. 73. As it approaches ∞, the projection converges to the Eckert IV.
The pseudocylindrical, equal-area Goode homolosine projection is normally presented in interrupted form.
Waldo R. Tobler’s hyperelliptical is a family of equal-area pseudocylindrical projections. Parameters include k, the exponent of the superellipse (or Lamé curve) that defines the shape of the meridians (default k = 2.5); alpha, which governs the weight of the cylindrical projection that is averaged with the superellipse (default alpha = 0); and gamma, that shapes the aspect ratio (default: gamma = 1.183136).
The Kavrayskiy VII pseudocylindrical projection.
The Lagrange conformal projection.
Defaults to 0.5.
The Larrivée projection.
The Laskowski tri-optimal projection simultaneously minimizes distance, angular, and areal distortion.
The Littrow projection is the only conformal retroazimuthal map projection. Typically clipped to the geographic extent [[-90°, -60°], [90°, 60°]].
The loximuthal projection is “characterized by the fact that loxodromes (rhumb lines) from one chosen central point (the intersection of the central meridian and central latitude) are shown as straight lines, correct in azimuth from the center, and are ‘true to scale’… It is neither an equal-area projection nor conformal.”
Defaults to 40°.
The spherical Mercator projection.
The Miller cylindrical projection is a modified Mercator projection.
The family of modified stereographic projections. The default clip angle for these projections is 90°. These projections do not support projection.rotate: a fixed rotation is applied that is specific to the given coefficients.
A modified stereographic projection for Alaska.
A modified stereographic projection for the conterminous United States.
A modified stereographic projection for the United States including Alaska and Hawaii. Typically clipped to the geographic extent [[-180°, 15°], [-50°, 75°]].
A modified stereographic projection for Europe and Africa. Typically clipped to the geographic extent [[-40°, -40°], [80°, 80°]].
A modified stereographic projection for the Pacific ocean.
The equal-area, pseudocylindrical Mollweide projection. The oblique aspect is known as the Atlantis projection. Goode’s interrupted Mollweide is also widely known.
The McBryde–Thomas flat-polar parabolic pseudocylindrical equal-area projection.
The McBryde–Thomas flat-polar quartic pseudocylindrical equal-area projection.