Description Usage Arguments Value See Also Examples
Scale the vertex values of geometric objects to a values range.
1 |
obj |
[ |
range |
[ |
fid |
[ |
update |
[ |
geom
of the scaled obj
.
Other geometry tools:
gt_filter()
,
gt_locate()
,
gt_pull()
,
gt_reflect()
,
gt_rotate()
,
gt_skew()
,
gt_stretch()
,
gt_translate()
1 2 3 4 5 6 7 8 9 10 11 | # rescale to values between -10 and 10
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_scale(obj = gtGeoms$polygon, update = FALSE,
range = data.frame(x = c(-10, 10), y = c(-10, 10)))
visualise(geom = newPoly, linecol = "green", new = FALSE)
# rescale a single feature
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_scale(obj = gtGeoms$polygon, update = FALSE, fid = 2,
range = data.frame(x = c(-10, 10), y = c(-10, 10)))
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.