[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-316-g41a87d30f
git at osgeo.org
git at osgeo.org
Thu Nov 3 12:48:01 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, master has been updated
via 41a87d30fb58110e73b0d05978ca9701fe2b17b2 (commit)
from ecc2bdd8b6b25cbdb12ac4e3b0e0ca0602dd81ee (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 41a87d30fb58110e73b0d05978ca9701fe2b17b2
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 master branch (3.4.0dev)
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:
liblwgeom/lwgeom_topo.c | 2 +-
topology/test/regress/topogeo_addlinestring.sql | 11 +++++++++++
topology/test/regress/topogeo_addlinestring_expected | 2 ++
3 files changed, 14 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list