> I would like to get the pixel value and geometry without having to group the
> pixels with the same value together as ST_DumpAsPolygons does.
> 
> I my goal is to get pixel values whose center is within a polygon.

SELECT (ST_PixelAsPolygons(ST_Clip(rast, yourpolygon))).val
FROM yourrastertable, yourpolygontable
WHERE ST_Intersects(rast, yourpolygon)

but normally you want to compute some sort of statistic with all those values. 
In this case you use ST_SummaryStats() instead of PixelAsPolygons().

Pierre
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to