Home

Awesome

d3-geo-projection

Extended geographic projections for d3-geo. See Command-Line Cartography for an introduction.

Installing

If you use npm, npm install d3-geo-projection. You can also download the latest release on GitHub. For vanilla HTML in modern browsers, import d3-geo-projection from Skypack:

<script type="module">

import {geoAitoff} from "https://cdn.skypack.dev/d3-geo-projection@4";

const projection = geoAitoff();

</script>

For legacy environments, you can load d3-geo-projection’s UMD bundle from an npm-based CDN such as jsDelivr; a d3 global is exported:

<script src="https://cdn.jsdelivr.net/npm/d3-array@3"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-geo@3"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-geo-projection@4"></script>
<script>

const projection = d3.geoAitoff();

</script>

API Reference

Projections

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.

<a href="#geoAiry" name="geoAiry">#</a> d3.<b>geoAiry</b>() · Source, Examples <br><a href="#geoAiryRaw" name="geoAiryRaw">#</a> d3.<b>geoAiryRaw</b>(<i>beta</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/airy.png" width="480" height="250">

Airy’s minimum-error azimuthal projection.

<a href="#airy_radius" name="airy_raidus">#</a> <i>airy</i>.<b>radius</b>([<i>radius</i>])

Defaults to 90°.

<a href="#geoAitoff" name="geoAitoff">#</a> d3.<b>geoAitoff</b>() · Source, Examples <br><a href="#geoAitoffRaw" name="geoAitoffRaw">#</a> d3.<b>geoAitoffRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/aitoff.png" width="480" height="250">

The Aitoff projection.

<a href="#geoAlbers" name="geoAlbers">#</a> d3.<b>geoAlbers</b>() · Source [d3-geo]

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/albers.png" width="480" height="250">

Albers’ equal-area conic projection.

<a href="#geoArmadillo" name="geoArmadillo">#</a> d3.<b>geoArmadillo</b>() · Source, Examples <br><a href="#geoArmadilloRaw" name="geoArmadilloRaw">#</a> d3.<b>geoArmadilloRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/armadillo.png" width="480" height="250">

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.

<a href="#armadillo_parallel" name="armadillo_parallel">#</a> <i>armadillo</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 20°.

<a href="#geoAugust" name="geoAugust">#</a> d3.<b>geoAugust</b>() · Source, Examples <br><a href="#geoAugustRaw" name="geoAugustRaw">#</a> d3.<b>geoAugustRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/august.png" width="480" height="250">

August’s epicycloidal conformal projection.

<a href="#geoAzimuthalEqualArea" name="geoAzimuthalEqualArea">#</a> d3.<b>geoAzimuthalEqualArea</b>() · Source [d3-geo], Examples <br><a href="#geoAzimuthalEqualAreaRaw" name="geoAzimuthalEqualAreaRaw">#</a> d3.<b>geoAzimuthalEqualAreaRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/azimuthalEqualArea.png" width="480" height="250">

The Lambert azimuthal equal-area projection.

<a href="#geoAzimuthalEquidistant" name="geoAzimuthalEquidistant">#</a> d3.<b>geoAzimuthalEquidistant</b>() · Source [d3-geo], Examples <br><a href="#geoAzimuthalEquidistantRaw" name="geoAzimuthalEquidistantRaw">#</a> d3.<b>geoAzimuthalEquidistantRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/azimuthalEquidistant.png" width="480" height="250">

The azimuthal equidistant projection.

<a href="#geoBaker" name="geoBaker">#</a> d3.<b>geoBaker</b>() · Source, Examples <br><a href="#geoBakerRaw" name="geoBakerRaw">#</a> d3.<b>geoBakerRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/baker.png" width="480" height="250">

The Baker Dinomic projection.

<a href="#geoBerghaus" name="geoBerghaus">#</a> d3.<b>geoBerghaus</b>() · Source, Examples <br><a href="#geoBerghausRaw" name="geoBerghausRaw">#</a> d3.<b>geoBerghausRaw</b>(<i>lobes</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/berghaus.png" width="480" height="250">

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.

<a href="#berghaus_lobes" name="berghaus_lobes">#</a> <i>berghaus</i>.<b>lobes</b>([<i>lobes</i>]) · Source

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.

<a href="#geoBertin1953" name="geoBertin1953">#</a> d3.<b>geoBertin1953</b>() · Source <br><a href="#geoBertin1953Raw" name="geoBertin1953Raw">#</a> d3.<b>geoBertin1953Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/bertin1953.png" width="480" height="250">

Jacques Bertin’s 1953 projection.

<a href="#geoBoggs" name="geoBoggs">#</a> d3.<b>geoBoggs</b>() · Source, Examples <br><a href="#geoBoggsRaw" name="geoBoggsRaw">#</a> d3.<b>geoBoggsRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/boggs.png" width="480" height="250">

The Boggs eumorphic projection. More commonly used in interrupted form.

<a href="#geoBonne" name="geoBonne">#</a> d3.<b>geoBonne</b>() · Source, Examples <br><a href="#geoBonneRaw" name="geoBonneRaw">#</a> d3.<b>geoBonneRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/bonne.png" width="480" height="250">

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.

<a href="#bonne_parallel" name="bonne_parallel">#</a> <i>bonne</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 45°.

<a href="#geoBottomley" name="geoBottomley">#</a> d3.<b>geoBottomley</b>() · Source, Examples <br><a href="#geoBottomleyRaw" name="geoBottomleyRaw">#</a> d3.<b>geoBottomleyRaw</b>(<i>sinPsi</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/bottomley.png" width="480" height="250">

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.”

<a href="#bottomley_fraction" name="bottomley_fraction">#</a> <i>bottomley</i>.<b>fraction</b>([<i>fraction</i>])

Defaults to 0.5, corresponding to a sin(ψ) where ψ = π/6.

<a href="#geoBromley" name="geoBromley">#</a> d3.<b>geoBromley</b>() · Source, Examples <br><a href="#geoBromleyRaw" name="geoBromleyRaw">#</a> d3.<b>geoBromleyRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/bromley.png" width="480" height="250">

The Bromley projection is a rescaled Mollweide projection.

<a href="#geoChamberlin" name="geoChamberlin">#</a> d3.<b>geoChamberlin</b>(<i>point0</i>, <i>point1</i>, <i>point2</i>) · Source <br><a href="#geoChamberlinRaw" name="geoChamberlinRaw">#</a> d3.<b>geoChamberlinRaw</b>(<i>p0</i>, <i>p1</i>, <i>p2</i>)

The Chamberlin trimetric projection. This method does not support projection.rotate: the three reference points implicitly determine a fixed rotation.

<a href="#geoChamberlinAfrica" name="geoChamberlinAfrica">#</a> d3.<b>geoChamberlinAfrica</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/chamberlinAfrica.png" width="480" height="250">

The Chamberlin projection for Africa using points [0°, 22°], [45°, 22°], [22.5°, -22°].

<a href="#geoCollignon" name="geoCollignon">#</a> d3.<b>geoCollignon</b>() · Source, Examples <br><a href="#geoCollignonRaw" name="geoCollignonRaw">#</a> d3.<b>geoCollignonRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/collignon.png" width="480" height="250">

The Collignon equal-area pseudocylindrical projection. This projection is used in the polar areas of the HEALPix projection.

<a href="#geoConicConformal" name="geoConicConformal">#</a> d3.<b>geoConicConformal</b>() · Source [d3-geo], Examples <br><a href="#geoConicConformalRaw" name="geoConicConformalRaw">#</a> d3.<b>geoConicConformalRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/conicConformal.png" width="480" height="250">

The Lambert conformal conic projection.

<a href="#geoConicEqualArea" name="geoConicEqualArea">#</a> d3.<b>geoConicEqualArea</b>() · Source [d3-geo], Examples <br><a href="#geoConicEqualAreaRaw" name="geoConicEqualAreaRaw">#</a> d3.<b>geoConicEqualAreaRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/conicEqualArea.png" width="480" height="250">

Albers’ conic equal-area projection.

<a href="#geoConicEquidistant" name="geoConicEquidistant">#</a> d3.<b>geoConicEquidistant</b>() · Source [d3-geo], Examples <br><a href="#geoConicEquidistantRaw" name="geoConicEquidistantRaw">#</a> d3.<b>geoConicEquidistantRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/conicEquidistant.png" width="480" height="250">

The conic equidistant projection.

<a href="#geoCraig" name="geoCraig">#</a> d3.<b>geoCraig</b>() · Source, Examples <br><a href="#geoCraigRaw" name="geoCraigRaw">#</a> d3.<b>geoCraigRaw</b>(<i>phi</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/craig.png" width="480" height="250">

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.

<a href="#craig_parallel" name="craig_parallel">#</a> <i>craig</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 0°.

<a href="#geoCraster" name="geoCraster">#</a> d3.<b>geoCraster</b>() · Source, Examples <br><a href="#geoCrasterRaw" name="geoCrasterRaw">#</a> d3.<b>geoCrasterRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/craster.png" width="480" height="250">

The Craster parabolic projection; also known as Putniņš P4.

<a href="#geoCylindricalEqualArea" name="geoCylindricalEqualArea">#</a> d3.<b>geoCylindricalEqualArea</b>() · Source, Examples <br><a href="#geoCylindricalEqualAreaRaw" name="geoCylindricalEqualAreaRaw">#</a> d3.<b>geoCylindricalEqualAreaRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/cylindricalEqualArea.png" width="480" height="250">

The cylindrical equal-area projection. Depending on the chosen parallel, this projection is also known as the Lambert cylindrical equal-area (0°), Behrmann (30°), Hobo–Dyer (37.5°), Gall–Peters (45°), Balthasart (50°) and Tobler world-in-a-square (~55.654°).

<a href="#cylindricalEqualArea_parallel" name="cylindricalEqualArea_parallel">#</a> <i>cylindricalEqualArea</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to approximately 38.58°, fitting the world in a 960×500 rectangle.

<a href="#geoCylindricalStereographic" name="geoCylindricalStereographic">#</a> d3.<b>geoCylindricalStereographic</b>() · Source, Examples <br><a href="#geoCylindricalStereographicRaw" name="geoCylindricalStereographicRaw">#</a> d3.<b>geoCylindricalStereographicRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/cylindricalStereographic.png" width="480" height="250">

The cylindrical stereographic projection. Depending on the chosen parallel, this projection is also known as Braun’s stereographic (0°) and Gall’s stereographic (45°).

<a href="#cylindricalStereographic_parallel" name="cylindricalStereographic_parallel">#</a> <i>cylindricalStereographic</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 0°.

<a href="#geoEckert1" name="geoEckert1">#</a> d3.<b>geoEckert1</b>() · Source, Examples <br><a href="#geoEckert1Raw" name="geoEckert1Raw">#</a> d3.<b>geoEckert1Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert1.png" width="480" height="250">

The Eckert I projection.

<a href="#geoEckert2" name="geoEckert2">#</a> d3.<b>geoEckert2</b>() · Source, Examples <br><a href="#geoEckert2Raw" name="geoEckert2Raw">#</a> d3.<b>geoEckert2Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert2.png" width="480" height="250">

The Eckert II projection.

<a href="#geoEckert3" name="geoEckert3">#</a> d3.<b>geoEckert3</b>() · Source, Examples <br><a href="#geoEckert3Raw" name="geoEckert3Raw">#</a> d3.<b>geoEckert3Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert3.png" width="480" height="250">

The Eckert III projection.

<a href="#geoEckert4" name="geoEckert4">#</a> d3.<b>geoEckert4</b>() · Source, Examples <br><a href="#geoEckert4Raw" name="geoEckert4Raw">#</a> d3.<b>geoEckert4Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert4.png" width="480" height="250">

The Eckert IV projection.

<a href="#geoEckert5" name="geoEckert5">#</a> d3.<b>geoEckert5</b>() · Source, Examples <br><a href="#geoEckert5Raw" name="geoEckert5Raw">#</a> d3.<b>geoEckert5Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert5.png" width="480" height="250">

The Eckert V projection.

<a href="#geoEckert6" name="geoEckert6">#</a> d3.<b>geoEckert6</b>() · Source, Examples <br><a href="#geoEckert6Raw" name="geoEckert6Raw">#</a> d3.<b>geoEckert6Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eckert6.png" width="480" height="250">

The Eckert VI projection.

<a href="#geoEisenlohr" name="geoEisenlohr">#</a> d3.<b>geoEisenlohr</b>() · Source, Examples <br><a href="#geoEisenlohrRaw" name="geoEisenlohrRaw">#</a> d3.<b>geoEisenlohrRaw</b>(<i>lambda</i>, <i>phi</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/eisenlohr.png" width="480" height="250">

The Eisenlohr conformal projection.

<a href="#geoEquirectangular" name="geoEquirectangular">#</a> d3.<b>geoEquirectangular</b>() · Source [d3-geo], Examples <br><a href="#geoEquirectangularRaw" name="geoEquirectangularRaw">#</a> d3.<b>geoEquirectangularRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/equirectangular.png" width="480" height="250">

The equirectangular (plate carrée) projection. The Cassini projection is the transverse aspect of the equirectangular projection.

<a href="#geoFahey" name="geoFahey">#</a> d3.<b>geoFahey</b>() · Source, Examples <br><a href="#geoFaheyRaw" name="geoFaheyRaw">#</a> d3.<b>geoFaheyRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/fahey.png" width="480" height="250">

The Fahey pseudocylindrical projection.

<a href="#geoFoucaut" name="geoFoucaut">#</a> d3.<b>geoFoucaut</b>() · Source, Examples <br><a href="#geoFoucautRaw" name="geoFoucautRaw">#</a> d3.<b>geoFoucautRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/foucaut.png" width="480" height="250">

Foucaut’s stereographic equivalent projection.

<a href="#geoFoucautSinusoidal" name="geoFoucautSinusoidal">#</a> d3.<b>geoFoucautSinusoidal</b>() · Source, Examples <br><a href="#geoFoucautSinusoidalRaw" name="geoFoucautSinusoidalRaw">#</a> d3.<b>geoFoucautSinusoidalRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/foucautSinusoidal.png" width="480" height="250">

Foucaut’s sinusoidal projection, an equal-area average of the sinusoidal and Lambert’s cylindrical projections.

<a href="#foucautSinusoidal_alpha" name="foucautSinusoidal_alpha">#</a> <i>foucautSinusoidal</i>.<b>alpha</b>([<i>alpha</i>])

Relative weight of the cylindrical projection. Defaults to 0.5.

