d3 / d3-geo-projection

Extended geographic projections for d3-geo.
https://observablehq.com/collection/@d3/d3-geo-projection
Other
1.1k stars 201 forks source link

geoStitch mislabels the union of two Polygons forming a hole on the date line as a MultiPolygon #216

Open xoolive opened 2 years ago

xoolive commented 2 years ago

@Fil and I identified an issue with d3.geoStitch.
Not sure how close it is related to #108.

The use case is based on two regular polygons forming a hole when they join on the date line. The coordinates of the result are correct, in the correct winding order, but the shape is incorrectly tagged as a MultiPolygon and the inner polygon being marked as an outer polygon covers the whole sphere.

A------B B-----C
|      | |     |
|   E--D |     |
|   |    |     |
|   F--G |     |
|      | |     |
K------J J-----H

Full details on https://observablehq.com/@fil/geostitch-bug-nzzo