projection.clip: sphere, frame, angle #1150
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces two projection options:
projection.clipAngle
a number, passed directly to the projection factory. This also forces fitting the projection to the frame with its restricted sphere path.
projection.clip
same keywords as the mark’s clip option (frame, sphere and null), but interpreted with a different technique.
This option applies to all the paths generated by the geo marks (geo, graticule, and sphere). [EDIT: it's more complicated than that]It defaults to "frame", which uses the clipRectangle post-clip stream; this approach two benefits:
The second option is "sphere", which can be used to add a clip-path to all the geo marks of the plot (an exception is made for the sphere mark itself).
Use null to disable.
Since this changes almost all the test maps, I'm taking this as an opportunity to switch most of them from 50m to 110m geometries, in order to make the tests a bit faster, and the repo a bit smaller.
closes #1137
closes #1131
supersedes #1132