[geos-commits] [SCM] GEOS branch main updated. 6f4340223234824350773dca530424e55a734e22

git at osgeo.org git at osgeo.org
Thu Oct 1 08:24:38 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  6f4340223234824350773dca530424e55a734e22 (commit)
      from  5885024d0f7f58085c8ca5260be58863c24410e5 (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 6f4340223234824350773dca530424e55a734e22
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Oct 1 17:23:23 2026 +0200

    Set SRID to GEOSisSimpleDetail output too, and allow null locations pointer

diff --git a/NEWS.md b/NEWS.md
index ccf7bf58a..6891059d3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,6 +5,7 @@
   - Curve overlay robustness improvements (GH-1513, Dan Baston)
   - GeometrySplitter: Allow splitting a MultiSurface (GH-1520, Dan Baston)
   - GEOSGridIntersectionFractions: Set cells outside geometry bounding box to zero (GH-1532, Dan Baston)
+  - GEOSisSimpleDetail returns locations with input SRID (Sandro Santilli)
 
 - New things:
   - Expose code revision: GEOS_REVISION, GEOSrevision, geos-config --revision
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index a21c00528..a69e944ea 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -1578,15 +1578,17 @@ extern "C" {
             geos::operation::valid::IsSimpleOp iso(inputGeom);
             iso.setFindAllLocations(returnAllPoints);
 
-            *result = nullptr;
-
             bool simple = iso.isSimple();
-            if (!simple) {
-                auto locations = iso.getNonSimpleLocations();
-                if (locations.size() == 1 || !returnAllPoints) {
-                    *result = extHandle->geomFactory->createPoint(locations.front()).release();
-                } else {
-                    *result = extHandle->geomFactory->createMultiPoint(locations).release();
+            if ( result ) {
+                *result = nullptr;
+                if (!simple) {
+                    auto locations = iso.getNonSimpleLocations();
+                    if (locations.size() == 1 || !returnAllPoints) {
+                        *result = extHandle->geomFactory->createPoint(locations.front()).release();
+                    } else {
+                        *result = extHandle->geomFactory->createMultiPoint(locations).release();
+                    }
+                    (*result)->setSRID(inputGeom->getSRID());
                 }
             }
 

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

Summary of changes:
 NEWS.md            |  1 +
 capi/geos_ts_c.cpp | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list