points = (feature, scale) => {
const c = d3.geoCentroid(feature);
const projection = d3
.geoAzimuthalEquidistant()
.rotate([-c[0], -c[1]])
.fitSize([scale, scale], feature);
const geopath = d3.geoPath().projection(projection);
const path = svg`<path d="${geopath(feature)}" stroke=black fill=none>`;
const l = path.getTotalLength();
const pts = d3.range(0, l).map((i) => {
const p = path.getPointAtLength(i);
return projection.invert([p.x, p.y]);
});
const d0 = d3.geoDistance(pts[0], pts[1]) * (15500 / Math.PI);
return Object.assign(d3.shuffle(pts), { d0 });
}