<a href="#geoGilbert" name="geoGilbert">#</a> d3.<b>geoGilbert</b>([<i>type</i>]) · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/gilbert.png" width="480" height="250">

Gilbert’s two-world perspective projection. Wraps an instance of the specified projection type; if not specified, defaults to d3.geoOrthographic.

<a href="#geoGingery" name="geoGingery">#</a> d3.<b>geoGingery</b>() · Source, Examples <br><a href="#geoGingeryRaw" name="geoGingeryRaw">#</a> d3.<b>geoGingeryRaw</b>(<i>rho</i>, <i>lobes</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/gingery.png" width="480" height="250">

The U.S.-centric Gingery world projection, as inspired by Cram’s Air Age. Note: requires clipping to the sphere.

<a href="#gingery_radius" name="gingery_radius">#</a> <i>gingery</i>.<b>radius</b>([<i>radius</i>]) · Source

Defaults to 30°.

<a href="#gingery_lobes" name="gingery_lobes">#</a> <i>gingery</i>.<b>lobes</b>([<i>lobes</i>]) · Source

Defaults to 6.

<a href="#geoGinzburg4" name="geoGinzburg4">#</a> d3.<b>geoGinzburg4</b>() · Source, Examples <br><a href="#geoGinzburg4Raw" name="geoGinzburg4Raw">#</a> d3.<b>geoGinzburg4Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/ginzburg4.png" width="480" height="250">

The Ginzburg IV projection.

<a href="#geoGinzburg5" name="geoGinzburg5">#</a> d3.<b>geoGinzburg5</b>() · Source, Examples <br><a href="#geoGinzburg5Raw" name="geoGinzburg5Raw">#</a> d3.<b>geoGinzburg5Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/ginzburg5.png" width="480" height="250">

The Ginzburg V projection.

<a href="#geoGinzburg6" name="geoGinzburg6">#</a> d3.<b>geoGinzburg6</b>() · Source, Examples <br><a href="#geoGinzburg6Raw" name="geoGinzburg6Raw">#</a> d3.<b>geoGinzburg6Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/ginzburg6.png" width="480" height="250">

The Ginzburg VI projection.

<a href="#geoGinzburg8" name="geoGinzburg8">#</a> d3.<b>geoGinzburg8</b>() · Source, Examples <br><a href="#geoGinzburg8Raw" name="geoGinzburg8Raw">#</a> d3.<b>geoGinzburg8Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/ginzburg8.png" width="480" height="250">

The Ginzburg VIII projection.

<a href="#geoGinzburg9" name="geoGinzburg9">#</a> d3.<b>geoGinzburg9</b>() · Source, Examples <br><a href="#geoGinzburg9Raw" name="geoGinzburg9Raw">#</a> d3.<b>geoGinzburg9Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/ginzburg9.png" width="480" height="250">

The Ginzburg IX projection.

<a href="#geoGnomonic" name="geoGnomonic">#</a> d3.<b>geoGnomonic</b>() · Source [d3-geo], Examples <br><a href="#geoGnomonicRaw" name="geoGnomonicRaw">#</a> d3.<b>geoGnomonicRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/gnomonic.png" width="480" height="250">

The gnomonic projection.

<a href="#geoGringorten" name="geoGringorten">#</a> d3.<b>geoGringorten</b>() · Source, Examples <br><a href="#geoGringortenRaw" name="geoGringortenRaw">#</a> d3.<b>geoGringortenRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/gringorten.png" width="480" height="250">

The Gringorten square equal-area projection, rearranged to give each hemisphere an entire square.

<a href="#geoGuyou" name="geoGuyou">#</a> d3.<b>geoGuyou</b>() · Source, Examples <br><a href="#geoGuyouRaw" name="geoGuyouRaw">#</a> d3.<b>geoGuyouRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/guyou.png" width="480" height="250">

The Guyou hemisphere-in-a-square projection. Peirce is credited with its quincuncial form.

<a href="#geoHammer" name="geoHammer">#</a> d3.<b>geoHammer</b>() · Source, Examples <br><a href="#geoHammerRaw" name="geoHammerRaw">#</a> d3.<b>geoHammerRaw</b>(<i>A</i>, <i>B</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/hammer.png" width="480" height="250">

The Hammer projection. Depending the chosen coefficient and aspect, also known as Eckert–Greifendorff, quartic authalic, and Briesemeister.

<a href="#hammer_coefficient" name="hammer_coefficient">#</a> <i>hammer</i>.<b>coefficient</b>([<i>coefficient</i>]) · Source

Defaults to 2.

<a href="#geoHammerRetroazimuthal" name="geoHammerRetroazimuthal">#</a> d3.<b>geoHammerRetroazimuthal</b>() · Source, Examples <br><a href="#geoHammerRetroazimuthalRaw" name="geoHammerRetroazimuthalRaw">#</a> d3.<b>geoHammerRetroazimuthalRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/hammerRetroazimuthal.png" width="480" height="250">

The Hammer retroazimuthal projection. Note: requires clipping to the sphere.

<a href="#hammerRetroazimuthal_parallel" name="hammerRetroazimuthal_parallel">#</a> <i>hammerRetroazimuthal</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 45°.

<a href="#geoHealpix" name="geoHealpix">#</a> d3.<b>geoHealpix</b>() · Source, Examples <br><a href="#geoHealpixRaw" name="geoHealpixRaw">#</a> d3.<b>geoHealpixRaw</b>(<i>lobes</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/healpix.png" width="480" height="250">

The HEALPix projection: a <b>H</b>ierarchical <b>E</b>qual <b>A</b>rea iso<b>L</b>atitude <b>Pix</b>elisation of a 2-sphere. In this implementation, the parameter K is fixed at 3. Note: requires clipping to the sphere.

<a href="#healpix_lobes" name="healpix_lobes">#</a> <i>healpix</i>.<b>lobes</b>([<i>lobes</i>])

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.

<a href="#geoHill" name="geoHill">#</a> d3.<b>geoHill</b>() · Source, Examples <br><a href="#geoHillRaw" name="geoHillRaw">#</a> d3.<b>geoHillRaw</b>(<i>K</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/hill.png" width="480" height="250">

Hill eucyclic projection is pseudoconic and equal-area.

<a href="#hill_ratio" name="hill_ratio">#</a> <i>hill</i>.<b>ratio</b>([<i>ratio</i>])

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.

<a href="#geoHomolosine" name="geoHomolosine">#</a> d3.<b>geoHomolosine</b>() · Source, Examples <br><a href="#geoHomolosineRaw" name="geoHomolosineRaw">#</a> d3.<b>geoHomolosineRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/homolosine.png" width="480" height="250">

The pseudocylindrical, equal-area Goode homolosine projection is normally presented in interrupted form.

<a href="#geoHufnagel" name="geoHufnagel">#</a> d3.<b>geoHufnagel</b>() · Source, Examples <br><a href="#geoHufnagelRaw" name="geoHufnagelRaw">#</a> d3.<b>geoHufnagelRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/hufnagel.png" width="480" height="250">

A customizable family of pseudocylindrical equal-area projections by Herbert Hufnagel.

<a href="#hufnagel_a" name="hufnagel_a">#</a> <i>hufnagel</i>.<b>a</b>([<i>a</i>])

