Description Usage Arguments Value See Also Examples
Translate geometric objects by adding a constant in x and y dimension.
1 |
obj |
[ |
x |
[ |
y |
[ |
fid |
[ |
update |
[ |
geom
of the mathematically translated obj
.
Other geometry tools:
gt_filter()
,
gt_locate()
,
gt_pull()
,
gt_reflect()
,
gt_rotate()
,
gt_scale()
,
gt_skew()
,
gt_stretch()
1 2 3 4 5 6 7 8 9 10 11 | # translate several features
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_translate(obj = gtGeoms$polygon, x = 5, y = c(-10, 5),
update = FALSE)
visualise(geom = newPoly, linecol = "green", new = FALSE)
# translate a single feature
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_translate(obj = gtGeoms$polygon, x = 5, fid = 2,
update = FALSE)
visualise(geom = newPoly, linecol = "green", new = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.