st_translate | R Documentation |
Translate a simple feature
st_translate(x, d = c(0, 0))
x |
sf object |
d |
numeric, values to translate by in order of [x, y] |
a translated version of the input x
https://r-spatial.github.io/sf/articles/sf3.html#affine-transformations-1
## Not run:
v <- volcano_multi(what = 'bands')
x <- volcano_polygon()
x2 <- st_translate(x, c(-250, 120))
plot(v[,,,1], reset = FALSE, axes = TRUE)
plot(sf::st_geometry(x), add = TRUE, border = "purple", col = NA, lwd = 3)
plot(sf::st_geometry(x2), add = TRUE, border = "orange", col = NA, lwd = 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.