Opened 9 years ago
Closed 9 years ago
#3351 closed defect (fixed)
lwt_RemIsoEdge() bug - Nodes not restored so to be Isolated
Reported by: | esseffe | Owned by: | strk |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.0.8 |
Component: | liblwgeom | Version: | 2.0.x |
Keywords: | Cc: |
Description
lwt_RemIsoEdge() does not correctly restore Nodes to an "Isolated" state after removing the Edge and this causes subsequent calls to lwt_RemIsoNode() to unexpectedly fail raising a "non-isolated node" exception. The following SQL snippet reproduces the issue:
BEGIN; SELECT CreateTopology('topo', 4326, 0); SELECT ST_AddIsoNode('topo', NULL, ST_SetSRID(ST_MakePoint(1, 1), 4326)); SELECT ST_AddIsoNode('topo', NULL, ST_SetSRID(ST_MakePoint(2, 2), 4326)); SELECT ST_AddIsoEdge('topo', 1, 2, ST_GeomFromText('LINESTRING(1 1, 2 2)',4326)); SELECT ST_RemoveIsoEdge('topo', 1); SELECT ST_RemoveIsoNode('topo', 1); ROLLBACK;
Change History (8)
comment:1 by , 9 years ago
Milestone: | PostGIS 2.3.0 → PostGIS 2.1.9 |
---|---|
Version: | trunk → 2.1.x |
comment:2 by , 9 years ago
esseffe do you confirm that removing the isolated edge with ST_RemEdgeModFace makes the test succeed ? (there's really no reason to use ST_RemIsoEdge…)
comment:3 by , 9 years ago
Milestone: | PostGIS 2.1.9 → PostGIS 2.0.8 |
---|---|
Version: | 2.1.x → 2.0.x |
comment:4 by , 9 years ago
comment:5 by , 9 years ago
comment:6 by , 9 years ago
comment:7 by , 9 years ago
Note:
See TracTickets
for help on using tickets.
I've tested this with 2.1 and it also does not update nodes on RemoveIsoEdge, so that part is not a regression (but still a bug). I guess it also happens in 2.0.
What's different in 2.1 is that it does let you remove the node, which is due to RemoveIsoNode in 2.1 checking for isolation by querying the edge table rather than by looking at the "containing_face" field.
So this would be a regression in RemoveIsoNode and a long-standing bug in RemoveIsoEdge.