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

git at osgeo.org git at osgeo.org
Thu Dec 11 12:04:58 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  f112e8421cf3a1e9b6a62e032b03e4fa8e2733b8 (commit)
       via  0ef7d3123bf0752b6f560886b3b25543e084f4a0 (commit)
       via  5b0e56a456ca38b7448ddc653e6a712b37e6146d (commit)
       via  fbb3d5ce2544f3b76f9dd904ebbf06e0c99e5599 (commit)
      from  de22f50d319ce72004d0228fef00a3964eeb6a6a (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 f112e8421cf3a1e9b6a62e032b03e4fa8e2733b8
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Dec 11 09:36:04 2025 -0500

    OffsetCurveTest: Fix invalid join style

diff --git a/tests/unit/operation/buffer/OffsetCurveTest.cpp b/tests/unit/operation/buffer/OffsetCurveTest.cpp
index 0e817439f..e6ad8b183 100644
--- a/tests/unit/operation/buffer/OffsetCurveTest.cpp
+++ b/tests/unit/operation/buffer/OffsetCurveTest.cpp
@@ -523,7 +523,7 @@ void object::test<38> ()
 {
     checkOffsetCurve(
         "LINESTRING (20 20, 50 50, 80 20)",
-        10, 2, -1, -1,
+        10, 2, BufferParameters::JOIN_ROUND, -1,
         "LINESTRING (12.928932188134524 27.071067811865476, 42.928932188134524 57.071067811865476, 44.44429766980398 58.314696123025456, 46.1731656763491 59.23879532511287, 48.04909677983872 59.80785280403231, 50 60, 51.95090322016128 59.80785280403231, 53.8268343236509 59.23879532511287, 55.55570233019602 58.314696123025456, 57.071067811865476 57.071067811865476, 87.07106781186548 27.071067811865476)"
         );
 }

commit 0ef7d3123bf0752b6f560886b3b25543e084f4a0
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Dec 11 09:29:25 2025 -0500

    LineDissolver: Avoid null-pointer dereference

diff --git a/src/dissolve/LineDissolver.cpp b/src/dissolve/LineDissolver.cpp
index 2c036cc0d..674c132d5 100644
--- a/src/dissolve/LineDissolver.cpp
+++ b/src/dissolve/LineDissolver.cpp
@@ -50,6 +50,10 @@ LineDissolver::dissolve(const Geometry* g)
 void
 LineDissolver::add(const Geometry* geom)
 {
+    if (factory == nullptr) {
+        factory = geom->getFactory();
+    }
+
     struct LineStringFilter : public GeometryComponentFilter {
 
         LineDissolver *m_ld;
@@ -83,9 +87,6 @@ LineDissolver::add(std::vector<const Geometry*> geometries)
 void
 LineDissolver::add(const LineString* lineString)
 {
-    if (factory == nullptr) {
-        factory = lineString->getFactory();
-    }
     const CoordinateSequence* seq = lineString->getCoordinatesRO();
     bool doneStart = false;
     for (std::size_t i = 1; i < seq->size(); i++) {
@@ -129,6 +130,7 @@ LineDissolver::computeResult()
         if (MarkHalfEdge::isMarked(e)) continue;
         process(e);
     }
+
     result = factory->buildGeometry(std::move(lines));
 }
 

commit 5b0e56a456ca38b7448ddc653e6a712b37e6146d
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Dec 11 09:15:05 2025 -0500

    OffsetCurve: Add guard for curved inputs

diff --git a/src/operation/buffer/OffsetCurve.cpp b/src/operation/buffer/OffsetCurve.cpp
index 09fc7d074..02ee1f94f 100644
--- a/src/operation/buffer/OffsetCurve.cpp
+++ b/src/operation/buffer/OffsetCurve.cpp
@@ -62,6 +62,8 @@ OffsetCurve::setJoined(bool pIsJoined)
 std::unique_ptr<Geometry>
 OffsetCurve::getCurve()
 {
+    util::ensureNoCurvedComponents(inputGeom);
+
     GeometryMapper::mapOp GetCurveMapOp = [this](const Geometry& geom)->std::unique_ptr<Geometry> {
 
         if (geom.getGeometryTypeId() == GEOS_POINT) return nullptr;

commit fbb3d5ce2544f3b76f9dd904ebbf06e0c99e5599
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Dec 11 09:13:45 2025 -0500

    WKTWriter: Fix casts to incorrect type

diff --git a/src/io/WKTWriter.cpp b/src/io/WKTWriter.cpp
index 7c8f04bdc..8293b31b5 100644
--- a/src/io/WKTWriter.cpp
+++ b/src/io/WKTWriter.cpp
@@ -241,12 +241,12 @@ WKTWriter::appendGeometryTaggedText(const Geometry& geometry,
         case GEOS_CIRCULARSTRING: appendSimpleCurveTaggedText(static_cast<const SimpleCurve&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_COMPOUNDCURVE: appendCompoundCurveTaggedText(static_cast<const CompoundCurve&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_CURVEPOLYGON:
-        case GEOS_POLYGON:    appendSurfaceTaggedText(static_cast<const Polygon&>(geometry), outputOrdinates, level, writer); break;
+        case GEOS_POLYGON:    appendSurfaceTaggedText(static_cast<const Surface&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_MULTIPOINT: appendMultiPointTaggedText(static_cast<const MultiPoint&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_MULTICURVE:
-        case GEOS_MULTILINESTRING:    appendMultiCurveTaggedText(static_cast<const MultiLineString&>(geometry), outputOrdinates, level, writer); break;
+        case GEOS_MULTILINESTRING:    appendMultiCurveTaggedText(static_cast<const GeometryCollection&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_MULTISURFACE:
-        case GEOS_MULTIPOLYGON:       appendMultiSurfaceTaggedText(static_cast<const MultiPolygon&>(geometry), outputOrdinates, level, writer); break;
+        case GEOS_MULTIPOLYGON:       appendMultiSurfaceTaggedText(static_cast<const GeometryCollection&>(geometry), outputOrdinates, level, writer); break;
         case GEOS_GEOMETRYCOLLECTION: appendGeometryCollectionTaggedText(static_cast<const GeometryCollection&>(geometry), outputOrdinates, level, writer); break;
     }
 }

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

Summary of changes:
 src/dissolve/LineDissolver.cpp                  | 8 +++++---
 src/io/WKTWriter.cpp                            | 6 +++---
 src/operation/buffer/OffsetCurve.cpp            | 2 ++
 tests/unit/operation/buffer/OffsetCurveTest.cpp | 2 +-
 4 files changed, 11 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list