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

bilinear polygon extraction? #18

Open
kendonB opened this issue Jul 19, 2020 · 3 comments
Open

bilinear polygon extraction? #18

kendonB opened this issue Jul 19, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@kendonB
Copy link

kendonB commented Jul 19, 2020

The raster and terra R packages provide points extraction via "bilinear" interpolation. This is an appropriate method to extract from rasters that represent point processes such as weather. See the formula here: https://stackoverflow.com/questions/50086717/bilinear-interpolation-artifacts

Is there any clever way to compute the polygon analog of this?

@mdsumner
Copy link

could you expand on what this is? I can't understand it, the point or line case is obvious per vertex but I don't get this, got an example?

@kendonB
Copy link
Author

kendonB commented Mar 24, 2023

I haven't been able to find a worked example, but imagine you create an even grid of n points within the polygon, perform bilinear extraction on those n points, then average. Let n go to infinity and that's the quantity.

@mdsumner
Copy link

ah, ok thanks! that would be like resizing the raster with alg bilinear first, but efficient by only doing it within the polygon/s

that's an interesting case, like using a layer as a mask for lazier downstream workflows, it has other uses but not sure where it belongs

@dbaston dbaston added the enhancement New feature or request label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants