Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
const point: [number, number] = rotation([54, 2]);
const inverted: [number, number] = rotation.invert([54, 2]);
// ----------------------------------------------------------------------
// Spherical Shapes - geoCircle
// ----------------------------------------------------------------------
// Create GeoCircleGenerator ============================================
// simple use case
let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle();
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
const point: [number, number] = rotation([54, 2]);
const inverted: [number, number] = rotation.invert([54, 2]);
// ----------------------------------------------------------------------
// Spherical Shapes - geoCircle
// ----------------------------------------------------------------------
// Create GeoCircleGenerator ============================================
// simple use case
let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle();
// complex use as part of object
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
const point: [number, number] = rotation([54, 2]);
const inverted: [number, number] = rotation.invert([54, 2]);
// ----------------------------------------------------------------------
// Spherical Shapes - geoCircle
// ----------------------------------------------------------------------
// Create GeoCircleGenerator ============================================
// simple use case
let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle();
// complex use as part of object
length = d3Geo.geoLength(sampleExtendedGeometryCollection);
length = d3Geo.geoLength(sampleFeature);
length = d3Geo.geoLength(sampleExtendedFeature1);
length = d3Geo.geoLength(sampleExtendedFeature2);
length = d3Geo.geoLength(sampleFeatureCollection);
length = d3Geo.geoLength(sampleExtendedFeatureCollection);
// geoInterpolate(...) ====================================================
const interpolateFct: (t: number) => [number, number] = d3Geo.geoInterpolate([54, 2], [53, 1]);
// geoRotation(...) =======================================================
// create rotation -----------------------------------------------------
const rotation: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45]);
const rotation2: d3Geo.GeoRotation = d3Geo.geoRotation([90, 45, 27.5]);
// use rotation --------------------------------------------------------
const point: [number, number] = rotation([54, 2]);
const inverted: [number, number] = rotation.invert([54, 2]);
// ----------------------------------------------------------------------
// Spherical Shapes - geoCircle
// ----------------------------------------------------------------------
// Create GeoCircleGenerator ============================================
// simple use case
let circleGeneratorSimple: d3Geo.GeoCircleGenerator = d3Geo.geoCircle();
export default function chamberlin(p0, p1, p2) { // TODO order matters!
var c = centroid({type: "MultiPoint", coordinates: [p0, p1, p2]}),
R = [-c[0], -c[1]],
r = rotation(R),
f = chamberlinRaw(pointRadians(r(p0)), pointRadians(r(p1)), pointRadians(r(p2)));
f.invert = solve2d(f);
var p = projection(f).rotate(R),
center = p.center;
delete p.rotate;
p.center = function(_) {
return arguments.length ? center(r(_)) : r.invert(center());
};
return p
.clipAngle(90);
}
export default function modifiedStereographic(coefficients, rotate) {
var p = projection(modifiedStereographicRaw(coefficients)).rotate(rotate).clipAngle(90),
r = rotation(rotate),
center = p.center;
delete p.rotate;
p.center = function(_) {
return arguments.length ? center(r(_)) : r.invert(center());
};
return p;
}