[postgis-devel] [PostGIS] #2024: raster: ST_Union is buggy

PostGIS trac at osgeo.org
Wed Oct 3 05:16:56 PDT 2012


#2024: raster: ST_Union is buggy
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  dustymugs    
     Type:  defect   |      Status:  new          
 Priority:  blocker  |   Milestone:  PostGIS 2.1.0
Component:  raster   |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by robe):

 Slight update, new syntax is much faster for this case, but 2.1.0 still
 loses the race.  Not sure what is going on.  Perhaps my nodata value
 theory goes out since the clip/unclipped in this case don't have the same
 timing. Perhaps its something with clip and not union


 {{{
 -- with clip On 2.1.0SVN new syntax, 8,309ms (on comparable query PostGIS
 2.0 this takes 6,130ms)
 SELECT ST_Union(rast,ARRAY[ROW(1, 'LAST'), ROW(2, 'LAST'), ROW(3,
 'LAST')]::unionarg[])
 FROM (SELECT ST_Clip(rast,geom) As rast
         FROM test_100_100
            CROSS JOIN ST_Buffer(ST_GeomFromText('LINESTRING(231200
 887025,231247 888240)',26986),0.1) As geom
 WHERE ST_Intersects(rast,  geom ) ) As foo;


 -- On 2.1.0SVN no clip, 12,460ms (on comparable query PostGIS 2.0 this
 takes 25,760ms)
 SELECT ST_Union(rast,ARRAY[ROW(1, 'LAST'), ROW(2, 'LAST'), ROW(3,
 'LAST')]::unionarg[])
 FROM (SELECT  rast
         FROM test_100_100
            CROSS JOIN ST_Buffer(ST_GeomFromText('LINESTRING(231200
 887025,231247 888240)',26986),0.1) As geom
 WHERE ST_Intersects(rast,  geom ) ) As foo;
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2024#comment:13>
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-devel mailing list