Description Usage Arguments Details Value See Also Examples
Create a regular tiling polygon geometry (of class geom
) for the
extent of an anchor value.
1 |
anchor |
[ |
width |
[ |
pattern |
[ |
centroids |
[ |
When deriving a regular tiling for a prescribed window, there is only a limited set of legal combinations of cells in x and y dimension. For instance, a window of 100 by 100 can't comprise 10 by 5 squares of side-length/width 10, because then the y-dimension wouldn't be fully covered. The same is true for hexagonal and triangular tilings.
A geom
.
Other tilings:
gs_voronoi()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # create a squared tiling
aWindow <- data.frame(x = c(-180, 180),
y = c(-60, 80))
tiles <- gs_tiles(anchor = aWindow, width = 10)
visualise(`10° world tiles` = tiles)
# create a hexagonal tiling on top of a geom
coords <- data.frame(x = c(40, 70, 70, 50),
y = c(40, 40, 60, 70))
window <- data.frame(x = c(0, 80),
y = c(0, 80))
aGeom <- gs_polygon(anchor = coords, window = window)
visualise(`honeycomb background` = aGeom)
hex <- gs_tiles(anchor = aGeom, width = 8, pattern = "hexagonal")
visualise(hex, linecol = "deeppink", new = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.