[postgis-users] ST_Clip

Paolo Cavallini cavallini at faunalia.it
Thu Jul 26 11:04:20 PDT 2012


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schermata del 2012-07-26 20:03:43.png
Type: image/png
Size: 5695 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120726/e9723341/attachment.png>


More information about the postgis-users mailing list