[geos-devel] [GEOS] #343: After applying a buffer over a
multiline the library starts growing in memory usage and hungs
strk
strk at keybit.net
Fri May 14 09:36:23 EDT 2010
On Fri, May 14, 2010 at 03:09:40PM +0200, strk wrote:
> On Thu, May 13, 2010 at 09:22:49AM -0700, Martin Davis wrote:
> > Just tried the buffer-and-union approach in JTS. It works fine - about
> > 70 s for the union, less for the initial buffering. Memory usage was low.
>
> I tried buffer-and-union approach in PostGIS.
> It was very fast !
>
> Some stats:
>
> - Original geometry is a MULTILINESTRING with 3272 components
> - Average number of points per component: 3.3 (from 2 to 93)
> - Total number of points: 10677
>
> Postgis operations with timing:
>
> $ time psql -c 'create table bug_dump2 as select (st_dump(g)).* from bug;'
> real 0m0.330s
> user 0m0.032s
> sys 0m0.012s
>
> $ time psql strk -c 'update bug_dump2 set geom = st_buffer(geom, 0.005)';
> UPDATE 3272
> real 0m0.463s
> user 0m0.040s
> sys 0m0.008s
>
> $ time psql strk -Ac 'select st_npoints(st_union(geom)) from bug_dump2';
> st_npoints: 1336
> real 0m1.181s
> user 0m0.040s
> sys 0m0.008s
>
> This is postgis trunk (to be 2.0.0) with GEOS trunk (to be 3.3.0).
>
> I'm surprised it takes 70 seconds with JTS. Am I doing anything wrong here ?
Note that postgis uses the cascaded union...
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the geos-devel
mailing list