<a href="#hufnagel_b" name="hufnagel_b">#</a> <i>hufnagel</i>.<b>b</b>([<i>b</i>])

<a href="#hufnagel_psiMax" name="hufnagel_psiMax">#</a> <i>hufnagel</i>.<b>psiMax</b>([<i>psiMax</i>])

<a href="#hufnagel_ratio" name="hufnagel_ratio">#</a> <i>hufnagel</i>.<b>ratio</b>([<i>ratio</i>])

<a href="#geoHyperelliptical" name="geoHyperelliptical">#</a> d3.<b>geoHyperelliptical</b>() · Source, Examples <br><a href="#geoHyperellipticalRaw" name="geoHyperellipticalRaw">#</a> d3.<b>geoHyperellipticalRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/hyperelliptical.png" width="480" height="250">

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).

<a href="#geoKavrayskiy7" name="geoKavrayskiy7">#</a> d3.<b>geoKavrayskiy7</b>() · Source, Examples <br><a href="#geoKavrayskiy7Raw" name="geoKavrayskiy7Raw">#</a> d3.<b>geoKavrayskiy7Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/kavrayskiy7.png" width="480" height="250">

The Kavrayskiy VII pseudocylindrical projection.

<a href="#geoLagrange" name="geoLagrange">#</a> d3.<b>geoLagrange</b>() · Source, Examples <br><a href="#geoLagrangeRaw" name="geoLagrangeRaw">#</a> d3.<b>geoLagrangeRaw</b>(<i>n</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/lagrange.png" width="480" height="250">

The Lagrange conformal projection.

<a href="#lagrange_spacing" name="lagrange_spacing">#</a> <i>lagrange</i>.<b>spacing</b>([<i>spacing</i>])

Defaults to 0.5.

<a href="#geoLarrivee" name="geoLarrivee">#</a> d3.<b>geoLarrivee</b>() · Source, Examples <br><a href="#geoLarriveeRaw" name="geoLarriveeRaw">#</a> d3.<b>geoLarriveeRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/larrivee.png" width="480" height="250">

The Larrivée projection.

<a href="#geoLaskowski" name="geoLaskowski">#</a> d3.<b>geoLaskowski</b>() · Source, Examples <br><a href="#geoLaskowskiRaw" name="geoLaskowskiRaw">#</a> d3.<b>geoLaskowskiRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/laskowski.png" width="480" height="250">

The Laskowski tri-optimal projection simultaneously minimizes distance, angular, and areal distortion.

<a href="#geoLittrow" name="geoLittrow">#</a> d3.<b>geoLittrow</b>() · Source, Examples <br><a href="#geoLittrowRaw" name="geoLittrowRaw">#</a> d3.<b>geoLittrowRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/littrow.png" width="480" height="250">

The Littrow projection is the only conformal retroazimuthal map projection. Typically clipped to the geographic extent [[-90°, -60°], [90°, 60°]].

<a href="#geoLoximuthal" name="geoLoximuthal">#</a> d3.<b>geoLoximuthal</b>() · Source, Examples <br><a href="#geoLoximuthalRaw" name="geoLoximuthalRaw">#</a> d3.<b>geoLoximuthalRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/loximuthal.png" width="480" height="250">

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.”

<a href="#loximuthal_parallel" name="loximuthal_parallel">#</a> <i>loximuthal</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 40°.

<a href="#geoMercator" name="geoMercator">#</a> d3.<b>geoMercator</b>() · Source [d3-geo], Examples <br><a href="#geoMercatorRaw" name="geoMercatorRaw">#</a> d3.<b>geoMercatorRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/mercator.png" width="480" height="250">

The spherical Mercator projection.

<a href="#geoMiller" name="geoMiller">#</a> d3.<b>geoMiller</b>() · Source, Examples <br><a href="#geoMillerRaw" name="geoMillerRaw">#</a> d3.<b>geoMillerRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/miller.png" width="480" height="250">

The Miller cylindrical projection is a modified Mercator projection.

<a href="#geoModifiedStereographic" name="geoModifiedStereographic">#</a> d3.<b>geoModifiedStereographic</b>(<i>coefficients</i>, <i>rotate</i>) · Source <br><a href="#geoModifiedStereographicRaw" name="geoModifiedStereographicRaw">#</a> d3.<b>geoModifiedStereographicRaw</b>(<i>coefficients</i>)

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 href="#geoModifiedStereographicAlaska" name="geoModifiedStereographicAlaska">#</a> d3.<b>geoModifiedStereographicAlaska</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/modifiedStereographicAlaska.png" width="480" height="250">

A modified stereographic projection for Alaska.

<a href="#geoModifiedStereographicGs48" name="geoModifiedStereographicGs48">#</a> d3.<b>geoModifiedStereographicGs48</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/modifiedStereographicGs48.png" width="480" height="250">

A modified stereographic projection for the conterminous United States.

<a href="#geoModifiedStereographicGs50" name="geoModifiedStereographicGs50">#</a> d3.<b>geoModifiedStereographicGs50</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/modifiedStereographicGs50.png" width="480" height="250">

A modified stereographic projection for the United States including Alaska and Hawaii. Typically clipped to the geographic extent [[-180°, 15°], [-50°, 75°]].

<a href="#geoModifiedStereographicMiller" name="geoModifiedStereographicMiller">#</a> d3.<b>geoModifiedStereographicMiller</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/modifiedStereographicMiller.png" width="480" height="250">

A modified stereographic projection for Europe and Africa. Typically clipped to the geographic extent [[-40°, -40°], [80°, 80°]].

<a href="#geoModifiedStereographicLee" name="geoModifiedStereographicLee">#</a> d3.<b>geoModifiedStereographicLee</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/modifiedStereographicLee.png" width="480" height="250">

A modified stereographic projection for the Pacific ocean.

<a href="#geoMollweide" name="geoMollweide">#</a> d3.<b>geoMollweide</b>() · Source, Examples <br><a href="#geoMollweideRaw" name="geoMollweideRaw">#</a> d3.<b>geoMollweideRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/mollweide.png" width="480" height="250">

The equal-area, pseudocylindrical Mollweide projection. The oblique aspect is known as the Atlantis projection. Goode’s interrupted Mollweide is also widely known.

<a href="#geoMtFlatPolarParabolic" name="geoMtFlatPolarParabolic">#</a> d3.<b>geoMtFlatPolarParabolic</b>() · Source, Examples <br><a href="#geoMtFlatPolarParabolicRaw" name="geoMtFlatPolarParabolicRaw">#</a> d3.<b>geoMtFlatPolarParabolicRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/mtFlatPolarParabolic.png" width="480" height="250">

The McBryde–Thomas flat-polar parabolic pseudocylindrical equal-area projection.

<a href="#geoMtFlatPolarQuartic" name="geoMtFlatPolarQuartic">#</a> d3.<b>geoMtFlatPolarQuartic</b>() · Source, Examples <br><a href="#geoMtFlatPolarQuarticRaw" name="geoMtFlatPolarQuarticRaw">#</a> d3.<b>geoMtFlatPolarQuarticRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/mtFlatPolarQuartic.png" width="480" height="250">

The McBryde–Thomas flat-polar quartic pseudocylindrical equal-area projection.

