Opened 13 years ago

Closed 13 years ago

#1311 closed defect (fixed)

ST_Split robustness issue: ST_CreateTopoGeo T16 regress test fails on 32bit

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: master
Keywords: robustness Cc:

Description

 regress/st_createtopogeo. failed (diff expected obtained: /tmp/pgis_reg_18349/test_16_diff)
-----------------------------------------------------------------------------
--- regress/st_createtopogeo_expected   2011-11-20 21:22:06.000000000 +0100
+++ /tmp/pgis_reg_18349/test_16_out     2011-11-21 09:39:20.000000000 +0100
@@ -37,6 +37,7 @@
 T15|GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0),LINESTRING(0 0,10 10),LINESTRING(0 0,5 2,10 10),LINESTRING(10 10,12 10))
 T15|4 nodes|4 edges|1 faces
 T16|GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(0 3,20 4),LINESTRING(10 0,20 4))
-T16|4 nodes|3 edges|0 faces
+T16|5 nodes|3 edges|0 faces
+T16|1 isolated nodes in face 0
 T17|MULTILINESTRING((832709.937 816560.25,832705.813 816470.25,832661.937 816561.875),(832705.812 816470.25,832709.937 816560.25),(832661.938 816561.875,832705.813 816470.25))
 T17|7 nodes|8 edges|2 faces
-----------------------------------------------------------------------------

Change History (7)

comment:1 by strk, 13 years ago

POSTGIS="2.0.0SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.6" USE_STATS

comment:2 by strk, 13 years ago

Not fixed by upgrading GEOS:

 PostgreSQL 8.4.9 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3, 32-bit
 Postgis 2.0.0SVN - 2011-11-21 08:35:52
   GEOS: 3.4.0dev-CAPI-1.8.0
   PROJ: Rel. 4.7.1, 23 September 2009

comment:3 by strk, 13 years ago

Status: newassigned

The topology created on the 32 bit has these nodes:

       2 | POINT(0 3)
       3 | POINT(2.22044604925031e-15 3)
       5 | POINT(20 4)
       1 | POINT(0 0)
       4 | POINT(10 0)

You can see nodes 2 and 3 should likely be the same point.

Input was: GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(0 3,20 4),LINESTRING(10 0,20 4))

comment:4 by strk, 13 years ago

Keywords: robustness added

Edge splitting is the culprit here:

DEBUG:  Merged edges: LINESTRING(0 0,10 0,20 4,0 3)
DEBUG:  Collected input points: MULTIPOINT(0 0,0 3,10 0,20 4)
DEBUG:  Noded split edges: MULTILINESTRING((20 4,2.22044604925031e-15 3),(0 0,10 0),(10 0,20 4))

comment:5 by strk, 13 years ago

In turn:

=> select st_astext(st_split('LINESTRING(0 0,10 0,20 4,0 3)', 'POINT(10 0)'));
GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(10 0,20 4,2.22044604925031e-15 3))

comment:6 by strk, 13 years ago

Summary: ST_CreateTopoGeo: T16 regress test fails on 32bitST_Split robustness issue: ST_CreateTopoGeo T16 regress test fails on 32bit

comment:7 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

r8212 fixes this. see #1314 for further thoughts on the matter.

Note: See TracTickets for help on using tickets.