<div dir="ltr">You're probably better served using the first variant which gives you full control over each raster and band to be added.<div><br></div><div>All the other variants of ST_AddBand are wrappers around the first variant.</div>

<div><br></div><div>-bborie</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 13, 2014 at 6:37 AM, David Haynes <span dir="ltr"><<a href="mailto:haynesd2@gmail.com" target="_blank">haynesd2@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a question about this function, regarding the fifth variant.<div>Why does the function assume that all of the rasters input in the array have their information stored at the same band? The variant will only allow for 1 band number to be specified for all rasters.<br>


<div><br></div><div><code>raster <b>ST_AddBand</b>(</code>raster  <var>torast</var>, raster[]  <var>fromrasts</var>, integer  <var>fromband=1</var>, integer  <var>torastindex=at_end</var><code>)</code>;<br>
</div><div><br></div><div>This is will not work</div><div><br></div><div>ST_AddBand(ST_MakeEmptyraster(layers.stack_rast),ARRAY[layers.stack_rast, layers.stack_rast], ARRAY[1,3]) as rast<br></div></div><div><br></div><div>


This does, but assumes that I want band 1 both times.</div><div>ST_AddBand(ST_MakeEmptyraster(layers.stack_rast),ARRAY[layers.stack_rast, layers.stack_rast], 1) as rast<br></div><div><br></div><div>Shouldn't there be a variant that allows that uses an array integer that allows for you to individual specifications of bands.<br>


</div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>