[postgis-users] Points to Raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Nov 12 10:53:02 PST 2012


The trick is to rasterize the points into well aligned rasters and then to union them:

SELECT ST_Union(ST_AsRaster(geom, 1.0, 1.0, 0.0, 0.0, '32BUI', val, -1))
FROM  testpoints

Pierre

> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> bounces at lists.osgeo.org] On Behalf Of John Beck
> Sent: Friday, November 09, 2012 9:34 PM
> To: postgis-users at lists.osgeo.org
> Subject: [postgis-users] Points to Raster
> 
> Dear List,
> 
> I have a simple point geometry table in PostGIS that holds a value in its VALUE
> column. I was wanting to convert this x,y point table into a raster table or a
> raster file (png)and use this VALUE Column to assign the value to the pixel. I was
> trying to use the ST_AsRaster command but I could not get it to work. Can
> someone please give me an example on how to convert an existing table of xy
> points in PostGIS called MY_POINTS into a raster table called MY_RASTER or a
> png file?
> 
> Thanks
> 
> JB
> 
> 



More information about the postgis-users mailing list