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
Aggregation with the stars object partially fails (incomplete), but when changing stars to sf this works very well #317
Comments
This thread is quite stale, but I am now having the same issue. Did you ever figure out a solution? Very puzzling, but thanks to your thread was able to convert to SF as a work around. |
Yes, great issue. In the |
Thank you for your response here— yes, I understand. I would argue that changing the behavior to allow each pixel to be 'assigned' to multiple geometries probably is more in line with many use cases when Does setting In the end I decided to do the aggregation like:
Where |
That disaggregates pixels, rather than aggregating them.
It only works if |
In @alexyshr 's example above, st_interpolate_aw(h_nh_c.stnoxy, mun$geometry, FALSE) also works and gives you a proper mean or sum, similar to how |
Dear all,
Using the function aggregate, I want to get the maximum value of every numerical attribute of a stars object (h_nh_c.stnoxy) by an sf object (mun$geometry), but the result is incomplete (704 polygons are out). If I change the stars object to sf (h_nh_c.sf), the aggregate will return a value for all the polygons. Is this a normal behaviour of aggregate with stars?
Best
Alexys
The text was updated successfully, but these errors were encountered: