Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function wagner() {
// default values generate wagner8
var poleline = 65 * radians,
parallels = 60 * radians,
inflation = 20,
ratio = 200,
mutate = projectionMutator(wagnerRaw),
projection = mutate(poleline, parallels, inflation, ratio);
projection.poleline = function(_) {
return arguments.length ? mutate(poleline = +_ * radians, parallels, inflation, ratio) : poleline * degrees;
};
projection.parallels = function(_) {
return arguments.length ? mutate(poleline, parallels = +_ * radians, inflation, ratio) : parallels * degrees;
};
projection.inflation = function(_) {
return arguments.length ? mutate(poleline, parallels, inflation = +_, ratio) : inflation;
};
projection.ratio = function(_) {
return arguments.length ? mutate(poleline, parallels, inflation, ratio = +_) : ratio;
};
export default function() {
var n = 6,
rho = 30 * radians,
cRho = cos(rho),
sRho = sin(rho),
m = projectionMutator(gingeryRaw),
p = m(rho, n),
stream_ = p.stream,
epsilon = 1e-2,
cr = -cos(epsilon * radians),
sr = sin(epsilon * radians);
p.radius = function(_) {
if (!arguments.length) return rho * degrees;
cRho = cos(rho = _ * radians);
sRho = sin(rho);
return m(rho, n);
};
p.lobes = function(_) {
if (!arguments.length) return n;
return m(rho, n = +_);
export default function() {
var lobes = 5,
m = projectionMutator(berghausRaw),
p = m(lobes),
projectionStream = p.stream,
epsilon = 1e-2,
cr = -cos(epsilon * radians),
sr = sin(epsilon * radians);
p.lobes = function(_) {
return arguments.length ? m(lobes = +_) : lobes;
};
p.stream = function(stream) {
var rotate = p.rotate(),
rotateStream = projectionStream(stream),
sphereStream = (p.rotate([0, 0]), projectionStream(stream));
p.rotate(rotate);
rotateStream.sphere = function() {
export default function(projectAt) {
var phi0 = 0,
phi1 = pi / 3,
m = geoProjectionMutator(projectAt),
p = m(phi0, phi1);
p.parallels = function(_) {
if (!arguments.length) return [phi0 * degrees, phi1 * degrees];
return m(phi0 = _[0] * radians, phi1 = _[1] * radians);
};
return p;
}
export default function() {
var n = 0.5,
m = projectionMutator(lagrangeRaw),
p = m(n);
p.spacing = function(_) {
return arguments.length ? m(n = +_) : n;
};
return p
.scale(124.75);
}
export default function() {
var K = 1,
m = projectionMutator(hillRaw),
p = m(K);
p.ratio = function(_) {
return arguments.length ? m(K = +_) : K;
};
return p
.scale(167.774)
.center([0, 18.67]);
}
export default function() {
var k = 0.59,
shift = 1.16,
m = projectionMutator(imagoWideRaw),
p = m(k, shift);
p.shift = function(_) {
return arguments.length ? clipped(m(k, (shift = +_))) : shift;
};
p.k = function(_) {
return arguments.length ? clipped(m((k = +_), shift)) : k;
};
function clipped(p) {
const N = 100 + 2 * epsilon,
border = [],
e = 3e-3;
const scale = p.scale(),
center = p.center(),
export function imagoBlock() {
var k = 0.68,
m = projectionMutator(imagoRaw),
p = m(k);
p.k = function(_) {
return arguments.length ? m((k = +_)) : k;
};
var a = -atan(1 / sqrt(2)) * degrees,
border = [
[-180 + epsilon, a + epsilon],
[0, 90],
[180 - epsilon, a + epsilon],
[180 - epsilon, a - epsilon],
[-180 + epsilon, a - epsilon],
[-180 + epsilon, a + epsilon]
];
export default function() {
var H = 4,
m = projectionMutator(healpixRaw),
p = m(H),
stream_ = p.stream;
p.lobes = function(_) {
return arguments.length ? m(H = +_) : H;
};
p.stream = function(stream) {
var rotate = p.rotate(),
rotateStream = stream_(stream),
sphereStream = (p.rotate([0, 0]), stream_(stream));
p.rotate(rotate);
rotateStream.sphere = function() { geoStream(sphere(180 / H), sphereStream); };
return rotateStream;
};
export default function(projectAt) {
var phi0 = 0,
m = projectionMutator(projectAt),
p = m(phi0);
p.parallel = function(_) {
return arguments.length ? m(phi0 = _ * radians) : phi0 * degrees;
};
return p;
}