-
Notifications
You must be signed in to change notification settings - Fork 15
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
aggregate_polygon with multiple bands? #29
Comments
GIS world view: single band (layer). Spatial data cube world view: cube with two raster dimensions (x, y) reduced to single feature dimension (polygons). |
What @edzer said. The ‘statistics’ part implies, i think, that we ‘ll aggregate over positions (i.e. compute statistics over all samples in a polygon) and leave other dimensions/axes intact - i.e. slice the cube in all other dimensions until you’re left with a 2D(x,y or lon,lat) raster of values, compute statistics over that raster with each polygon mask (to get a 1D array of stats objects - one stats per polygon) then combine these arrays into a new cube with layout consistent to the input cube : out[time,band,poly_idx,height] = stats(in[time,band,height, (ALL x,y where x,y inside polygon(poly_idx))]) |
For me this is coupled a bit with the issue about output formats: |
Yes, makes sense what @edzer said. Will add that to the documentation for now. |
Improved the documentation and moved this issue to milestone v0.5 for further improvements as discussed above and in #2. |
Is there still something to do here? Please leave a comment if you see further room for improvements. |
In API v0.3 we implicitly assumed that zonal_statistics() (now: aggregate_polygon()) works on a single band and the user must select one beforehand with filter_bands. This hasn't changed in 0.4 yet, but I think we should either document that it only works on a single band or allow multiple band and document how the results are returned. As I'm not so much into zonal_statistics: How should it work? Single Bands? Multiple Bands?
cc @jdries @mkadunc
The text was updated successfully, but these errors were encountered: