[postgis-users] ST_Clip

David Haynes haynesd2 at gmail.com
Wed Jul 22 13:40:25 PDT 2015


Hello

I believe I am in appropriately using the ST_Clip function on a multiband
raster. I have a raster with 13 bands and I want to retrieve from the clip
bands # 1,3

How do I do that?

I tried using:
array[1,3] as bnd

Didn't work still returns 13 bands.

with bnd_num as
(
select array[1,3] as bnd
)
select p.geoid, p.label, ST_Numbands(ST_CLIP(r.rast,p.geom,b.bnd, True))
from bnd_num b, polygon p inner join modis_igbp_stack r on
ST_Intersects(r.rast, p.geom);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150722/c7e230bd/attachment.html>


More information about the postgis-users mailing list