d3-geo-polygon
d3-geo-polygon copied to clipboard
planar polygon clipping
The Imago projection needs to use polygon clipping; but it seems a bit absurd that we are doing spherical clipping (with 200 control points computed as the inverse of 200 planar points) just to do what is in the end a simple rectangular clipping. The thing is tricky because, so close to the limit, the spherical interpolation between control points might jump from one side to the other.
See https://github.com/d3/d3-polygon/issues/4