Opened 8 years ago

Closed 8 years ago

#3224 closed defect (invalid)

wrong test condition in lwt_AddIsoEdge()

Reported by: esseffe Owned by: strk
Priority: high Milestone: PostGIS 2.2.0
Component: topology Version: master
Keywords: Cc:


I noticed a trivial typo within the lwt_AddIsoEdge() code causing logical inversion in a rather critical test. the following patch seems to resolve any issue:

lwgeom_topo.c - line 720

  const LWT_ISO_NODE *n = &(endpoints[i]);
- if ( n->containing_face == -1 )
+ if ( n->containing_face != -1 )
     _lwt_release_nodes(endpoints, num_nodes);
     lwerror("SQL/MM Spatial exception - not isolated node");
     return -1;

Change History (3)

comment:1 by robe, 8 years ago

Component: liblwgeomtopology
Owner: changed from pramsey to strk

comment:2 by robe, 8 years ago

Version: 2.1.xtrunk

comment:3 by strk, 8 years ago

Resolution: invalid
Status: newclosed

The test is actually correct. If containing_face is -1 then the node is NOT isolated. Isolated nodes are contained by a face, not-isolated nodes might be touching points between multiple faces thus they have a NULL (-1) containing_face value.

Note: See TracTickets for help on using tickets.