The chicago-parks dataset didn't render right with the upgraded D3 - we got an ugly box that looked like this:
So when we switched to D3 and MapboxGl, I just disabled chicago parks for the time being. This PR fixes it.
The problem is D3 is more particular about the "winding order" for geojson polygons - are the points on a polygon listed in clockwise or counterclockwise order? Most of the time this doesn't matter, but sometimes it does, and chicago-parks is one of those times. (Chicago-parks is I think the first and only dataset that uses both points and polygons in the same dataset - see #208 )
The chicago-parks dataset didn't render right with the upgraded D3 - we got an ugly box that looked like this:
So when we switched to D3 and MapboxGl, I just disabled chicago parks for the time being. This PR fixes it.
The problem is D3 is more particular about the "winding order" for geojson polygons - are the points on a polygon listed in clockwise or counterclockwise order? Most of the time this doesn't matter, but sometimes it does, and chicago-parks is one of those times. (Chicago-parks is I think the first and only dataset that uses both points and polygons in the same dataset - see #208 )
For more about the issue, see this StackOverflow question: https://stackoverflow.com/questions/49311001/d3-js-drawing-geojson-incorrectly and this comment on from the D3 repo: https://github.com/d3/d3-geo/pull/79#issuecomment-280935242
The stackoverflow question gives a couple of examples of how to fix it, I used this commandline utility: https://www.npmjs.com/package/geojson-rewind
The parks dataset now renders correctly, or at least better than before!