[geos-commits] [SCM] GEOS branch main updated. 7ba919f44e2eb7312393d79e7d53e3b2d25c926e
git at osgeo.org
git at osgeo.org
Fri Jan 17 15:18:51 PST 2025
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 7ba919f44e2eb7312393d79e7d53e3b2d25c926e (commit)
from cf07bf32d55723ded7c39a2f89ffe099a749d831 (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 7ba919f44e2eb7312393d79e7d53e3b2d25c926e
Author: Martin Davis <mtnclimb at gmail.com>
Date: Fri Jan 17 15:18:29 2025 -0800
Fix GeometryOp GDD ops final param type
diff --git a/util/geosop/GeometryOp.cpp b/util/geosop/GeometryOp.cpp
index 1e2dbf52b..a52ff058e 100644
--- a/util/geosop/GeometryOp.cpp
+++ b/util/geosop/GeometryOp.cpp
@@ -299,17 +299,17 @@ std::vector<GeometryOpCreator> opRegistry {
{"bufferQuadSegs", [](std::string name) { return GeometryOp::create(name,
catConst,
"compute the buffer of geometry by a distance with quadrant segments",
- [](const std::unique_ptr<Geometry>& geom, double d, int quadrantSegments) {
- return new Result( geom->buffer( d, quadrantSegments ) );
+ [](const std::unique_ptr<Geometry>& geom, double d, double quadrantSegments) {
+ return new Result( geom->buffer( d, (int) quadrantSegments ) );
});
}},
{"bufferJoin", [](std::string name) { return GeometryOp::create(name,
catConst,
"compute the buffer of geometry by a distance, with join >0 = QS, 0 = Bevel, <0 = Mitre limit",
- [](const std::unique_ptr<Geometry>& geom, double d, int join) {
+ [](const std::unique_ptr<Geometry>& geom, double d, double join) {
geos::operation::buffer::BufferParameters param;
if (join > 0) {
- param.setQuadrantSegments( join );
+ param.setQuadrantSegments( (int) join );
param.setJoinStyle(geos::operation::buffer::BufferParameters::JOIN_ROUND);
}
else if (join == 0) {
@@ -317,7 +317,7 @@ std::vector<GeometryOpCreator> opRegistry {
}
else if (join < 0) {
param.setJoinStyle(geos::operation::buffer::BufferParameters::JOIN_MITRE);
- param.setMitreLimit( -join );
+ param.setMitreLimit( (int) -join );
}
std::unique_ptr<Geometry> g3 = geos::operation::buffer::BufferOp::bufferOp(geom.get(), d, param);
return new Result( g3.release() );
@@ -335,19 +335,19 @@ std::vector<GeometryOpCreator> opRegistry {
{"offsetCurveJoin", [](std::string name) { return GeometryOp::create(name,
catConst,
"compute the offset curve of geometry by a distance, with join >0 = QS, 0 = Bevel, <0 = Mitre limit",
- [](const std::unique_ptr<Geometry>& geom, double d, int join) {
+ [](const std::unique_ptr<Geometry>& geom, double d, double join) {
int quadSegs = 0;
geos::operation::buffer::BufferParameters::JoinStyle joinStyle = geos::operation::buffer::BufferParameters::JOIN_ROUND;
double miterLimit = 0;
if (join > 0) {
- quadSegs = join;
+ quadSegs = (int) join;
}
else if (join == 0) {
joinStyle = geos::operation::buffer::BufferParameters::JOIN_BEVEL;
}
else if (join < 0) {
joinStyle = geos::operation::buffer::BufferParameters::JOIN_MITRE;
- miterLimit = -join;
+ miterLimit = (int) -join;
}
std::unique_ptr<Geometry> g3 = geos::operation::buffer::OffsetCurve::getCurve(*geom, d, quadSegs, joinStyle, miterLimit);
return new Result( g3.release() );
-----------------------------------------------------------------------
Summary of changes:
util/geosop/GeometryOp.cpp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list