[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] ST_Clip
From:       David Haynes <haynesd2 () gmail ! com>
Date:       2015-07-22 20:40:25
Message-ID: CAM4C04pAZpBM9Xe5RRvwqMbvxxHW-3Qb0R-GpZWAbX3GJhB9FQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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);

[Attachment #5 (text/html)]

<div dir="ltr">Hello<div><br></div><div>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</div><div><br></div><div>How do I do \
that?</div><div><br></div><div>I tried using:</div><div>array[1,3] as \
bnd</div><div><br></div><div>Didn&#39;t work still returns 13 \
bands.</div><div><br></div><div><div>with bnd_num as</div><div>(</div><div>select \
array[1,3] as bnd</div><div>)</div><div>select p.geoid, p.label, \
ST_Numbands(ST_CLIP(r.rast,p.geom,b.bnd, True))</div><div>from bnd_num b, polygon p \
inner join modis_igbp_stack r on ST_Intersects(r.rast, p.geom);</div></div></div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic