[geos-commits] [SCM] GEOS branch main updated. 3c42d2d52d5df22268dfe58c13f66bc6ef86c423

git at osgeo.org git at osgeo.org
Mon Jan 13 12:11:30 PST 2025


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 "GEOS".

The branch, main has been updated
       via  3c42d2d52d5df22268dfe58c13f66bc6ef86c423 (commit)
       via  63fb272cffe8dcf28864925e12f0e8eb981faa9d (commit)
       via  00c98da08487ca93a1951f50dd41f344402046d2 (commit)
      from  1660b7931aa7c19461bd896206a3679e7961a922 (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 3c42d2d52d5df22268dfe58c13f66bc6ef86c423
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Jan 13 12:10:46 2025 -0800

    Add test case for GH-1225

diff --git a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
index 9818b8b92..dcab53cc8 100644
--- a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
+++ b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
@@ -249,5 +249,17 @@ void object::test<10>
        0.01 );
 }
 
+//
+// https://github.com/libgeos/geos/pull/1225
+//
+template<>
+template<>
+void object::test<11>
+()
+{
+    checkCircle("POLYGON((0 -10,-7.07107 -7.07107,-10 0,-7.07107 7.07107,0 10,7.07107 7.07107,10 0,7.07107 -7.07107,0 -10))",
+        0.1, 0, 0, 9.2387);
+}
+
 
 } // namespace tut

commit 63fb272cffe8dcf28864925e12f0e8eb981faa9d
Author: Benoit Maurin <maurinbe at gmail.com>
Date:   Mon Jan 13 19:20:44 2025 +0100

    Fix tests

diff --git a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
index be67b9a2e..9818b8b92 100644
--- a/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
+++ b/tests/unit/algorithm/construct/MaximumInscribedCircleTest.cpp
@@ -173,7 +173,7 @@ void object::test<5>
 ()
 {
     checkCircle("POLYGON ((100 100, 200 200, 100 100, 100 100))",
-       0.01, 150, 150, 0 );
+       0.01, 100, 100, 0 );
 }
 
 
@@ -198,7 +198,7 @@ void object::test<7>
 ()
 {
      checkCircle("POLYGON((1 2, 1 2, 1 2, 1 2, 3 2, 1 2))",
-       0.01, 2, 2, 0 );
+       0.01, 1, 2, 0 );
 }
 
 // Exception thrown to avoid infinite loop with infinite envelope

commit 00c98da08487ca93a1951f50dd41f344402046d2
Author: Benoit Maurin <maurinbe at gmail.com>
Date:   Mon Jan 13 17:59:31 2025 +0100

    Fix inscribed circle initialization

diff --git a/src/algorithm/construct/MaximumInscribedCircle.cpp b/src/algorithm/construct/MaximumInscribedCircle.cpp
index c3a471078..89c910d3b 100644
--- a/src/algorithm/construct/MaximumInscribedCircle.cpp
+++ b/src/algorithm/construct/MaximumInscribedCircle.cpp
@@ -164,8 +164,8 @@ MaximumInscribedCircle::distanceToBoundary(double x, double y)
 MaximumInscribedCircle::Cell
 MaximumInscribedCircle::createInteriorPointCell(const Geometry* geom)
 {
-    Coordinate c;
     std::unique_ptr<Point> p = geom->getInteriorPoint();
+    Coordinate c(p->getX(), p->getY());
     Cell cell(p->getX(), p->getY(), 0, distanceToBoundary(c));
     return cell;
 }

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

Summary of changes:
 src/algorithm/construct/MaximumInscribedCircle.cpp       |  2 +-
 .../algorithm/construct/MaximumInscribedCircleTest.cpp   | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list