id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 2199,[raster] ST_Union only considering first band if uniontype specified,robe,robe,"I'm not sure if this was just missed or too hard to do. If difficult, I guess we just need to amend the docs. Anyrate if I explicitly say 'LAST' vs. leaving it out I should get the same answer. It seems ST_Union is still only returning first band if you specify a union type. Observe: -- this returns bright beautiful picture -- {{{ (WITH mset AS ( SELECT ROW_NUMBER() OVER() As rnum, rast FROM (SELECT ST_Tile(rast, (ST_Width(rast))::integer/2, ST_Height(rast)/2) As rast FROM (SELECT ST_Resize(rast,0.10,0.10) As rast FROM pics WHERE filename='Mona_Lisa.jpg' LIMIT 1) As foo ) As foofoo ) SELECT ST_Union(ST_SetUpperLeft(rast,ST_UpperLeftX(rast)*-1,ST_UpperLeftY(rast)*-1)) FROM mset where rnum IN(1,2)) }}} -- this returns grey scale -- verified it ST_NumBands only returns 1 --- {{{ SELECT ST_Union(ST_SetUpperLeft(rast,ST_UpperLeftX(rast)*-1,ST_UpperLeftY(rast)*-1), 'LAST') FROM mset where rnum IN(1,2)) }}} See attached images. Using same image I described here from wikipedia http://www.bostongis.com/blog/index.php?/archives/207-Waiting-for-PostGIS-2.1-ST_Tile.html ",enhancement,closed,medium,PostGIS 2.1.0,documentation,master,fixed,,