<a href="#geoMtFlatPolarSinusoidal" name="geoMtFlatPolarSinusoidal">#</a> d3.<b>geoMtFlatPolarSinusoidal</b>() · Source, Examples <br><a href="#geoMtFlatPolarSinusoidalRaw" name="geoMtFlatPolarSinusoidalRaw">#</a> d3.<b>geoMtFlatPolarSinusoidalRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/mtFlatPolarSinusoidal.png" width="480" height="250">

The McBryde–Thomas flat-polar sinusoidal equal-area projection.

<a href="#geoNaturalEarth1" name="geoNaturalEarth1">#</a> d3.<b>geoNaturalEarth1</b>() · Source [d3-geo], Examples <br><a href="#geoNaturalEarth1Raw" name="geoNaturalEarth1Raw">#</a> d3.<b>geoNaturalEarth1Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/naturalEarth1.png" width="480" height="250">

The Natural Earth projection.

<a href="#geoNaturalEarth2" name="geoNaturalEarth2">#</a> d3.<b>geoNaturalEarth2</b>() · Source, Examples <br><a href="#geoNaturalEarth2Raw" name="geoNaturalEarth2Raw">#</a> d3.<b>geoNaturalEarth2Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/naturalEarth2.png" width="480" height="250">

The Natural Earth II projection. Compared to Natural Earth, it is slightly taller and rounder.

<a href="#geoNellHammer" name="geoNellHammer">#</a> d3.<b>geoNellHammer</b>() · Source, Examples <br><a href="#geoNellHammerRaw" name="geoNellHammerRaw">#</a> d3.<b>geoNellHammerRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/nellHammer.png" width="480" height="250">

The Nell–Hammer projection.

<a href="#geoNicolosi" name="geoNicolosi">#</a> d3.<b>geoNicolosi</b>() · Source, Examples <br><a href="#geoNicolosiRaw" name="geoNicolosiRaw">#</a> d3.<b>geoNicolosiRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/nicolosi.png" width="480" height="250">

The Nicolosi globular projection.

<a href="#geoOrthographic" name="geoOrthographic">#</a> d3.<b>geoOrthographic</b>() · Source [d3-geo], Examples <br><a href="#geoOrthographicRaw" name="geoOrthographicRaw">#</a> d3.<b>geoOrthographicRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/orthographic.png" width="480" height="250">

The orthographic projection.

<a href="#geoPatterson" name="geoPatterson">#</a> d3.<b>geoPatterson</b>() · Source, Examples <br><a href="#geoPattersonRaw" name="geoPattersonRaw">#</a> d3.<b>geoPattersonRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/patterson.png" width="480" height="250">

The Patterson cylindrical projection.

<a href="#geoPolyconic" name="geoPolyconic">#</a> d3.<b>geoPolyconic</b>() · Source, Examples <br><a href="#geoPolyconicRaw" name="geoPolyconicRaw">#</a> d3.<b>geoPolyconicRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/polyconic.png" width="480" height="250">

The American polyconic projection.

<a href="#geoRectangularPolyconic" name="geoRectangularPolyconic">#</a> d3.<b>geoRectangularPolyconic</b>() · Source, Examples <br><a href="#geoRectangularPolyconicRaw" name="geoRectangularPolyconicRaw">#</a> d3.<b>geoRectangularPolyconicRaw</b>(<i>phi0</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/rectangularPolyconic.png" width="480" height="250">

The rectangular (War Office) polyconic projection.

<a href="#rectangularPolyconic_parallel" name="rectangularPolyconic_parallel">#</a> <i>rectangularPolyconic</i>.<b>parallel</b>([<i>parallel</i>])

Defaults to 0°.

<a href="#geoRobinson" name="geoRobinson">#</a> d3.<b>geoRobinson</b>() · Source, Examples <br><a href="#geoRobinsonRaw" name="geoRobinsonRaw">#</a> d3.<b>geoRobinsonRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/robinson.png" width="480" height="250">

The Robinson projection.

<a href="#geoSatellite" name="geoSatellite">#</a> d3.<b>geoSatellite</b>() · Source, Examples <br><a href="#geoSatelliteRaw" name="geoSatelliteRaw">#</a> d3.<b>geoSatelliteRaw</b>(<i>P</i>, <i>omega</i>)

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/satellite.png" width="480" height="250">

The satellite (tilted perspective) projection.

<a href="#satellite_tilt" name="satellite_tilt">#</a> <i>satellite</i>.<b>tilt</b>([<i>tilt</i>])

Defaults to 0°.

<a href="#satellite_distance" name="satellite_distance">#</a> <i>satellite</i>.<b>distance</b>([<i>distance</i>])

Distance from the center of the sphere to the point of view, as a proportion of the sphere’s radius; defaults to 2.0. The recommended maximum clip angle for a given distance is acos(1 / distance) converted to degrees. If tilt is also applied, then more conservative clipping may be necessary. For exact clipping, the in-development geographic projection pipeline is needed; see the satellite explorer.

<a href="#geoSinusoidal" name="geoSinusoidal">#</a> d3.<b>geoSinusoidal</b>() · Source, Examples <br><a href="#geoSinusoidalRaw" name="geoSinusoidalRaw">#</a> d3.<b>geoSinusoidalRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/sinusoidal.png" width="480" height="250">

The sinusoidal projection.

<a href="#geoSinuMollweide" name="geoSinuMollweide">#</a> d3.<b>geoSinuMollweide</b>() · Source, Examples <br><a href="#geoSinuMollweideRaw" name="geoSinuMollweideRaw">#</a> d3.<b>geoSinuMollweideRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/sinuMollweide.png" width="480" height="250">

Allen K. Philbrick’s Sinu-Mollweide projection. See also the interrupted form.

<a href="#geoStereographic" name="geoStereographic">#</a> d3.<b>geoStereographic</b>() · Source [d3-geo], Examples <br><a href="#geoStereographicRaw" name="geoStereographicRaw">#</a> d3.<b>geoStereographicRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/stereographic.png" width="480" height="250">

The stereographic projection.

<a href="#geoTimes" name="geoTimes">#</a> d3.<b>geoTimes</b>() · Source, Examples <br><a href="#geoTimesRaw" name="geoTimesRaw">#</a> d3.<b>geoTimesRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/times.png" width="480" height="250">

John Muir’s Times projection.

<a href="#geoTransverseMercator" name="geoTransverseMercator">#</a> d3.<b>geoTransverseMercator</b>() · Source [d3-geo], Examples <br><a href="#geoTransverseMercatorRaw" name="geoTransverseMercatorRaw">#</a> d3.<b>geoTransverseMercatorRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo/main/img/transverseMercator.png" width="480" height="250">

The transverse spherical Mercator projection.

<a href="#geoTwoPointAzimuthal" name="geoTwoPointAzimuthal">#</a> d3.<b>geoTwoPointAzimuthal</b>(<i>point0</i>, <i>point1</i>) · Source <br><a href="#geoTwoPointAzimuthalRaw" name="geoTwoPointAzimuthalRaw">#</a> d3.<b>geoTwoPointAzimuthalRaw</b>(<i>d</i>)

The two-point azimuthal projection “shows correct azimuths (but not distances) from either of two points to any other point. [It can] be used to locate a ship at sea, given the exact location of two radio transmitters and the direction of the ship to the transmitters.” This projection does not support projection.rotate, as the rotation is fixed by the two given points.

<a href="#geoTwoPointAzimuthalUsa" name="geoTwoPointAzimuthalUsa">#</a> d3.<b>geoTwoPointAzimuthalUsa</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/twoPointAzimuthalUsa.png" width="480" height="250">

