I use ST_MapAlgebraFct for this sort of things. Look at the example in:
http://geospatialelucubrations.blogspot.ca/2012/07/a-slow-yet-1000x-faster-alternative-to.html that shows how to extract values from another raster coverage. You will have to modify the SQL query in the ST_FirstRasterValue4ma function so it extracts the z value of point instead. Pierre > -----Original Message----- > From: [email protected] [mailto:postgis-users- > [email protected]] On Behalf Of Radan Šuba > Sent: Thursday, October 10, 2013 4:43 AM > To: [email protected] > Subject: Re: [postgis-users] multipoints to raster > > Hey, > > > The dataset of points is already sorted and processed, the points are in > regular grid and they are not overlapping. The relation 1 point = 1 pixel can > be used, where value of pixel should be Z value. The result should look like > heat map. However, ST_AsRaster function cannot be used for that. The > function only create the raster with "footprint of geometry" where all pixels > have same value. Any other suggestions? > > Regards > Radan > > > > > > Hi all, > > > > I want to create raster from multipoints geometry where value of pixels is > > Z value of points. I want to do everything in the database. Is there any > > simple query for that? > > So far, I have found the quite complicated way: First create a empty > > raster with ST_MakeEmptyRaster, secondly ST_AddBand and at the end > > ST_SetValues which is new functions release recently (PostGIS version > 2.1). > > I am wondering how have these conversion been done until now? > > > > Thank for any answer > > Radan _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
