[postgis-devel] geomunion and buffer(0) limitations

strk at refractions.net strk at refractions.net
Fri Jul 1 03:28:04 PDT 2005


Markus, I agree with you, I see no reason to allow buffer(point, 1)
and NOT buffer(point, 0).

Anyway, I've disabled the buffer(0) implementation of GeomUnion
for now, and making some tests I've also found a bug in GEOS (dev)
so both releases will require more time to be closed.

Just for reference, geos bug is that this union fails to dissolve
one of the two POINT(0 0):

 geomunion('MULTIPOINT(0 0, 0 0)', 'POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'));

GEOS-2.1.2 and JTS_head return correct result:

 GEOMETRYCOLLECTION(POINT(0 0),POLYGON((1 1,1 2,2 2,2 1,1 1)))

It has to be noted that if second geometry was another point GEOS would
be returning correct results... Is it sure that mixed-typed geoms
can be safely unioned at all Martin (maybe correct answer from JTS
is just the effect of undefined behaviour) ?

--strk;

On Wed, Jun 29, 2005 at 11:11:16PM +0200, Markus Schaber wrote:
> Hi, Strk,
> 
> strk at refractions.net schrieb:
> 
> >>>This can already be done with all postgis releases
> >>>using buffer(collect(the_geom),0);
> >>
> >>Did you notice that this does only work for polygonal geometries, not
> >>for points, lines and mixed geometries?
> > 
> > AAARRRGGHHH!
> > A missing drawback, I new it was too easy !
> > I guess we'll have to switch this behaviour off
> > for 1.0.2 and take more time to fix for 1.1.0
> 
> I remember having read this performance tip in the JTS manuals some time
>  ago, and it seems that the buffer() call changed behaviour during JTS
> evolution. I personally would prefer it to work for all geometries for
> other reasons, too (eliminating a special case in a user defined
> buffer() call parameter).
> 
> Markus
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list