Public
Edited
Jul 21, 2024
8 stars
Insert cell
Insert cell
map(projection.rotate([-40, -35, 37.5])) // φ0 = 40°, λ0= 170°, λ'p = -140° (?????)
Insert cell
import {map} from "@fil/base-map"
Insert cell
projection = {
const { PI: π, sqrt, cos } = Math;
const f = (lambda, phi) => [
Px(phi, lambda) * sqrt(1 - ((2 * phi) / π) ** 2),
Py(phi, lambda) * cos(phi) + Pc(phi)
];

// TODO: invert with Newton
return d3.geoProjection(f);
}
Insert cell
Px = (phi, lambda) =>
lambda *
(A01 +
(A03 + A05 * lambda * lambda) * lambda * lambda +
(A21 + A23 * lambda * lambda + A41 * phi * phi) * phi * phi)
Insert cell
Py = (phi, lambda) =>
phi * ((B12 + B32 * phi * phi + B14 * lambda * lambda) * lambda * lambda)
Insert cell
Pc = (phi, lambda) => phi * (B10 + (B30 + B50 * phi * phi) * phi * phi)
Insert cell
A01 = 0.843705
Insert cell
A03 = 0.009100
Insert cell
A21 = 0.028176
Insert cell
A05 = -0.001242
Insert cell
A23 = -0.001448
Insert cell
A41 = 0.063196
Insert cell
B10 = 0.953366
Insert cell
B30 = 0.033826
Insert cell
B12 = 0.015131
Insert cell
B50 = -0.006287
Insert cell
B32 = -0.025215
Insert cell
B14 = 0.008227
Insert cell
Insert cell
map(projection.rotate(b)) // φ0 = 40°, λ0= 170°, λ'p = -140° (?????)
Insert cell
attitude = require("attitude")
Insert cell
b = attitude([-30, -30, -135]).inverse().angles()
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more