geo_reflect | R Documentation |
Reflect geometric objects across a reflection axis.
geo_reflect(obj, angle, fid = NULL, update = TRUE)
obj |
gridded(1) |
angle |
numeric(1) |
fid |
integerish(1) |
update |
logical(1) |
The reflection axis is a straight line that goes through the plot origin with the given angle, where positive angles open towards the positive y-axis and negative angles open up towards the negative y-axis.
geom
of the reflected obj
.
Other geometry tools:
geo_filter()
,
geo_locate()
,
geo_pull()
,
geo_rotate()
,
geo_scale()
,
geo_skew()
,
geo_stretch()
,
geo_translate()
# reflect several features
geo_vis(gtGeoms$polygon, linewidth = 3)
newPoly <- geo_reflect(obj = gtGeoms$polygon, angle = 45,
update = FALSE)
geo_vis(newPoly, linecol = "green", new = FALSE)
# reflect a single feature
geo_vis(gtGeoms$polygon, linewidth = 3)
newPoly <- geo_reflect(obj = gtGeoms$polygon, angle = 90, fid = 2,
update = FALSE)
geo_vis(newPoly, linecol = "green", new = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.