The two-point azimuthal projection with points [-158°, 21.5°] and [-77°, 39°], approximately representing Honolulu, HI and Washington, D.C.

<a href="#geoTwoPointEquidistant" name="geoTwoPointEquidistant">#</a> d3.<b>geoTwoPointEquidistant</b>(<i>point0</i>, <i>point1</i>) · Source <br><a href="#geoTwoPointEquidistantRaw" name="geoTwoPointEquidistantRaw">#</a> d3.<b>geoTwoPointEquidistantRaw</b>(<i>z0</i>)

The two-point equidistant projection. This projection does not support projection.rotate, as the rotation is fixed by the two given points. Note: to show the whole Earth, this projection requires clipping to spherical polygons (example).

<a href="#geoTwoPointEquidistantUsa" name="geoTwoPointEquidistantUsa">#</a> d3.<b>geoTwoPointEquidistantUsa</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/twoPointEquidistantUsa.png" width="480" height="250">

The two-point equidistant projection with points [-158°, 21.5°] and [-77°, 39°], approximately representing Honolulu, HI and Washington, D.C.

<a href="#geoVanDerGrinten" name="geoVanDerGrinten">#</a> d3.<b>geoVanDerGrinten</b>() · Source, Examples <br><a href="#geoVanDerGrintenRaw" name="geoVanDerGrintenRaw">#</a> d3.<b>geoVanDerGrintenRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/vanDerGrinten.png" width="480" height="250">

The Van der Grinten projection.

<a href="#geoVanDerGrinten2" name="geoVanDerGrinten2">#</a> d3.<b>geoVanDerGrinten2</b>() · Source, Examples <br><a href="#geoVanDerGrinten2Raw" name="geoVanDerGrinten2Raw">#</a> d3.<b>geoVanDerGrinten2Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/vanDerGrinten2.png" width="480" height="250">

The Van der Grinten II projection.

<a href="#geoVanDerGrinten3" name="geoVanDerGrinten3">#</a> d3.<b>geoVanDerGrinten3</b>() · Source, Examples <br><a href="#geoVanDerGrinten3Raw" name="geoVanDerGrinten3Raw">#</a> d3.<b>geoVanDerGrinten3Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/vanDerGrinten3.png" width="480" height="250">

The Van der Grinten III projection.

<a href="#geoVanDerGrinten4" name="geoVanDerGrinten4">#</a> d3.<b>geoVanDerGrinten4</b>() · Source, Examples <br><a href="#geoVanDerGrinten4Raw" name="geoVanDerGrinten4Raw">#</a> d3.<b>geoVanDerGrinten4Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/vanDerGrinten4.png" width="480" height="250">

The Van der Grinten IV projection.

<a href="#geoWagner" name="geoWagner">#</a> d3.<b>geoWagner</b>() · Source, Examples <br><a href="#geoWagnerRaw" name="geoWagnerRaw">#</a> d3.<b>geoWagnerRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/wagner.png" width="480" height="250">

The Wagner projection is customizable: default values produce the Wagner VIII projection.

<a href="#wagner_poleline" name="wagner_poleline">#</a> <i>wagner</i>.<b>poleline</b>([<i>poleline</i>])

Defaults to 65°.

<a href="#wagner_parallels" name="wagner_parallels">#</a> <i>wagner</i>.<b>parallels</b>([<i>parallels</i>])

Defaults to 60°.

<a href="#wagner_inflation" name="wagner_inflation">#</a> <i>wagner</i>.<b>inflation</b>([<i>inflation</i>])

Defaults to 20.

<a href="#wagner_ratio" name="wagner_ratio">#</a> <i>wagner</i>.<b>ratio</b>([<i>ratio</i>])

Defaults to 200.

<a href="#geoWagner4" name="geoWagner4">#</a> d3.<b>geoWagner4</b>() · Source, Examples <br><a href="#geoWagner4Raw" name="geoWagner4Raw">#</a> d3.<b>geoWagner4Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/wagner4.png" width="480" height="250">

The Wagner IV projection, also known as Putniṇš P2´.

<a href="#geoWagner6" name="geoWagner6">#</a> d3.<b>geoWagner6</b>() · Source, Examples <br><a href="#geoWagner6Raw" name="geoWagner6Raw">#</a> d3.<b>geoWagner6Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/wagner6.png" width="480" height="250">

The Wagner VI projection.

<a href="#geoWagner7" name="geoWagner7">#</a> d3.<b>geoWagner7</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/wagner7.png" width="480" height="250">

The Wagner VII projection.

<a href="#geoWiechel" name="geoWiechel">#</a> d3.<b>geoWiechel</b>() · Source, Examples <br><a href="#geoWiechelRaw" name="geoWiechelRaw">#</a> d3.<b>geoWiechelRaw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/wiechel.png" width="480" height="250">

The Wiechel projection.

<a href="#geoWinkel3" name="geoWinkel3">#</a> d3.<b>geoWinkel3</b>() · Source, Examples <br><a href="#geoWinkel3Raw" name="geoWinkel3Raw">#</a> d3.<b>geoWinkel3Raw</b>

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/winkel3.png" width="480" height="250">

The Winkel tripel projection.

Interrupted Projections

<a href="#geoInterrupt" name="geoInterrupt">#</a> d3.<b>geoInterrupt</b>(<i>project</i>, <i>lobes</i>) · Source, Examples

Defines a new interrupted projection for the specified raw projection function project and the specified array of lobes. The array lobes contains two elements representing the hemilobes for the northern hemisphere and the southern hemisphere, respectively. Each hemilobe is an array of triangles, with each triangle represented as three points (in degrees): the start, midpoint, and end. For example, the lobes in Goode’s interrupted homolosine projection are defined as:

[
  [
    [[-180,   0], [-100,  90], [ -40,   0]],
    [[ -40,   0], [  30,  90], [ 180,   0]]
  ],
  [
    [[-180,   0], [-160, -90], [-100,   0]],
    [[-100,   0], [ -60, -90], [ -20,   0]],
    [[ -20,   0], [  20, -90], [  80,   0]],
    [[  80,   0], [ 140, -90], [ 180,   0]]
  ]
]

Note: interrupted projections typically require clipping to the sphere.

<a href="#interrupted_lobes" name="interrupted_lobes">#</a> <i>interrupted</i>.<b>lobes</b>([<i>lobes</i>]) · Source

If lobes is specified, sets the new array of hemilobes and returns this projection; see d3.geoInterrupt for details on the format of the hemilobes array. If lobes is not specified, returns the current array of hemilobes.

<a href="#geoInterruptedHomolosine" name="geoInterruptedHomolosine">#</a> d3.<b>geoInterruptedHomolosine</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedHomolosine.png" width="480" height="250">

Goode’s interrupted homolosine projection. Its ocean-centric aspect is also well-known.

<a href="#geoInterruptedSinusoidal" name="geoInterruptedSinusoidal">#</a> d3.<b>geoInterruptedSinusoidal</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedSinusoidal.png" width="480" height="250">

An interrupted sinusoidal projection with asymmetrical lobe boundaries that emphasize land masses over oceans, after the Swedish <i>Nordisk Världs Atlas</i> as reproduced by C.A. Furuti.

