Skip to content

Commit

Permalink
Add geosop minAreaRectangle op
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Mar 8, 2024
1 parent bdceea6 commit 08a24d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions util/geosop/GeometryOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 08a24d9

Please sign in to comment.