[postgis-users] summarizing a polygon values in a raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Apr 10 08:24:05 PDT 2012


> I have been investigating the apparent disappearance of ST_PixelAsPolygons. I
> have updated the database to 2.0 and preformed an apparently successful soft
> upgrade on the database. Still when, when trying to use the function i get:
> 
> ERROR:  function st_pixelaspolygons(raster) does not exist
> 
> when using \df to list functions, it seems that there are two functions called
> ST_PixelAsPolygon (no plural for Polygon):
> 
> public | st_pixelaspolygon                | geometry               | rast raster, band
> integer, x integer, y integer
> public | st_pixelaspolygon                | geometry               | rast raster, x integer, y
> integer

Peter,

There should be two function names: ST_PixelAsPolygon() and ST_PixelAsPolygons(). the first return just one pixel and the second convert a whole tile (or raster) to a set of row, each row being a geometry representing a pixel.

You can find both of them in rtpostgis.sql

Pierre



More information about the postgis-users mailing list