Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kadyb authored Jun 10, 2024
1 parent b4b29cb commit e3f4b28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ st_transform.sf = function(x, crs = st_crs(x), ...) {
#' @export
#' @details The \code{st_transform} method for \code{sfg} objects assumes that the CRS of the object is available as an attribute of that name.
#' @examples
#' st_transform(structure(p1, proj4string = "+init=epsg:4326"), "EPSG:3857")
#' st_transform(structure(p1, proj4string = "EPSG:4326"), "EPSG:3857")
st_transform.sfg = function(x, crs = st_crs(x), ...) {
x = st_sfc(x, crs = attr(x, "proj4string"))
if (missing(crs))
Expand Down
4 changes: 2 additions & 2 deletions man/st_transform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/crs.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (sf_extSoftVersion()["USE_PROJ_H"] == "true" || sf_proj_info("have_datum_file
}

if (suppressPackageStartupMessages(require(sp, quietly = TRUE))) {
x0 = sp::CRS("+init=epsg:4326")
x0 = sp::CRS("EPSG:4326")
cat(sp::wkt(x0), "\n")
x = st_crs(x0)
print(x)
Expand Down
2 changes: 1 addition & 1 deletion tests/empty.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ all.equal(x, y)
# https://github.com/edzer/sfr/issues/398 :
pt = st_sfc(st_point(c(0,92)), crs = 4267)
robin_crs <- "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
# india_crs <- "+init=epsg:24383" # India-centered Lambert conformal conic projection
# india_crs <- "EPSG:24383" # India-centered Lambert conformal conic projection
india_crs <- "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs"
st_transform(st_transform(pt, robin_crs), india_crs)[[1]]

0 comments on commit e3f4b28

Please sign in to comment.