All examples By author By category About

jczaplew

Pole-wrapping geometry issue

These three maps demonstrate that under some conditions, the winding order of large polygons that wrap the poles is incorrectly guessed by D3. Converting to Topojson (topojson -o plates.topojson -p --no-stitch-poles -- plates.geojson) forces a consistent winding order (see https://github.com/mbostock/d3/wiki/Geo-Paths#wiki-_path), but in this case does not fix the problem.

It is also important to note that this error only throws an error in Chrome Canary and simply does not draw the problematic polygon, whereas in every other browser (Chrome Stable, Firefox, Safari) no error is thrown to the console and the problematic polygon is draw with the wrong winding order.