[geos-devel] Re: [GEOS] #336: Create union Fails

GEOS geos-trac at osgeo.org
Wed Mar 31 16:59:52 EDT 2010


#336: Create union Fails
------------------------+---------------------------------------------------
 Reporter:  PeteS       |        Owner:  geos-devel at lists.osgeo.org
     Type:  defect      |       Status:  new                       
 Priority:  trivial     |    Milestone:                            
Component:  Default     |      Version:  3.2.0                     
 Severity:  Unassigned  |   Resolution:                            
 Keywords:              |  
------------------------+---------------------------------------------------
Comment (by PeteS):

 Replying to [ticket:336 PeteS]:
 > I'm most likely doing something stupid. I'm trying to create a simple
 union between two polygons...
 >
 > I'm using version 3.2
 >
 > GEOSContextHandle_t handle = initGEOS_r( exception_handler,
 exception_handler);
 >
 > GEOSGeometry * poly1 = GEOSGeometryFromWKT_r (handle, "POLYGON((0 1,0
 8,1 8,1 1,0 1))");
 >
 > GEOSGeometry * poly2 = GEOSGeometryFromWKT_r (handle, "POLYGON((0 0,0
 1,8 1,8 0,0 0))");
 >
 > GEOSGeometry * poly2 = GEOSUnion_r(handle,poly1,poly2);
 >
 > I get "assertion failed: intSegs.size() == 4, file
 FastNodingValidator.cpp, line 60"
 >
 > What am I doing wrong?
 NOTE: Just to clarify, there's a typo in the description, the final line
 of code should read "GEOSGeometry * poly3 = GEOSUnion_r..."  not poly2

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/336#comment:1>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list