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

git at osgeo.org git at osgeo.org
Fri Jun 30 16:33:58 PDT 2023


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  6bc91ff0f985abb96e44f1c8ef9cf010d9d2006c (commit)
       via  01a976f53f5bc74dc029f2f288ce5d6078b5d473 (commit)
      from  fa3b4ef70cd386135f5687720d0efc22ab770c22 (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 6bc91ff0f985abb96e44f1c8ef9cf010d9d2006c
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Jun 30 16:23:56 2023 -0700

    Explicitly set endianness for some tests so that output matches expected. Closes #934

diff --git a/tests/unit/capi/GEOSWKBWriterTest.cpp b/tests/unit/capi/GEOSWKBWriterTest.cpp
index c50dfa55b..9b49cba8f 100644
--- a/tests/unit/capi/GEOSWKBWriterTest.cpp
+++ b/tests/unit/capi/GEOSWKBWriterTest.cpp
@@ -15,7 +15,9 @@ struct test_geoswkbwriter_data : public capitest::utility {
     test_geoswkbwriter_data() :
         wkbwriter_(GEOSWKBWriter_create()),
         buf_(nullptr)
-    {}
+    {
+        GEOSWKBWriter_setByteOrder(wkbwriter_, GEOS_WKB_NDR);
+    }
 
     ~test_geoswkbwriter_data() {
         GEOSWKBWriter_destroy(wkbwriter_);
diff --git a/tests/unit/io/WKBWriterTest.cpp b/tests/unit/io/WKBWriterTest.cpp
index 79ea973dc..eb4cf3102 100644
--- a/tests/unit/io/WKBWriterTest.cpp
+++ b/tests/unit/io/WKBWriterTest.cpp
@@ -327,6 +327,7 @@ void object::test<11>
     std::stringstream iso_result_stream;
     wkbwriter.setOutputDimension(4);
     wkbwriter.setFlavor(geos::io::WKBConstants::wkbFlavour::wkbIso);
+    wkbwriter.setByteOrder(1); // little endian
     wkbwriter.writeHEX(*geom, iso_result_stream);
 
     ensure_equals("XYZM ISO",
@@ -358,6 +359,7 @@ void object::test<12>
     std::stringstream iso_result_stream;
     wkbwriter.setOutputDimension(4);
     wkbwriter.setFlavor(geos::io::WKBConstants::wkbFlavour::wkbIso);
+    wkbwriter.setByteOrder(1); // little endian
     wkbwriter.writeHEX(*geom, iso_result_stream);
 
     ensure_equals("XYM ISO",

commit 01a976f53f5bc74dc029f2f288ce5d6078b5d473
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Jun 30 08:56:02 2023 -0700

    Use DD algorithm in mitred buffer calculation: relatively low
    performance impact, and more stable output. References GH-933.

diff --git a/src/operation/buffer/OffsetSegmentGenerator.cpp b/src/operation/buffer/OffsetSegmentGenerator.cpp
index 32ab310f0..729f6c7ac 100644
--- a/src/operation/buffer/OffsetSegmentGenerator.cpp
+++ b/src/operation/buffer/OffsetSegmentGenerator.cpp
@@ -32,7 +32,7 @@
 #include <geos/geom/Coordinate.h>
 #include <geos/geom/PrecisionModel.h>
 #include <geos/algorithm/NotRepresentableException.h>
-#include <geos/algorithm/Intersection.h>
+#include <geos/algorithm/CGAlgorithmsDD.h>
 #include <geos/util.h>
 
 #ifndef GEOS_DEBUG
@@ -483,7 +483,7 @@ OffsetSegmentGenerator::addMitreJoin(const geom::Coordinate& cornerPt,
      * However, this situation should have been eliminated earlier by the check
      * for whether the offset segment endpoints are almost coincident
      */
-    CoordinateXY intPt = algorithm::Intersection::intersection(p_offset0.p0, p_offset0.p1, p_offset1.p0, p_offset1.p1);
+    CoordinateXY intPt = algorithm::CGAlgorithmsDD::intersection(p_offset0.p0, p_offset0.p1, p_offset1.p0, p_offset1.p1);
 
     if (!intPt.isNull() && intPt.distance(cornerPt) <= mitreLimitDistance) {
         segList.addPt(Coordinate(intPt));

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

Summary of changes:
 src/operation/buffer/OffsetSegmentGenerator.cpp | 4 ++--
 tests/unit/capi/GEOSWKBWriterTest.cpp           | 4 +++-
 tests/unit/io/WKBWriterTest.cpp                 | 2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list