[geos-commits] [SCM] GEOS branch main updated. fd78305b14f6f32ee95293a03a87abba31c5db81

git at osgeo.org git at osgeo.org
Tue Oct 13 07:27:34 PDT 2026


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  fd78305b14f6f32ee95293a03a87abba31c5db81 (commit)
      from  0d790d12b25a8e1d7310a55ec701e6bf54f73fb2 (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 fd78305b14f6f32ee95293a03a87abba31c5db81
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Oct 13 09:51:19 2026 -0400

    GridIntersection: add test
    
    References https://github.com/isciences/exactextractr/issues/119

diff --git a/tests/unit/operation/grid/GridIntersectionTest.cpp b/tests/unit/operation/grid/GridIntersectionTest.cpp
index 2c5cb8a01..856bbe60d 100644
--- a/tests/unit/operation/grid/GridIntersectionTest.cpp
+++ b/tests/unit/operation/grid/GridIntersectionTest.cpp
@@ -998,4 +998,19 @@ void object::test<53>() {
     ensure(subd->getGeometryN(1)->equals(outside.get()));
 }
 
+template<>
+template<>
+void object::test<54>()
+{
+    Envelope e(0, 10, 0, 10);
+    Grid<bounded_extent> ext(e, 0.1, 0.1);
+
+    auto g = wkt_reader_.read("POLYGON ((0.3 0.3, 4.7 0.3, 2.5 6.2, 0.3 0.3))");
+
+    auto fracs = GridIntersection::getIntersectionFractions(ext, *g);
+    auto tot = std::accumulate(fracs->begin(), fracs->end(), 0.0);
+
+    ensure_equals("check area", tot/100, g->getArea(), 1e-6);
+}
+
 }

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

Summary of changes:
 tests/unit/operation/grid/GridIntersectionTest.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list