<a href="#geoInterruptedBoggs" name="geoInterruptedBoggs">#</a> d3.<b>geoInterruptedBoggs</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedBoggs.png" width="480" height="250">

Bogg’s interrupted eumorphic projection.

<a href="#geoInterruptedSinuMollweide" name="geoInterruptedSinuMollweide">#</a> d3.<b>geoInterruptedSinuMollweide</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedSinuMollweide.png" width="480" height="250">

Alan K. Philbrick’s interrupted sinu-Mollweide projection.

<a href="#geoInterruptedMollweide" name="geoInterruptedMollweide">#</a> d3.<b>geoInterruptedMollweide</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedMollweide.png" width="480" height="250">

Goode’s interrupted Mollweide projection.

<a href="#geoInterruptedMollweideHemispheres" name="geoInterruptedMollweideHemispheres">#</a> d3.<b>geoInterruptedMollweideHemispheres</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedMollweideHemispheres.png" width="480" height="250">

The Mollweide projection interrupted into two (equal-area) hemispheres.

<a href="#geoInterruptedQuarticAuthalic" name="geoInterruptedQuarticAuthalic">#</a> d3.<b>geoInterruptedQuarticAuthalic</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/interruptedQuarticAuthalic.png" width="480" height="250">

The quartic authalic projection interrupted into two hemispheres.

Polyhedral Projections

<a href="#geoPolyhedral" name="geoPolyhedral">#</a> d3.<b>geoPolyhedral</b>(<i>root</i>, <i>face</i>) · Source

Defines a new polyhedral projection. The root is a spanning tree of polygon face nodes; each node is assigned a node.transform matrix. The face function returns the appropriate node for a given lambda and phi in radians. Use projection.angle to set the orientation of the map (the default angle, -30°, might change in the next major version).

<a href="#geoPolyhedralButterfly" name="geoPolyhedralButterfly">#</a> d3.<b>geoPolyhedralButterfly</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/polyhedralButterfly.png" width="480" height="250">

The gnomonic butterfly projection.

<a href="#geoPolyhedralCollignon" name="geoPolyhedralCollignon">#</a> d3.<b>geoPolyhedralCollignon</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/polyhedralCollignon.png" width="480" height="250">

The Collignon butterfly projection.

<a href="#geoPolyhedralWaterman" name="geoPolyhedralWaterman">#</a> d3.<b>geoPolyhedralWaterman</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/polyhedralWaterman.png" width="480" height="250">

Steve Waterman’s butterfly projection.

Quincuncial Projections

<a href="#geoQuincuncial" name="geoQuincuncial">#</a> d3.<b>geoQuincuncial</b>(<i>project</i>) · Source

Defines a new quincuncial projection for the specified raw projection function project. The default rotation is [-90°, -90°, 45°] and the default clip angle is 180° - ε.

<a href="#geoGringortenQuincuncial" name="geoGringortenQuincuncial">#</a> d3.<b>geoGringortenQuincuncial</b>() · Source, Examples

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/gringortenQuincuncial.png" width="480" height="250">

The Gringorten square equal-area projection.

<a href="#geoPeirceQuincuncial" name="geoPeirceQuincuncial">#</a> d3.<b>geoPeirceQuincuncial</b>() · Source

<img src="https://raw.githubusercontent.com/d3/d3-geo-projection/main/img/peirceQuincuncial.png" width="480" height="250">

The Peirce quincuncial projection is the quincuncial form of the Guyou projection.

Transformations

<a href="#geoProject" name="geoProject">#</a> d3.<b>geoProject</b>(<i>object</i>, <i>projection</i>) · Source

Projects the specified GeoJSON object using the specified projection, returning a shallow copy of the specified GeoJSON object with projected coordinates. Typically, the input coordinates are spherical and the output coordinates are planar, but the projection can also be an arbitrary geometric transformation.

See also geoproject.

<a href="#geoStitch" name="geoStitch">#</a> d3.<b>geoStitch</b>(<i>object</i>) · Source

Returns a shallow copy of the specified GeoJSON object, removing antimeridian and polar cuts, and replacing straight Cartesian line segments with geodesic segments. The input object must have coordinates in longitude and latitude in decimal degrees per RFC 7946. Antimeridian cutting, if needed, can then be re-applied after rotating to the desired projection aspect.

See also geostitch.

<a href="#geoQuantize" name="geoQuantize">#</a> d3.<b>geoQuantize</b>(<i>object</i>, <i>digits</i>) · Source

Returns a shallow copy of the specified GeoJSON object, rounding x and y coordinates according to number.toFixed. Typically this is done after projecting.

See also geoproject --precision and geo2svg --precision.

Command-Line Reference

geo2svg

<a href="#geo2svg" name="geo2svg">#</a> <b>geo2svg</b> [<i>options…</i>] [<i>file</i>] · Source

Converts the specified GeoJSON file to SVG. With --newline-delimited, each input feature is rendered as a separate path element; otherwise, a single path element is generated.

By default, the SVG’s fill is set to none and the stroke is set to black. The default point radius is 4.5. To override these values on a per-feature basis, the following GeoJSON feature properties will be propagated to attributes:

If the feature has an id, the path element will have a corresponding id attribute. If the feature has a title property, the path element will have a title element with the corresponding value. For an example of per-feature attributes, see this California population density map.

Note: per-feature attributes are most useful in conjunction with newline-delimited input, as otherwise the generated SVG only has a single path element. To set these properties dynamically, pass the input through ndjson-map.

<a name="geo2svg_help" href="#geo2svg_help">#</a> geo2svg <b>-h</b> <br><a href="#geo2svg_help">#</a> geo2svg <b>--help</b>

Output usage information.

<a name="geo2svg_version" href="#geo2svg_version">#</a> geo2svg <b>-V</b> <br><a href="#geo2svg_version">#</a> geo2svg <b>--version</b>

Output the version number.

<a name="geo2svg_out" href="#geo2svg_out">#</a> geo2svg <b>-o</b> <i>file</i> <br><a href="#geo2svg_out">#</a> geo2svg <b>--out</b> <i>file</i>

Specify the output file name. Defaults to “-” for stdout.

<a name="geo2svg_width" href="#geo2svg_width">#</a> geo2svg <b>-w</b> <i>value</i> <br><a href="#geo2svg_width">#</a> geo2svg <b>--width</b> <i>value</i>

Specify the output width. Defaults to 960.

<a name="geo2svg_height" href="#geo2svg_height">#</a> geo2svg <b>-h</b> <i>value</i> <br><a href="#geo2svg_height">#</a> geo2svg <b>--height</b> <i>value</i>

Specify the output height. Defaults to 500.

<a name="geo2svg_precision" href="#geo2svg_precision">#</a> geo2svg <b>-p</b> <i>value</i> <br><a href="#geo2svg_precision">#</a> geo2svg <b>--precision</b> <i>value</i>

Reduce the precision for smaller output files. Defaults to six digits after the decimal point. See also d3.geoQuantize.

<a name="geo2svg_fill" href="#geo2svg_fill">#</a> geo2svg <b>--fill</b> <i>value</i>

Specify the default output fill color. Defaults to none.

<a name="geo2svg_stroke" href="#geo2svg_stroke">#</a> geo2svg <b>--stroke</b> <i>value</i>

Specify the default output stroke color. Defaults to black.

