[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.1-24-g642c83329

git at osgeo.org git at osgeo.org
Thu Nov 3 13:01:24 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.3 has been updated
       via  642c8332927e7981ec20e3787388f0f54bfaa5dc (commit)
      from  1936ac744c6ae35599e7cfa71da6a48404538b96 (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 642c8332927e7981ec20e3787388f0f54bfaa5dc
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.3 branch (3.3.2dev)

diff --git a/NEWS b/NEWS
index d8318649f..72bcf3bee 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ xxxx/xx/xx
   - #4648, Check function ownership at extension packaging time (Sandro Santilli)
   - #5241, Crash on ST_SnapToGrid with empty multis (Regina Obe)
   - #5081, Fix error in topology import of self-intersecting rings (Sandro Santilli)
+  - #5234, Fix 2.5d topology building regression (Sandro Santilli)
 
 
 PostGIS 3.3.1
diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c
index a4ca8532f..5988e5a67 100644
--- a/liblwgeom/lwgeom_topo.c
+++ b/liblwgeom/lwgeom_topo.c
@@ -1912,7 +1912,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 e9f4b6f95..84fa46a16 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -490,3 +490,14 @@ SELECT 'b5081', 'faces', count(*)
   FROM b5081.face
   WHERE face_id > 0;
 SELECT NULL FROM topology.DropTopology('b5081');
+
+-- 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 26b18f000..de9b8d8fe 100644
--- a/topology/test/regress/topogeo_addlinestring_expected
+++ b/topology/test/regress/topogeo_addlinestring_expected
@@ -223,3 +223,5 @@ b5081.0|E1
 b5081.1|t
 b5081|dangling_edges|1
 b5081|faces|1
+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