# NOT RUN {
# stretch several features
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_stretch(obj = gtGeoms$polygon, x = 0.5, y = 0.2,
update = FALSE)
visualise(geom = newPoly, linecol = "green", new = FALSE)
# stretch a single feature
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_stretch(obj = gtGeoms$polygon, x = 0.5, fid = 2, update = FALSE)
visualise(geom = newPoly, linecol = "green", new = FALSE)
# stretch feature separately
visualise(gtGeoms$polygon, linewidth = 3)
newPoly <- gt_stretch(obj = gtGeoms$polygon,
x = c(0.2, 1),
y = c(1, 0.2),
update = FALSE)
visualise(geom = newPoly, linecol = "green", new = FALSE)
# }
Run the code above in your browser using DataLab