I am using d3 celestial with the d3 geo projection clip Orthographic, is there a way to count the total number of visible stars on displayed within the projection?
I believe the starting point would be using this:
Celestial.container.selectAll(".star").each(function(d) {
if (Celestial.clip(d.geometry.coordinates)) {
I often use if (path({type:"Point", coordinates})) { … } to test is a point is clipped or visible. It works with points, lines, polygons… if they are invisible their path is null.
Hi there
I am using d3 celestial with the d3 geo projection clip Orthographic, is there a way to count the total number of visible stars on displayed within the projection?
I believe the starting point would be using this:
Celestial.container.selectAll(".star").each(function(d) { if (Celestial.clip(d.geometry.coordinates)) {
// Count number of visible stars after clip here
} });
Any help would be much appreciated
Thank you!