-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d3.geoCentroid sometimes returns the wrong result? #81
Comments
Support for area-weighted polygon centroids was added in D3 3.2. Related d3/d3@492215a d3/d3#1011 d3/d3#1286. Interestingly, the prior behavior is more accurate for this input. |
in |
if I apply this patch then some tests fail, but by not much — moreover, the failing tests are weird:
the actual result (with (Looks like we're not testing features but non-regression.) |
I dunno, sorry. |
Fix is live at https://bl.ocks.org/Fil/8090c35ded3e46368843dfed82543617 |
Released in 1.4.2. |
I took the time to write this up so that the next person who wants to understand the code might spend less time on it. (In any case it wasn't time wasted.) |
https://bl.ocks.org/mbostock/c62c0d706d1f046f84c0f0cf698bc0a9
Moved from d3/d3#1883. /cc @Fil
The text was updated successfully, but these errors were encountered: