[postgis-tickets] [PostGIS] #2199: [raster] ST_Union not considering other bands except for LAST
PostGIS
trac at osgeo.org
Wed Feb 6 05:34:18 PST 2013
#2199: [raster] ST_Union not considering other bands except for LAST
--------------------+-------------------------------------------------------
Reporter: robe | Owner: dustymugs
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.0
Component: raster | Version: trunk
Keywords: |
--------------------+-------------------------------------------------------
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
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2199>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list