I'm planning to write up some more examples in the docs, but here is what we have so far for ST_Union documentation.
http://www.postgis.org/documentation/manual-svn/RT_ST_Union.html -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Paragon Corporation Sent: Thursday, December 22, 2011 2:44 PM To: 'PostGIS Users Discussion' Subject: Re: [postgis-users] raster map algebra question(s) Steve, Depends how your data is setup -- I'm assuming you are looking for a moving average? If for example you have a raster record for each date in the same table, with a field denoting the date, then the best bet is probably use ST_Union with the optional MEAN expression. I haven't stress tested that yet. So say you have a table Rast, temp_date Then you can do a SELECT ST_Union(rast, 'MEAN' ) OVER (ROWS BETWEEN 1 PRECEDING AND CURRENT ROW ORDER BY temp_date) As newrast, temp_date FROM temperatures; Haven't tried using with window aggregates , but the above should work. Also note the ROWS with number ranges was introduced in PostgreSQL 9.0 so that particular syntax won't work with 8.4. Hope that helps, Regina -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Crawford Sent: Thursday, December 22, 2011 2:23 PM To: PostGIS Users Discussion Subject: [postgis-users] raster map algebra question(s) Thanks to all who helped me on my previous raster output questions; I now have a better handle on what I can (and can't) do. How can I do map algebra across raster tables? I have a db of raster tables (all the same extend) with weather variables by date. I have a number of ways i want to use these data, but in the initial case I would like to, as an example, create a new raster table where the data value at each cell is the average of the previous day's values. Any thoughts? Thanks, Steve -- Stephen Crawford Center for Environmental Informatics The Pennsylvania State University _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
