How can I create a tile-based aggregation of polygons with PostgreSQL/PostGIS? The input of such an operation could be the database table with the geometry and the data to aggregate, a bounding box, and the tile size and the method which should be used for the aggregation (sum, average, minimum, maximum).
The output would be a list of geometries with the outlines of the tiles and the aggregated values.
I found this operation in Oracle Spatial but could not find a solution on how to do this with PostGIS.