You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' the same as specified by \code{size}? \code{TRUE} by default. Only applies to polygons, and
27
27
#' when \code{type = "random"}.
28
28
#' @param progress logical; if \code{TRUE} show progress bar (only if \code{size} is a vector).
29
+
#' @force logical; if `TRUE` continue when the sampled bounding box area is more than 1e4 times the area of interest, else (default) stop with an error. If this error is not justified, try setting `oriented=TRUE`, see details.
29
30
#' @return an \code{sfc} object containing the sampled \code{POINT} geometries
30
31
#' @details if \code{x} has dimension 2 (polygons) and geographical coordinates (long/lat), uniform random sampling on the sphere is applied, see e.g. \url{https://mathworld.wolfram.com/SpherePointPicking.html}.
stop("One or more geometries have a non-finite area")
209
210
global= (a1/a0) >.9999
211
+
if (a0/a1>1e4&&!force)
212
+
stop(paste0("sampling box is ", format(a0/a1), " times larger than sampling region;\nuse force=TRUE if you really want this, or try setting oriented=TRUE\n(after reading the documentation)"), call.=FALSE)
0 commit comments