[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.7-18-g61bb7f647

git at osgeo.org git at osgeo.org
Thu Nov 3 13:08:43 PDT 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.1 has been updated
       via  61bb7f64760a91b2f1c576e096106c0532705a26 (commit)
      from  d8dcd70a6b5c9a83837dc558aa5b0f4c9d6559bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 61bb7f64760a91b2f1c576e096106c0532705a26
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Nov 3 20:45:58 2022 +0100

    Fix 2.5d topology building regression (geometrically non-closed)
    
    References #5234 in 3.1 branch (3.1.8dev)

diff --git a/NEWS b/NEWS
index 8a19a072a..7b114b272 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ YYYY/MM/DD
   - #5240, ST_DumpPoints crash with empty polygon (Regina Obe)
   - #4648, Check function ownership at extension packaging time (Sandro Santilli)
   - #5241, Crash on ST_SnapToGrid with empty multis (Regina Obe)
+  - #5234, Fix 2.5d topology building regression (Sandro Santilli)
 
 PostGIS 3.1.7
 2022/08/18
diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c
index 7ec18bbab..2b7306522 100644
--- a/liblwgeom/lwgeom_topo.c
+++ b/liblwgeom/lwgeom_topo.c
@@ -1898,7 +1898,7 @@ _lwt_AddFaceSplit( LWT_TOPOLOGY* topo,
     return -2;
   }
   const POINTARRAY *pa = shell->rings[0];
-  if ( ! ptarray_is_closed(pa) )
+  if ( ! ptarray_is_closed_2d(pa) )
   {
     lwpoly_free(shell);
     lwfree( signed_edge_ids );
diff --git a/topology/test/regress/topogeo_addlinestring.sql b/topology/test/regress/topogeo_addlinestring.sql
index c9f34639a..1ee15ca63 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -456,3 +456,14 @@ AND NOT ST_Equals(
     )
   );
 SELECT NULL FROM topology.DropTopology('b4941');
+
+-- See https://trac.osgeo.org/postgis/ticket/5234
+BEGIN;
+SELECT NULL FROM topology.createtopology('b5234', 0, 0, TRUE);
+SELECT 'b5234.0', count(*) FROM
+TopoGeo_addLinestring('b5234',
+  'LINESTRING(0 0 0, 10 0 1, 10 10 3)', 0);
+SELECT 'b5234.1', count(*) FROM
+TopoGeo_addLinestring('b5234',
+  'LINESTRING(10 10 3, 5 0 0.8)', 0);
+ROLLBACK;
diff --git a/topology/test/regress/topogeo_addlinestring_expected b/topology/test/regress/topogeo_addlinestring_expected
index 7bd753d50..6b68149d9 100644
--- a/topology/test/regress/topogeo_addlinestring_expected
+++ b/topology/test/regress/topogeo_addlinestring_expected
@@ -220,3 +220,5 @@ t4758.end|Topology 't4758' dropped
 b4941|outer_ring|1
 b4941|inner_ring|1
 b4941|crossing_line|5
+b5234.0|1
+b5234.1|1

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                                 |  1 +
 liblwgeom/lwgeom_topo.c                              |  2 +-
 topology/test/regress/topogeo_addlinestring.sql      | 11 +++++++++++
 topology/test/regress/topogeo_addlinestring_expected |  2 ++
 4 files changed, 15 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list