enclose = points => {
const centroid = d3.geoCentroid({ type: "MultiPoint", coordinates: points });
stereo.rotate(centroid.map(d => -d));
const { x, y, r } = d3.packEnclose(stereoCircles(points));
const f = [[x + r, y], [x - r, y], [x, y + r]].map(stereo.invert),
c = d3.geoVoronoi(f).triangles().features[0].properties.circumcenter;
if (d3.geoDistance(c, centroid) > Math.PI / 2) {
c[0] += 180;
c[1] *= -1;
}
return { c, r: (d3.geoDistance(c, f[0]) * 180) / Math.PI };
}