You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ring DBCA is merged with CIJB, I believe that the first polygon retains ring EFGH. However, the other ring, KLMN, is considered a “standalone ring” not belonging to any exterior ring, and thus two polygons result from stitching:
However, collapsing a Polygon into a MultiPolygon isn’t valid GeoJSON, since it means that the Polygon may have multiple exterior rings. This only works because d3-geo appears to not be dependent on GeoJSON ring semantics, at least for rendering, relying only on winding order.
The text was updated successfully, but these errors were encountered:
Consider the case of two polygons in a MultiPolygon, each with their own distinct hole, where the line BC is on the antimeridian:
The first polygon starts with these fragments:
The second polygon starts with these fragments:
When ring DBCA is merged with CIJB, I believe that the first polygon retains ring EFGH. However, the other ring, KLMN, is considered a “standalone ring” not belonging to any exterior ring, and thus two polygons result from stitching:
Furthermore, since KLMN has the opposite winding order, it now covers most of the sphere rather than just be a hole inside BADCIJ.
This problem can be avoided by putting every ring in a MultiPolygon into a single Polygon, as demonstrated here:
https://bl.ocks.org/mbostock/83c0be21dba7602ee14982b020b12f51
However, collapsing a Polygon into a MultiPolygon isn’t valid GeoJSON, since it means that the Polygon may have multiple exterior rings. This only works because d3-geo appears to not be dependent on GeoJSON ring semantics, at least for rendering, relying only on winding order.
The text was updated successfully, but these errors were encountered: