From 5a06ef120ef97967a3f77fec81cd95562a74978d Mon Sep 17 00:00:00 2001 From: rhijmans Date: Thu, 26 Dec 2024 23:53:40 -0800 Subject: [PATCH] m --- R/geom.R | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/R/geom.R b/R/geom.R index f21a73aa7..c90beab70 100644 --- a/R/geom.R +++ b/R/geom.R @@ -352,30 +352,29 @@ setMethod("crop", signature(x="SpatVector", y="ANY"), setMethod("convHull", signature(x="SpatVector"), function(x, by="") { - x@pntr <- x@pntr$hull("convex", by[1]) + x@pntr <- x@pntr$hull("convex", by[1], 0, TRUE, TRUE) messages(x, "convHull") } ) setMethod("minRect", signature(x="SpatVector"), function(x, by="") { - x@pntr <- x@pntr$hull("rectangle", by[1]) + x@pntr <- x@pntr$hull("rectangle", by[1], 0, TRUE, TRUE) messages(x, "minRect") } ) setMethod("minCircle", signature(x="SpatVector"), function(x, by="") { - x@pntr <- x@pntr$hull("circle", by[1]) + x@pntr <- x@pntr$hull("circle", by[1], 0, TRUE, TRUE) messages(x, "minCircle") } ) setMethod("hull", signature(x="SpatVector"), - function(x, type="convex", by="") { - type <- match.arg(tolower(type), c("convex", "concave", "rectangle", "circle")) - - x@pntr <- x@pntr$hull(type, by[1]) + function(x, type="convex", by="", param=1, allowHoles=TRUE, tight=TRUE) { + type <- match.arg(tolower(type), c("convex", "concave_ratio", "concave_length", "rectangle", "circle")) + x@pntr <- x@pntr$hull(type, by[1], param, allowHoles, tight) messages(x, "hull") } )