You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
451 B
23 lines
451 B
import {geoProjection as projection} from "d3-geo";
|
|
import {cos, pi, sqrt} from "./math.js";
|
|
|
|
export function eckert5Raw(lambda, phi) {
|
|
return [
|
|
lambda * (1 + cos(phi)) / sqrt(2 + pi),
|
|
2 * phi / sqrt(2 + pi)
|
|
];
|
|
}
|
|
|
|
eckert5Raw.invert = function(x, y) {
|
|
var k = sqrt(2 + pi),
|
|
phi = y * k / 2;
|
|
return [
|
|
k * x / (1 + cos(phi)),
|
|
phi
|
|
];
|
|
};
|
|
|
|
export default function() {
|
|
return projection(eckert5Raw)
|
|
.scale(173.044);
|
|
}
|
|
|