pjungwir / aggs_for_vecs

Postgres C extension with aggregate functions for array inputs
MIT License
33 stars 5 forks source link

Add support for two dimensional arrays? #18

Open viktorras opened 3 weeks ago

viktorras commented 3 weeks ago

aggs_for_vecs seem to support only one-dimensional arrays. How complicated would it be to support two-dimensional arrays also?

My use case is that I would like to perform time based statistical analysis of Postgis raster data as fast as possible I could for example extract the data for each day as 2D arrays with ST_DumpValues (https://postgis.net/docs/RT_ST_DumpValues.html) and then aggregate with aggs_for_vecs to find for example the mean value for each cell then write the result back to a raster with ST_SetValues

pjungwir commented 3 weeks ago

I think this is a cool idea! It will be a while before something like this is at the top of my priorities though. If you are interested in working on it, I would certainly be willing to review your work.