shiftAz | R Documentation |
Shift features by azimuth and distance
shiftAz(object, az, dist)
object |
The object to be shifted. |
az |
Shift azimuth, in decimal degrees. |
dist |
Shift distance, in |
The shifted object
.
s = c(270, 90, 180, 0)
build_shifted = shiftAz(build, az = s, dist = 2.5)
plot(build)
plot(build_shifted, add = TRUE, border = "red")
# raster::text(rgeos::gCentroid(build, byid = TRUE), s)
raster::text(as(sf::st_centroid(sf::st_geometry(sf::st_as_sf(build))), "Spatial"), s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.