Ticket #336 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

in reply to: ↑ description   Changed 3 years ago by PeteS

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

  Changed 2 years ago by strk

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)

  Changed 2 years ago by strk

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))

  Changed 2 years ago by strk

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.