[geos-commits] [SCM] GEOS branch main updated. 335cf85d0a66540bcf4474a00f9f39c1084976b3

git at osgeo.org git at osgeo.org
Wed May 31 06:30:46 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  335cf85d0a66540bcf4474a00f9f39c1084976b3 (commit)
       via  68c588bf96e07f17ddf1495c67f9e2c06f9ddd83 (commit)
      from  cad9c6fea9314d30d826c9953b0c5ed729688ee6 (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 335cf85d0a66540bcf4474a00f9f39c1084976b3
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed May 31 09:29:48 2023 -0400

    Add unit test for QGIS reported offset curve weirdness from @strk
    See https://github.com/qgis/QGIS/issues/53165

diff --git a/tests/unit/operation/buffer/OffsetCurveTest.cpp b/tests/unit/operation/buffer/OffsetCurveTest.cpp
index 5faea0fe4..76b01c4df 100644
--- a/tests/unit/operation/buffer/OffsetCurveTest.cpp
+++ b/tests/unit/operation/buffer/OffsetCurveTest.cpp
@@ -553,25 +553,33 @@ void object::test<40> ()
         );
 }
 
-
 // testMinQuadrantSegments
 // See https://github.com/qgis/QGIS/issues/53165
 template<>
 template<>
-void object::test<41> ()
+void object::test<42> ()
 {
     checkOffsetCurve(
         "LINESTRING (553772.0645892698 177770.05079236583, 553780.9235869241 177768.99614978794, 553781.8325485934 177768.41771963477)",
         -11, 0, BufferParameters::JOIN_MITRE, -1,
         "LINESTRING (553770.76 177759.13, 553777.54 177758.32)"
     );
+
+    checkOffsetCurve(
+        "LINESTRING (417.9785426266025752 432.5653800140134990, 447.6161954912822694 436.0936720217578113, 450.6571140550076962 438.0288020166335627)",
+        133.819, // distance
+        0, // number of segments
+        BufferParameters::JOIN_MITRE,
+        2,  // mitre limit
+        "LINESTRING (402.15941192825255 565.4460778784833, 418.95730224139794 567.4458267253115)"
+    );
 }
 
 // testMinQuadrantSegments_QGIS
 // See https://github.com/qgis/QGIS/issues/53165#issuecomment-1563214857
 template<>
 template<>
-void object::test<42> ()
+void object::test<43> ()
 {
     checkOffsetCurve(
         "LINESTRING (421 622, 446 625, 449 627)",
@@ -582,4 +590,4 @@ void object::test<42> ()
 
 
 
-} // namespace tut
+} // namespace tut2

commit 68c588bf96e07f17ddf1495c67f9e2c06f9ddd83
Author: Andrew Hershberger <andrew.d.hershberger at gmail.com>
Date:   Wed May 31 09:20:22 2023 -0400

    Clarify thread safety requirements for C API (#907)

diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in
index 7818d98bd..76e508e5a 100644
--- a/capi/geos_c.h.in
+++ b/capi/geos_c.h.in
@@ -87,19 +87,18 @@ extern "C" {
 
 
 /**
-* Type returned by GEOS_init_r(), for use in multi-threaded
-* applications.
+* Type returned by GEOS_init_r(), for use with the functions ending in `_r`
+* (the reentrant API).
 *
-* There should be only one GEOSContextHandle_t per thread.
+* Contexts must only be used from a single thread at a time.
 */
 typedef struct GEOSContextHandle_HS *GEOSContextHandle_t;
 
 /**
 * Callback function for passing GEOS error messages to parent process.
 *
-* Set the \ref GEOSMessageHandler function for error and notice messages in \ref initGEOS
-* for single-threaded programs, or using \ref initGEOS_r for threaded
-* programs
+* Set the \ref GEOSMessageHandler function for error and notice messages using
+* \ref initGEOS or \ref initGEOS_r.
 *
 * \param fmt the message format template
 */
@@ -331,9 +330,10 @@ extern void GEOS_DLL GEOS_interruptCancel(void);
 /* ========== Initialization and Cleanup ========== */
 
 /**
-* Initialize a context for this thread. Pass this context into
-* your other calls of `*_r` functions.
-* \return a GEOS context for this thread
+* Allocate and initialize a context. Pass this context as the first argument
+* when calling other `*_r` functions. Contexts must only be used from a single
+* thread at a time.
+* \return a new GEOS context.
 *
 * \since 3.5
 */

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

Summary of changes:
 capi/geos_c.h.in                                | 18 +++++++++---------
 tests/unit/operation/buffer/OffsetCurveTest.cpp | 16 ++++++++++++----
 2 files changed, 21 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list