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

PostGIS trac at osgeo.org
Tue Oct 2 21:12:57 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):

 Much better and speed improvement was not lost.

 So timing wise:


 {{{
 -- on 2.0.1 --
 -- 42 tiles at 42,685-43,852 on 2.0.1 Windows 7 x64-bit PostgreSQL 9.2.1
 64-bit
 SELECT ST_AddBand(NULL,ARRAY[ST_Union(rast,1), ST_Union(rast,2),
 ST_Union(rast,3) ]), count(*)
 FROM test_100_100
 WHERE ST_Intersects(rast,  ST_GeomFromText('LINESTRING(230486.436 886271,
 230486.437 887771)',26986) );
 }}}


 on 2.1.0SVN r10361:


 {{{
 -- 42 tiles at 7473ms on 2.1.0 Windows 7 x64-bit PostgreSQL 9.2.1 64-bit
 SELECT ST_AddBand(NULL,ARRAY[ST_Union(rast,1), ST_Union(rast,2),
 ST_Union(rast,3) ]) --, count(*)
 FROM test_100_100
 WHERE ST_Intersects(rast,  ST_GeomFromText('LINESTRING(230486.436 886271,
 230486.437 887771)',26986) );
 }}}

 However there is still a problem.  If I do this:


 {{{
 SELECT ST_Union(rast)
 FROM test_100_100
 WHERE ST_Intersects(rast,  ST_GeomFromText('LINESTRING(230486.436 886271,
 230486.437 887771)',26986) );

 }}}

 It crashes the database service.  Logs show this before service crashes:


 {{{
 Assertion failed: NULL != raster, file rt_api.c, line 7647
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/2024#comment:5>
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