[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.7-16-gf96b813b1

git at osgeo.org git at osgeo.org
Thu Nov 3 13:12:46 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.0 has been updated
       via  f96b813b13e124d04f9c73595f4ddcdcf3ce1418 (commit)
      from  77d4a70b21ea75e65f8352d56ebd588ae57c0533 (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 f96b813b13e124d04f9c73595f4ddcdcf3ce1418
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)
    
    Closes #5234 in 3.0 branch (3.0.8dev)

diff --git a/NEWS b/NEWS
index 563b072df..2165e4776 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.0.7
 2022/08/18
diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c
index d269f8532..d586dd6ca 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 3ab2265c4..8e9f995fa 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -460,3 +460,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 6166f5527..b94425280 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