Skip to content

Commit d05e437

Browse files
Use EPSG code instead of proj4string "+init=epsg:XXXX" (#3687)
1 parent e6cbcc1 commit d05e437

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

R/geom-sf.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#' # If not supplied, coord_sf() will take the CRS from the first layer
4444
#' # and automatically transform all other layers to use that CRS. This
4545
#' # ensures that all data will correctly line up
46-
#' nc_3857 <- sf::st_transform(nc, "+init=epsg:3857")
46+
#' nc_3857 <- sf::st_transform(nc, 3857)
4747
#' ggplot() +
4848
#' geom_sf(data = nc) +
4949
#' geom_sf(data = nc_3857, colour = "red", fill = NA)

man/ggsf.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-geom-sf.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ test_that("geom_sf_text() and geom_sf_label() draws correctly", {
159159
)
160160

161161
# In order to avoid warning, transform to a projected coordinate system
162-
nc_3857 <- sf::st_transform(nc, "+init=epsg:3857")
162+
nc_3857 <- sf::st_transform(nc, 3857)
163163

164164
expect_doppelganger("Texts for North Carolina",
165165
ggplot() + geom_sf_text(data = nc_3857, aes(label = NAME))

0 commit comments

Comments
 (0)