[postgis-users] Insert st_pixelaspolygons output into new table
strk at keybit.net
Wed Apr 4 09:02:39 PDT 2012
On Wed, Apr 04, 2012 at 07:38:00PM +0400, Gis Mage wrote:
> Hi list!
> I want to create a table of points, representing every pixel in
> another raster table.
> For that I plan to use st_centroid of every square polygon returned by
> The problem is that st_pixelaspolygon returns set of records, which I
> can't insert into new table, or create table as output from this
> I need to extract geom and val or some kind of wrapper - I'm really
> stuck here - never worked with record type in postgres.
WITH records AS ( SELECT (ST_PizelAsPolygons(rast)).* FROM mytable )
SELECT geom,val FROM records;
| __/ | Delivering high quality PostGIS 2.0 !
| / 2.0 | http://strk.keybit.net - http://vizzuality.com
More information about the postgis-users