#5234 closed defect (fixed)

REGRESSION: ring geometrically not-closed on 3D topology

Reported by: amsilva Owned by: strk
Priority: high Milestone: PostGIS 3.0.8
Component: topology Version: 3.0.x
Keywords: Cc:

Description

When adding an edge to the topology with totopogeom sometimes it gives this error "Corrupted topology: ring of edge x is geometrically not-closed".

I reduced the problem to an example with two lines. The first line is added with no errors to the topology but the second one throws this error. The second line intersects with the first one, but there's no vertex on the intersection. (example attached)

This bug results of a postgis-user post where Sandro Santilli confirmed the bug and complemented with this:

Gory details: the problem likely lays in _lwt_MakeRingShell which was recently changed to NOT use GEOS but rather do things internally, to reduce overhead. The internal implementation is NOT dropping the Z as the geos implementation did.

Attachments (1)

sample_script.sql (1.5 KB ) - added by amsilva 22 months ago.

Download all attachments as: .zip

Change History (11)

by amsilva, 22 months ago

Attachment: sample_script.sql added

comment:1 by strk, 22 months ago

Milestone: PostGIS 3.3.1PostGIS 3.2.4
Priority: mediumhigh
Summary: ring geometrically not-closed on 3D topologyREGRESSION: ring geometrically not-closed on 3D topology

comment:2 by robe, 22 months ago

Milestone: PostGIS 3.2.4PostGIS 3.3.2

comment:3 by strk, 20 months ago

Milestone: PostGIS 3.3.2PostGIS 3.1.8
Version: 3.2.x3.1.x

Version 3.1.7 (and 3.1 branch at time of writing) is also affected. Reduced testcase:

BEGIN;
SELECT NULL FROM topology.createtopology('b5234', 0, 0, TRUE);
SELECT 'b5234.0', TopoGeo_addLinestring('b5234',
  'LINESTRING(0 0 0, 10 0 1, 10 10 3)', 0);
SELECT 'b5234.1', TopoGeo_addLinestring('b5234',
  'LINESTRING(10 10 3, 5 0 0.8)', 0);
ROLLBACK;

comment:4 by strk, 20 months ago

Milestone: PostGIS 3.1.8PostGIS 3.0.8
Version: 3.1.x3.0.x

3.0.8dev (current stable-3.0 branch) is also affected, while I confirm 3.0.1 works.

comment:5 by strk, 20 months ago

The regression was introduced in version 3.0.2 via commit [273b7eaad3e9a6dfae8eef9e29f78dd67582a4ca/git] which references ticket #4709

comment:6 by Sandro Santilli <strk@…>, 20 months ago

In 41a87d3/git:

Fix 2.5d topology building regression (geometrically non-closed)

References #5234 in master branch (3.4.0dev)

comment:7 by Sandro Santilli <strk@…>, 20 months ago

In 642c8332/git:

Fix 2.5d topology building regression (geometrically non-closed)

References #5234 in 3.3 branch (3.3.2dev)

comment:8 by Sandro Santilli <strk@…>, 20 months ago

In 7f5f964/git:

Fix 2.5d topology building regression (geometrically non-closed)

References #5234 in 3.2 branch (3.2.4dev)

comment:9 by Sandro Santilli <strk@…>, 20 months ago

In 61bb7f6/git:

Fix 2.5d topology building regression (geometrically non-closed)

References #5234 in 3.1 branch (3.1.8dev)

comment:10 by Sandro Santilli <strk@…>, 20 months ago

Resolution: fixed
Status: newclosed

In f96b813/git:

Fix 2.5d topology building regression (geometrically non-closed)

Closes #5234 in 3.0 branch (3.0.8dev)

Note: See TracTickets for help on using tickets.