Opened 14 years ago

Closed 13 years ago

#336 closed defect (fixed)

Create union Fails

Reported by: PeteS Owned by: geos-devel@…
Priority: trivial Milestone:
Component: Default Version: 3.2.0
Severity: Unassigned Keywords:
Cc:

Description

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?

Change History (4)

in reply to:  description comment:1 by PeteS, 14 years ago

Replying to 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

comment:2 by strk, 13 years ago

Nothing wrong I can think of. Try with current SVN version of GEOS, and also see if you can produce an XML based testcase (see tests/xmltester/tests/bug275.xml for an example)

comment:3 by strk, 13 years ago

FYI: using geos-svn here gives good result:

POLYGON((0 1,0 8,1 8,1 1,8 1,8 0,0 0,0 1))

comment:4 by strk, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.