222 | | A more sophisticated version would pass a georeferenced raster instead of just a value matrix so that summarizing function could use this geoereference (e.g. to determine a value from the whole coverage (with ST_Value) when the neighbours are out of the bound of the raster). Passing a raster would allow existing raster functions (like the summarizing function which are to come) and remove the need to pass the dimension since they would correspond to the ST_Width & ST_Height functions. Only the optional "what to do with nodata values" could be needed and some additional parameters. |
| 222 | A more sophisticated version would pass a georeferenced raster instead of just a value matrix so that summarizing function could use this geoereference (e.g. to determine a value from the whole coverage (with ST_Value) when the neighbours are out of the bound of the raster). Passing a raster would allow existing raster functions (like the summarizing function which are to come). Only the optional "what to do with nodata values" could be needed and some additional parameters. In this case the example become: |
| 223 | |
| 224 | SELECT ST_MapAlgebraNgb(rast, 2, 2, "ST_Mean", "ignore") |
| 225 | |
| 226 | and the dimensions do not have to be passed to the summarizing functions since it could deduce them from ST_Width & ST_Height. |