Skip to content
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

Clip polygon #124

Closed
wants to merge 10 commits into from
Closed

Clip polygon #124

wants to merge 10 commits into from

Conversation

Fil
Copy link
Member

@Fil Fil commented Aug 5, 2017

polyhedral uses projection.clipPolygon() if present (d3/d3-geo#108).

This will allow building "maps in a cube" (#86).

We can optionally remove this test once d3-geo has clipPolygon.

Fil added 3 commits August 5, 2017 06:44
if the projection is using antimeridian clipping, use that also for the sphereStream
if the projection is using angle clipping, use 180 (i.e. no clipping) for the sphere stream
@Fil
Copy link
Member Author

Fil commented Aug 5, 2017

For the record 3df20ab#diff-17e3641b0cc55c3ac139841ba77aa058L109 was necessary to avoid

this:
polyhedralwaterman-difference

and this:
polyhedralbutterfly-difference

and this:
capture d ecran 2017-08-05 a 07 57 51

@Fil
Copy link
Member Author

Fil commented Aug 22, 2017

This clipPolygon branch works, but it is a bit messy, and will need in any case to be complemented with the complex branch. (Complex introduces the Cox (equilateral triangle) and Lee (conformal tetrahedral) projections.)

I separated the two needs while developing, but Lee's North aspect needs clipPolygon to work. So, instead of maintaining three branches (clipPolygon, complex, and a merge of them), I think I'd like to PR a unique (& cleanly rebased) branch.

This also needs to settle on d3-geo's API design for clipPolygon().

@Fil
Copy link
Member Author

Fil commented Sep 19, 2017

This is now living in https://github.com/d3/d3-geo-polygon

@Fil Fil closed this Sep 19, 2017
Fil added a commit that referenced this pull request Oct 1, 2017
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
@Fil Fil deleted the clipPolygon branch October 1, 2017 21:38
Fil added a commit that referenced this pull request Feb 20, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant