diff --git a/R/wkt.R b/R/wkt.R index 4c3c58941..14407a2b0 100644 --- a/R/wkt.R +++ b/R/wkt.R @@ -85,6 +85,11 @@ prnt.GEOMETRYCOLLECTION = function(x, ..., EWKT = TRUE) { #' \href{https://www.ogc.org/standard/sfa/}{simple features access} specification and extensions #' (known as EWKT, supported by PostGIS and other simple features implementations for addition of #' a SRID to a WKT string). +#' @note To improve conversion performance, the lwgeom package can be used (it must be installed +#' beforehand) and set the \code{Sys.setenv("LWGEOM_WKT" = "true")} environment variable. This +#' will also result in faster printing of complex geometries. Note that the representation as WKT is +#' different from the sf package and may cause reproducibility problems. An alternative solution is +#' to use the [lwgeom::st_astext()] or [wk::as_wkt()] functions. #' #' @export st_as_text = function(x, ...) UseMethod("st_as_text") diff --git a/man/st_as_text.Rd b/man/st_as_text.Rd index 638ff263b..a87a9e2f1 100644 --- a/man/st_as_text.Rd +++ b/man/st_as_text.Rd @@ -35,6 +35,13 @@ The returned WKT representation of simple feature geometry conforms to the (known as EWKT, supported by PostGIS and other simple features implementations for addition of a SRID to a WKT string). } +\note{ +To improve conversion performance, the lwgeom package can be used (it must be installed +beforehand) and set the \code{Sys.setenv("LWGEOM_WKT" = "true")} environment variable. This +will also result in faster printing of complex geometries. Note that the representation as WKT is +different from the sf package and may cause reproducibility problems. An alternative solution is +to use the \code{\link[lwgeom:st_astext]{lwgeom::st_astext()}} or \code{\link[wk:wkt]{wk::as_wkt()}} functions. +} \examples{ st_as_text(st_point(1:2)) st_as_text(st_sfc(st_point(c(-90,40)), crs = 4326), EWKT = TRUE)