projection = ({
Airocean: d3
.geoAirocean()
.angle(-150)
.fitExtent(
[
[2, 2],
[width - 2, height - 2]
],
{ type: "Sphere" }
),
Icosahedral: d3
.geoIcosahedral()
.faceProjection((face) => {
var c = face.site.map((d) => -d);
c[2] = Math.abs(c[1] - 52.62) < 1 || Math.abs(c[1] + 10.81) < 1 ? 60 : 0;
return d3
.geoProjection(d3.geoGrayFullerRaw())
.rotate(c)
.translate([0, 0]);
})
.rotate([-83.65929, 25.44458, -87.45184])
.angle(60)
.fitExtent(
[
[2, 2],
[width - 2, height - 2]
],
{ type: "Sphere" }
),
IcosahedralGnomonic: d3
.geoIcosahedral()
.faceProjection((face) => {
var c = face.site.map((d) => -d);
c[2] = Math.abs(c[1] - 52.62) < 1 || Math.abs(c[1] + 10.81) < 1 ? 60 : 0;
return d3.geoProjection(d3.geoGnomonicRaw).rotate(c).translate([0, 0]);
})
.rotate([-83.65929, 25.44458, -87.45184])
.angle(90)
.fitExtent([
[2, 2],
[width - 2, height - 2]
]),
Orthographic: d3
.geoOrthographic()
.rotate([-110, -35])
.fitExtent(
[
[2, 2],
[width - 2, height - 2]
],
{ type: "Sphere" }
),
Mercator: d3.geoMercator().fitExtent(
[
[2, 2],
[width - 2, height - 2]
],
{ type: "Sphere" }
)
}[projname])