<a name="geo2svg_radius" href="#geo2svg_radius">#</a> geo2svg <b>--r</b> <i>value</i> <br><a name="geo2svg_radius" href="#geo2svg_radius">#</a> geo2svg <b>--radius</b> <i>value</i>

Specify the default output point radius. Defaults to 4.5.

<a name="geo2svg_newline_delimited" href="#geo2svg_newline_delimited">#</a> geo2svg <b>-n</b> <br><a href="#geo2svg_newline_delimited">#</a> geo2svg <b>--newline-delimited</b>

Accept newline-delimited JSON as input, with one feature per line.

geograticule

<a href="#geograticule" name="geograticule">#</a> <b>geograticule</b> [<i>options</i>…] · Source

Generates a GeoJSON graticule. See also d3.geoGraticule.

<a name="geograticule_help" href="#geograticule_help">#</a> geograticule <b>-h</b> <br><a href="#geograticule_help">#</a> geograticule <b>--help</b>

Output usage information.

<a name="geograticule_version" href="#geograticule_version">#</a> geograticule <b>-V</b> <br><a href="#geograticule_version">#</a> geograticule <b>--version</b>

Output the version number.

<a name="geograticule_out" href="#geograticule_out">#</a> geograticule <b>-o</b> <i>file</i> <br><a href="#geograticule_out">#</a> geograticule <b>--out</b> <i>file</i>

Specify the output file name. Defaults to “-” for stdout.

<a name="geograticule_extent" href="#geograticule_extent">#</a> geograticule <b>--extent</b> <i>value</i>

Sets the graticule’s extent.

<a name="geograticule_extent_minor" href="#geograticule_extent_minor">#</a> geograticule <b>--extent-minor</b> <i>value</i>

Sets the graticule’s minor extent.

<a name="geograticule_extent_major" href="#geograticule_extent_major">#</a> geograticule <b>--extent-major</b> <i>value</i>

Sets the graticule’s major extent.

<a name="geograticule_step" href="#geograticule_step">#</a> geograticule <b>--step</b> <i>value</i>

Sets the graticule’s step.

<a name="geograticule_step_minor" href="#geograticule_step_minor">#</a> geograticule <b>--step-minor</b> <i>value</i>

Sets the graticule’s minor step.

<a name="geograticule_step_major" href="#geograticule_step_major">#</a> geograticule <b>--step-major</b> <i>value</i>

Sets the graticule’s major setp.

<a name="geograticule_precision" href="#geograticule_precision">#</a> geograticule <b>--precision</b> <i>value</i>

Sets the graticule’s precision.

geoproject

<a href="#geoproject-bin" name="geoproject-bin">#</a> <b>geoproject</b> [<i>options</i>…] <i>projection</i> [<i>file</i>] · Source

Projects the GeoJSON object in the specified input file using the specified projection, outputting a new GeoJSON object with projected coordinates. For example, to project standard WGS 84 input using d3.geoAlbersUsa:

geoproject 'd3.geoAlbersUsa()' us.json \
  > us-albers.json

For geometry that crosses the antimeridian or surrounds a pole, you will want to pass input through geostitch first:

geostitch world.json \
  | geoproject 'd3.geoMercator()' \
  > world-mercator.json

Typically, the input coordinates are spherical and the output coordinates are planar, but the projection can also be an arbitrary geometric transformation. For example, to invert the y-axis of a standard spatial reference system such as California Albers (EPSG:3310) and fit it to a 960×500 viewport:

shp2json planar.shp \
  | geoproject 'd3.geoIdentity().reflectY(true).fitSize([960, 500], d)' \
  > planar.json

See also d3.geoProject and d3.geoIdentity.

<a name="geoproject_help" href="#geoproject_help">#</a> geoproject <b>-h</b> <br><a href="#geoproject_help">#</a> geoproject <b>--help</b>

Output usage information.

<a name="geoproject_version" href="#geoproject_version">#</a> geoproject <b>-V</b> <br><a href="#geoproject_version">#</a> geoproject <b>--version</b>

Output the version number.

<a name="geoproject_out" href="#geoproject_out">#</a> geoproject <b>-o</b> <i>file</i> <br><a href="#geoproject_out">#</a> geoproject <b>--out</b> <i>file</i>

Specify the output file name. Defaults to “-” for stdout.

<a name="geoproject_precision" href="#geoproject_precision">#</a> geoproject <b>-p</b> <i>value</i> <br><a href="#geoproject_precision">#</a> geoproject <b>--precision</b> <i>value</i>

Reduce the precision for smaller output files. See also d3.geoQuantize.

<a name="geoproject_newline_delimited" href="#geoproject_newline_delimited">#</a> geoproject <b>-n</b> <br><a href="#geoproject_newline_delimited">#</a> geoproject <b>--newline-delimited</b>

Accept newline-delimited JSON as input, with one feature per line, and generate newline-delimited JSON as output.

<a name="geoproject_require" href="#geoproject_require">#</a> geoproject <b>-r</b> <i>[name=]value</i> <br><a href="#geoproject_require">#</a> geoproject <b>--require</b> <i>[name=]value</i>

Requires the specified module, making it available for use in any expressions used by this command. The loaded module is available as the symbol name. If name is not specified, it defaults to module. (If module is not a valid identifier, you must specify a name.) For example, to reproject the world on the Airocean projection:

geoproject --require d3=d3-geo-polygon 'd3.geoAirocean()' world.geojson

The required module is resolved relative to the current working directory. If the module is not found during normal resolution, the global npm root is also searched, allowing you to require globally-installed modules from the command line.

Multiple modules can be required by repeating this option.

geoquantize

<a href="#geoquantize" name="geoquantize">#</a> <b>geoquantize</b> [<i>options</i>…] [<i>file</i>] · Source

Reads the GeoJSON object from the specified input file and outputs a new GeoJSON object with coordinates reduced to precision. Same options as geoproject.

geoquantize us.json --precision 3 \
  > us-quantized.json

geostitch

<a href="#geostitch-bin" name="geostitch-bin">#</a> <b>geostitch</b> [<i>options</i>…] [<i>file</i>] · Source

Stitches the GeoJSON object in the specified input file, removing antimeridian and polar cuts, and replacing straight Cartesian line segments with geodesic segments. The input object must have coordinates in longitude and latitude in decimal degrees per RFC 7946. Antimeridian cutting, if needed, can then be re-applied after rotating to the desired projection aspect.

See geoproject for an example. See also d3.geoStitch.

<a name="geostitch_help" href="#geostitch_help">#</a> geostitch <b>-h</b> <br><a href="#geostitch_help">#</a> geostitch <b>--help</b>

Output usage information.

<a name="geostitch_version" href="#geostitch_version">#</a> geostitch <b>-V</b> <br><a href="#geostitch_version">#</a> geostitch <b>--version</b>

Output the version number.

<a name="geostitch_out" href="#geostitch_out">#</a> geostitch <b>-o</b> <i>file</i> <br><a href="#geostitch_out">#</a> geostitch <b>--out</b> <i>file</i>

Specify the output file name. Defaults to “-” for stdout.

<a name="geostitch_newline_delimited" href="#geostitch_newline_delimited">#</a> geostitch <b>-n</b> <br><a href="#geostitch_newline_delimited">#</a> geostitch <b>--newline-delimited</b>

Accept newline-delimited JSON as input, with one feature per line, and generate newline-delimited JSON as output.