Now what if you symbolize the value of the raster properly (1 = white and -1 = black) to display the shape of the buffer?
> -----Original Message----- > From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users- > boun...@postgis.refractions.net] On Behalf Of Paolo Cavallini > Sent: Thursday, July 26, 2012 2:04 PM > To: postgis-users@postgis.refractions.net > Subject: Re: [postgis-users] ST_Clip > > Il 26/07/2012 19:54, Paolo Cavallini ha scritto: > > Il 26/07/2012 19:39, Pierre Racine ha scritto: > >> What happen if do a query like this: > >> > >> SELECT (gv).geom, (gv).val > >> FROM (SELECT > ST_PixelAsPolygons(ST_AsRaster(ST_Buffer(ST_Centroid(ST_Envelope(rast)), > 0.5000), rast, ST_BandPixelType(rast, 1), 1, -1)) gv > >> FROM hdr > >> WHERE rid = 4 > >> ) foo > >> > >> and display the resulting geometries labelled with the values? > >> > >> This is the first step of the clipping: creating a rasterized version of > >> the buffer > geometry aligned on the raster. > If I redo the query with the same buffer size as my previous one, I > obtain a grid that encloses exactly the buffer; the raster is smaller. > See attached. > Thanks. > > -- > Paolo Cavallini - Faunalia > www.faunalia.eu > Full contact details at www.faunalia.eu/pc > Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users