[postgis-devel] [PostGIS] #2024: raster: ST_Union is buggy
PostGIS
trac at osgeo.org
Wed Oct 3 04:59:27 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):
dustymugs,
I found a performance issue. I thought I was imaging things in my test
here when I was noticing the phenomenon:
http://www.bostongis.com/blog/index.php?/archives/198-Waiting-for-
PostGIS-2.1-Faster-Raster-Union.html
that 2.1 speed wasn't changing with clipping and yet 2.0 was which is the
hack I use to make 2.0 work faster.
It seems to me that 2.1.0 is computing over no data values. So I have
concocted a more ridiculous test to highlight the issue. One in which
PostGIS 2.0 trumps 2.1.0.
the result looks same in both so not sure if its the union or the clipping
that is at issue.
-- clip union 2.0 wins
-- On 2.1.0SVN, 11,415 ms (on PostGIS 2.0 this takes 6,130ms)
{{{
SELECT ST_AddBand(NULL,ARRAY[ST_Union(rast,1), ST_Union(rast,2),
ST_Union(rast,3) ]) , count(*)
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;
}}}
-- no clip, 2.1.0 doesn't exhibit much speed difference between clip and
non-clip
-- On 2.1.0SVN, 12,555ms (on PostGIS 2.0 takes 25,814ms)
{{{
SELECT ST_AddBand(NULL,ARRAY[ST_Union(rast,1), ST_Union(rast,2),
ST_Union(rast,3) ]) , count(*)
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:12>
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