-
Notifications
You must be signed in to change notification settings - Fork 63
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
Some contour polygon is reverse. #52
Comments
It seems that you are computing the contours on the spherical coordinates, then project the resulting polygons. But this creates issues with the holes. If you changed the order of operations (first project, then compute the contours), it would work. I'm sending you a suggestion. See also https://observablehq.com/@d3/cloud-contours and https://observablehq.com/@fil/netcdf |
Thanks very much for your speedy and professional advice, I'm reading your code now, may get back to you if any further help needed. Wish you a nice weekend ahead. |
In the data source(contours.json), masked area(land) is set -1e20. |
Ah, true:
is correct, but with 1e-14 it's broken:
|
I suspect that this is related to numerical instability and I think it’s unlikely that we would implement a fully robust algorithm. Maybe we can at least guarantee consistency with d3.polygonArea though. |
I'm using d3-contour to draw beautiful chart recently. Most of the time it's fine.
But in this case: https://observablehq.com/@choukou/untitled
In hundreds of polygons, one is special
It's counterclockwise. That cause the whole screen green.
Would you give me some help?
The text was updated successfully, but these errors were encountered: