-
Notifications
You must be signed in to change notification settings - Fork 203
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
Polygon clipping: d3.geoPolyhedral() now uses d3-geo-polygon if the plugin is available #132
Conversation
Note that d3-geo-polygon is still unstable. When we stream points that belong to the clipping polygon itself, it sometimes bleeds out -- for example on the Waterman projection with a default aspect -- rotate [0,0]). I have been as conservative as possible: d3-geo-projection works as usual without d3-geo-polygon, and checks that it has projection.preclip (d3-geo > 1.8.1). Examples and issues at [d3-geo-polygon](https://github.com/d3/d3-geo-polygon) Solves #129 Solves #124 Solves d3/d3-geo#108 Solves #86
… would not interesect the polygon and its visibility would be inverted)
…images that are slightly (but not visibly) different
I am on vacation this week but I am excited you made a breakthrough here! |
A new issue comes up with this approach: now we're not cutting, but clipping, which means a small (epsilon-wide) band is removed from the sphere. We are no longer in a full-world projection: by way of consequence, if we path() a point that is exactly on that band, e.g. [0,0] on the polyhedralWaterman, it is not drawn any more. (It doesn't change much anything else.) A solution for this could be to add an option in d3-geo-polygon to remove the test on pointVisible for stream.point, and use that option from d3.geoPolyhedral(). |
… in an invisible way)
…ministic d3-geo-polygon (cf. d3/d3-geo-polygon@9513bb8)
…alButterfly, geoPolyhedralCollignon and geoPolyhedralWaterman, with minimal code duplication. With this version, d3/d3-geo-projection#132 is not needed anymore. (If you need to use both d3-geo-projection and d3-geo-polygon, they should be included in that order.)
…alButterfly, geoPolyhedralCollignon and geoPolyhedralWaterman, with minimal code duplication. With this version, d3/d3-geo-projection#132 is not needed anymore. (If you need to use both d3-geo-projection and d3-geo-polygon, they should be included in that order.)
This is not necessary anymore to use d3-geo-polygon: beginning with v1.2.0, d3-geo-polygon includes its own versions of d3-geo-projection's four polyhedral symbols. |
(clean-up of PR #130)