[geos-commits] [SCM] GEOS branch main updated. 08a24d9b763dbcde847c338539e4c96d24e84b98

git at osgeo.org git at osgeo.org
Fri Mar 8 11:23:42 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, main has been updated
       via  08a24d9b763dbcde847c338539e4c96d24e84b98 (commit)
      from  bdceea69174e80cf2cc2959d6da8d9dd0e766e3e (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 08a24d9b763dbcde847c338539e4c96d24e84b98
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Fri Mar 8 11:23:04 2024 -0800

    Add geosop minAreaRectangle op

diff --git a/util/geosop/GeometryOp.cpp b/util/geosop/GeometryOp.cpp
index 35b70b5a6..f5fa28b91 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>
@@ -404,6 +405,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