geo_scale | R Documentation |
Scale the vertex values of geometric objects to a values range.
geo_scale(obj, range = NULL, fid = NULL, update = TRUE)
obj |
gridded(1) |
range |
data.frame(2) |
fid |
integerish(.) |
update |
logical(1) |
geom
of the scaled obj
.
Other geometry tools:
geo_filter()
,
geo_locate()
,
geo_pull()
,
geo_reflect()
,
geo_rotate()
,
geo_skew()
,
geo_stretch()
,
geo_translate()
# rescale to values between -10 and 10
geo_vis(gtGeoms$polygon, linewidth = 3)
newPoly <- geo_scale(obj = gtGeoms$polygon, update = FALSE,
range = data.frame(x = c(-10, 10), y = c(-10, 10)))
geo_vis(geom = newPoly, linecol = "green", new = FALSE)
# rescale a single feature
geo_vis(gtGeoms$polygon, linewidth = 3)
newPoly <- geo_scale(obj = gtGeoms$polygon, update = FALSE, fid = 2,
range = data.frame(x = c(-10, 10), y = c(-10, 10)))
geo_vis(geom = newPoly, linecol = "green", new = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.