[geos-commits] [SCM] GEOS branch 3.12 updated. 57df1921de666cd1a1d540811f321a00d0de85b9

git at osgeo.org git at osgeo.org
Fri Mar 8 11:28:24 PST 2024


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, 3.12 has been updated
       via  57df1921de666cd1a1d540811f321a00d0de85b9 (commit)
      from  22fe1a6cf245316c93eeec69836c3a5d378ce220 (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 57df1921de666cd1a1d540811f321a00d0de85b9
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Fri Mar 8 11:28:05 2024 -0800

    Add geosop minAreaRectangle op

diff --git a/util/geosop/GeometryOp.cpp b/util/geosop/GeometryOp.cpp
index ccff0bc3f..c6d988df3 100644
--- a/util/geosop/GeometryOp.cpp
+++ b/util/geosop/GeometryOp.cpp
@@ -27,6 +27,7 @@
 #include <geos/algorithm/construct/LargestEmptyCircle.h>
 #include <geos/algorithm/construct/MaximumInscribedCircle.h>
 #include <geos/algorithm/BoundaryNodeRule.h>
+#include <geos/algorithm/MinimumAreaRectangle.h>
 #include <geos/algorithm/MinimumDiameter.h>
 #include <geos/algorithm/MinimumBoundingCircle.h>
 #include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
@@ -397,6 +398,14 @@ std::vector<GeometryOpCreator> opRegistry {
         return new Result( std::move(res) );
     });
     }},
+{"minAreaRectangle", [](std::string name) { return GeometryOp::create(name,
+    catConst,
+    "compute minimum-area rectangle enclosing geometry",
+    [](const std::unique_ptr<Geometry>& geom) {
+        std::unique_ptr<Geometry> res = geos::algorithm::MinimumAreaRectangle::getMinimumRectangle(geom.get());
+        return new Result( std::move(res) );
+    });
+    }},
 {"minBoundingCircle", [](std::string name) { return GeometryOp::create(name,
     catConst,
     "compute minimum bounding circle of geometry",

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

Summary of changes:
 util/geosop/GeometryOp.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list