[geos-devel] question about GEOSUnion?

Obe, Regina robe.dnd at cityofboston.gov
Mon Apr 13 01:32:38 EDT 2009


LiN YongHeng,

your geometry is invalid since first you don't have enough points to form a polygon after you remove the dupes and second you have self intersections.  Therefore the union is undefined at best.

Hope that helps,
Regina


-----Original Message-----
From: geos-devel-bounces at lists.osgeo.org on behalf of LiN YongHeng
Sent: Sun 4/12/2009 9:17 PM
To: geos-devel at lists.osgeo.org
Subject: [geos-devel] question about GEOSUnion?
 
Hello everyone,
I have a question about GEOSUnion().
I give value to g1 and g2 like below:
GEOSGeom g1 = "POLYGON ((1  3, 1  3, 1  6, 1  6, 1 3))"  and GEOSGeom g2 =
"POLYGON ((1  3, 1  3, 1  6, 1  6, 1 3))"  , but if I make union operation
like GEOSGeom g3 =
GEOSUnion(g1, g2), it give me result like "GEOMETRYCOLLECTION EMPTY".
Does anyone can tell me why?



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20090413/dddedf6a/attachment.html


More information about the geos-devel mailing list