[geos-devel] GeomUnion Bug?
Martin Davis
mbdavis at refractions.net
Fri Sep 7 11:32:39 EDT 2007
Both polygons are invalid. The first is degenerate (a point, which
obviously self-intersects. The second has a non-closed ring.
That's why the result is incorrect - JTS/GEOS methods usually are only
guaranteed to work for valid inputs.
Charlie Savage wrote:
> This makes sense to me:
>
> SELECT astext(GeomUnion(GeomFromText('POINT(-104 40)'),
> GeomFromText('POINT(-105 40)')))
>
> "MULTIPOINT(-105 40,-104 40)"
>
>
>
> But this not so much:
>
> SELECT astext(GeomUnion(GeomFromText('POLYGON((-104 40,-104 40,-104
> 40,-104 40,-104 40))'),
> GeomFromText('POLYGON((-105 40,-105 40,-105
> 40,-105 40,-105 0))')))
>
> "GEOMETRYCOLLECTION EMPTY"
>
> Is this a bug? Or is it supposed work this way? It used to be
> different with Geos 2.2.1 (I assume this is a geos issue so I included
> that mailing list).
>
> Charlie
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
>
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
More information about the geos-devel
mailing list