From 01bbf3c3748169001167b2d8f528415266f2e02f Mon Sep 17 00:00:00 2001 From: edzer Date: Fri, 22 Nov 2024 22:58:02 +0100 Subject: [PATCH] fix #2481 --- R/geom-measures.R | 2 +- man/geos_measures.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/geom-measures.R b/R/geom-measures.R index 4c85df450..c19dd7c16 100644 --- a/R/geom-measures.R +++ b/R/geom-measures.R @@ -23,7 +23,7 @@ st_dimension = function(x, NA_if_empty = TRUE) #' @export #' @return If the coordinate reference system of \code{x} was set, these functions return values with unit of measurement; see \link[units]{set_units}. #' -#' st_area returns the area of a geometry, in the coordinate reference system used; in case \code{x} is in degrees longitude/latitude, \link[lwgeom:geod]{st_geod_area} is used for area calculation. +#' st_area returns the area of each feature geometry, computed in the coordinate reference system used. In case \code{x} has geodetic coordinates (unprojected), then if `sf_use_s2()` is `FALSE` \link[lwgeom:geod]{st_geod_area} is used for area calculation, if it is `TRUE` then \link[s2:s2_is_collection]{s2_area} is used: the former assumes an ellipsoidal shape, the latter a spherical shape of the Earth. In case of projected data, areas are computed in flat space. The argument `...` can be used to specify `radius` to \link[s2:s2_is_collection]{s2_area}, to modify the Earth radius. #' @examples #' b0 = st_polygon(list(rbind(c(-1,-1), c(1,-1), c(1,1), c(-1,1), c(-1,-1)))) #' b1 = b0 + 2 diff --git a/man/geos_measures.Rd b/man/geos_measures.Rd index 4f0b88c19..b13aee6eb 100644 --- a/man/geos_measures.Rd +++ b/man/geos_measures.Rd @@ -48,7 +48,7 @@ st_distance( \value{ If the coordinate reference system of \code{x} was set, these functions return values with unit of measurement; see \link[units]{set_units}. -st_area returns the area of a geometry, in the coordinate reference system used; in case \code{x} is in degrees longitude/latitude, \link[lwgeom:geod]{st_geod_area} is used for area calculation. +st_area returns the area of each feature geometry, computed in the coordinate reference system used. In case \code{x} has geodetic coordinates (unprojected), then if \code{sf_use_s2()} is \code{FALSE} \link[lwgeom:geod]{st_geod_area} is used for area calculation, if it is \code{TRUE} then \link[s2:s2_is_collection]{s2_area} is used: the former assumes an ellipsoidal shape, the latter a spherical shape of the Earth. In case of projected data, areas are computed in flat space. The argument \code{...} can be used to specify \code{radius} to \link[s2:s2_is_collection]{s2_area}, to modify the Earth radius. st_length returns the length of a \code{LINESTRING} or \code{MULTILINESTRING} geometry, using the coordinate reference system. \code{POINT}, \code{MULTIPOINT}, \code{POLYGON} or \code{MULTIPOLYGON} geometries return zero.