From 7d340b0435775fcdf0292622651d0ce84bff0693 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:53:17 +0200 Subject: [PATCH 1/4] fix typos --- R/geom-transformers.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/geom-transformers.R b/R/geom-transformers.R index bf737ff76..c34cd4372 100644 --- a/R/geom-transformers.R +++ b/R/geom-transformers.R @@ -25,7 +25,7 @@ #' @details \code{st_buffer} computes a buffer around this geometry/each geometry. If any of \code{endCapStyle}, #' \code{joinStyle}, or \code{mitreLimit} are set to non-default values ('ROUND', 'ROUND', 1.0 respectively) then #' the underlying 'buffer with style' GEOS function is used. -#' If a negative buffer returns empty polygons instead of shrinking, set sf_use_s2() to FALSE +#' If a negative buffer returns empty polygons instead of shrinking, set \code{sf_use_s2()} to \code{FALSE}. #' See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} for details. #' #' \code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and \code{singleSide} only @@ -313,7 +313,7 @@ st_simplify.sf = function(x, preserveTopology, dTolerance = 0.0) { #' @name geos_unary #' @export -#' @param bOnlyEdges logical; if TRUE, return lines, else return polygons +#' @param bOnlyEdges logical; if \code{TRUE}, return lines, else return polygons #' @details \code{st_triangulate} triangulates set of points (not constrained). \code{st_triangulate} requires GEOS version 3.4 or above st_triangulate = function(x, dTolerance = 0.0, bOnlyEdges = FALSE) UseMethod("st_triangulate") @@ -455,7 +455,7 @@ st_minimum_rotated_rectangle.sf = function(x, dTolerance, ...) { #' @name geos_unary #' @export #' @param envelope object of class \code{sfc} or \code{sfg} containing a \code{POLYGON} with the envelope for a voronoi diagram; this only takes effect when it is larger than the default envelope, chosen when \code{envelope} is an empty polygon -#' @details \code{st_voronoi} creates voronoi tesselation. \code{st_voronoi} requires GEOS version 3.5 or above +#' @details \code{st_voronoi} creates voronoi tessellation. \code{st_voronoi} requires GEOS version 3.5 or above #' @examples #' set.seed(1) #' x = st_multipoint(matrix(runif(10),,2)) @@ -505,7 +505,7 @@ st_voronoi.sf = function(x, envelope = st_polygon(), dTolerance = 0.0, bOnlyEdge } #' @name geos_unary -#' @details \code{st_polygonize} creates polygon from lines that form a closed ring. In case of \code{st_polygonize}, \code{x} must be an object of class \code{LINESTRING} or \code{MULTILINESTRING}, or an \code{sfc} geometry list-column object containing these +#' @details \code{st_polygonize} creates a polygon from lines that form a closed ring. In case of \code{st_polygonize}, \code{x} must be an object of class \code{LINESTRING} or \code{MULTILINESTRING}, or an \code{sfc} geometry list-column object containing these #' @export #' @examples #' mls = st_multilinestring(list(matrix(c(0,0,0,1,1,1,0,0),,2,byrow=TRUE))) From f50409ea9c0eb6406eb7bee5d36b0de24e3c0912 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:05:04 +0200 Subject: [PATCH 2/4] improve st_buffer() description --- R/geom-transformers.R | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/R/geom-transformers.R b/R/geom-transformers.R index c34cd4372..338535d93 100644 --- a/R/geom-transformers.R +++ b/R/geom-transformers.R @@ -22,15 +22,15 @@ #' @param ... in `st_buffer` passed on to [s2::s2_buffer_cells()], otherwise ignored #' @return an object of the same class of \code{x}, with manipulated geometry. #' @export -#' @details \code{st_buffer} computes a buffer around this geometry/each geometry. If any of \code{endCapStyle}, -#' \code{joinStyle}, or \code{mitreLimit} are set to non-default values ('ROUND', 'ROUND', 1.0 respectively) then -#' the underlying 'buffer with style' GEOS function is used. -#' If a negative buffer returns empty polygons instead of shrinking, set \code{sf_use_s2()} to \code{FALSE}. -#' See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} for details. +#' @details \code{st_buffer} computes a buffer around this geometry/each geometry. Depending on the spatial +#' coordinate system, a different engine (GEOS or S2) can be used, which have different function +#' arguments. The \code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and +#' \code{singleSide} parameters only work if the GEOS engine is used (i.e. projected coordinates or +#' when \code{sf_use_s2()} is set to \code{FALSE}). See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} +#' for details. The \code{max_cells} and \code{min_level} parameters ([s2::s2_buffer_cells()] ) work with the S2 +#' engine (i.e. geographic coordinates) and can be used to change the buffer shape (e.g. smoothing). If +#' a negative buffer returns empty polygons instead of shrinking, set \code{sf_use_s2()} to \code{FALSE}. #' -#' \code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and \code{singleSide} only -#' work when the GEOS back-end is used: for projected coordinates or when \code{sf_use_s2()} is set -#' to \code{FALSE}. #' @examples #' #' ## st_buffer, style options (taken from rgeos gBuffer) From 6da5a815416ddec68700005f426de1e33bf261a1 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:50:59 +0200 Subject: [PATCH 3/4] regenerate docs --- man/geos_unary.Rd | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/man/geos_unary.Rd b/man/geos_unary.Rd index 684e64eb1..caa284ba6 100644 --- a/man/geos_unary.Rd +++ b/man/geos_unary.Rd @@ -111,7 +111,7 @@ specified with long-lat coordinates and \code{sf_use_s2()} returns \code{TRUE}, then the value of \code{dTolerance} must be specified in meters.} -\item{bOnlyEdges}{logical; if TRUE, return lines, else return polygons} +\item{bOnlyEdges}{logical; if \code{TRUE}, return lines, else return polygons} \item{envelope}{object of class \code{sfc} or \code{sfg} containing a \code{POLYGON} with the envelope for a voronoi diagram; this only takes effect when it is larger than the default envelope, chosen when \code{envelope} is an empty polygon} @@ -128,15 +128,14 @@ an object of the same class of \code{x}, with manipulated geometry. Geometric unary operations on simple feature geometries. These are all generics, with methods for \code{sfg}, \code{sfc} and \code{sf} objects, returning an object of the same class. All operations work on a per-feature basis, ignoring all other features. } \details{ -\code{st_buffer} computes a buffer around this geometry/each geometry. If any of \code{endCapStyle}, -\code{joinStyle}, or \code{mitreLimit} are set to non-default values ('ROUND', 'ROUND', 1.0 respectively) then -the underlying 'buffer with style' GEOS function is used. -If a negative buffer returns empty polygons instead of shrinking, set sf_use_s2() to FALSE -See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} for details. - -\code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and \code{singleSide} only -work when the GEOS back-end is used: for projected coordinates or when \code{sf_use_s2()} is set -to \code{FALSE}. +\code{st_buffer} computes a buffer around this geometry/each geometry. Depending on the spatial +coordinate system, a different engine (GEOS or S2) can be used, which have different function +arguments. The \code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and +\code{singleSide} parameters only work if the GEOS engine is used (i.e. projected coordinates or +when \code{sf_use_s2()} is set to \code{FALSE}). See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} +for details. The \code{max_cells} and \code{min_level} parameters (\code{\link[s2:s2_boundary]{s2::s2_buffer_cells()}} ) work with the S2 +engine (i.e. geographic coordinates) and can be used to change the buffer shape (e.g. smoothing). If +a negative buffer returns empty polygons instead of shrinking, set \code{sf_use_s2()} to \code{FALSE}. \code{st_boundary} returns the boundary of a geometry @@ -162,9 +161,9 @@ rectangle has width equal to the minimum diameter, and a longer length. If the convex hill of the input is degenerate (a line or point) a linestring or point is returned. -\code{st_voronoi} creates voronoi tesselation. \code{st_voronoi} requires GEOS version 3.5 or above +\code{st_voronoi} creates voronoi tessellation. \code{st_voronoi} requires GEOS version 3.5 or above -\code{st_polygonize} creates polygon from lines that form a closed ring. In case of \code{st_polygonize}, \code{x} must be an object of class \code{LINESTRING} or \code{MULTILINESTRING}, or an \code{sfc} geometry list-column object containing these +\code{st_polygonize} creates a polygon from lines that form a closed ring. In case of \code{st_polygonize}, \code{x} must be an object of class \code{LINESTRING} or \code{MULTILINESTRING}, or an \code{sfc} geometry list-column object containing these \code{st_line_merge} merges lines. In case of \code{st_line_merge}, \code{x} must be an object of class \code{MULTILINESTRING}, or an \code{sfc} geometry list-column object containing these From 161d056cb45a12ea902a84d7fb382f582943e8e0 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:02:01 +0200 Subject: [PATCH 4/4] remove space --- R/geom-transformers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/geom-transformers.R b/R/geom-transformers.R index 338535d93..df709269a 100644 --- a/R/geom-transformers.R +++ b/R/geom-transformers.R @@ -27,7 +27,7 @@ #' arguments. The \code{nQuadSegs}, \code{endCapsStyle}, \code{joinStyle}, \code{mitreLimit} and #' \code{singleSide} parameters only work if the GEOS engine is used (i.e. projected coordinates or #' when \code{sf_use_s2()} is set to \code{FALSE}). See \href{https://postgis.net/docs/ST_Buffer.html}{postgis.net/docs/ST_Buffer.html} -#' for details. The \code{max_cells} and \code{min_level} parameters ([s2::s2_buffer_cells()] ) work with the S2 +#' for details. The \code{max_cells} and \code{min_level} parameters ([s2::s2_buffer_cells()]) work with the S2 #' engine (i.e. geographic coordinates) and can be used to change the buffer shape (e.g. smoothing). If #' a negative buffer returns empty polygons instead of shrinking, set \code{sf_use_s2()} to \code{FALSE}. #'