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

expose the area of the geometry as *geometry*.area #47

Closed
wants to merge 1 commit into from
Closed

Conversation

Fil
Copy link
Member

@Fil Fil commented Jul 9, 2020

It can be used, for example, to filter out "frames", i.e. the whole rectangle returned for a value <= min(values) (here the very light blue region), by testing geometry.area > n * m - 3/4
https://observablehq.com/d/0cef46faf6b9c53c
image

See #14

Computing the area can be done user-side, however it doesn't cost anything to add it here, since we've already computed it.

It can be used, for example, to filter out "frames", i.e. the whole rectangle returned for a value < min(values), by testing geometry.area > n * m - 3/4
https://observablehq.com/d/0cef46faf6b9c53c

See #14
@mbostock
Copy link
Member

mbostock commented Jul 9, 2020

I agree this is easy to expose, but I don’t think it’s especially useful per discussion on #14. So I’d prefer to minimize the exposed API.

@Fil
Copy link
Member Author

Fil commented Jul 9, 2020

👍
I've published a documentation notebook instead https://observablehq.com/@fil/noframe-contours

@Fil Fil closed this Jul 9, 2020
@Fil Fil deleted the area-14 branch July 9, 2020 14:49
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

2 participants