grd_tile {wk} | R Documentation |
Extract normalized grid tiles
Description
Unlike grd_tile_template()
, which returns a grd()
whose elements are
the boundaries of the specified tiles with no data attached, grd_tile()
returns the actual tile with the data.
Usage
grd_tile(grid, level, i, j = NULL)
## S3 method for class 'wk_grd_rct'
grd_tile(grid, level, i, j = NULL)
## S3 method for class 'wk_grd_xy'
grd_tile(grid, level, i, j = NULL)
Arguments
grid |
A |
level |
An integer describing the overview level. This is related to
the |
i , j |
1-based index values. |
Value
A grd_subset()
ed version
Examples
grid <- grd_rct(volcano)
plot(grd_tile(grid, 4, 1, 1))
plot(grd_tile(grid, 3, 1, 1), add = TRUE)
plot(grd_tile(grid, 3, 1, 2), add = TRUE)
plot(grd_tile(grid, 3, 2, 1), add = TRUE)
plot(grd_tile(grid, 3, 2, 2), add = TRUE)
grid <- as_grd_xy(grd_tile(grid, 4, 1, 1))
plot(grid, add = TRUE, pch = ".")
plot(grd_tile(grid, 3, 1, 1), add = TRUE, col = "green", pch = ".")
plot(grd_tile(grid, 3, 1, 2), add = TRUE, col = "red", pch = ".")
plot(grd_tile(grid, 3, 2, 1), add = TRUE, col = "blue", pch = ".")
plot(grd_tile(grid, 3, 2, 2), add = TRUE, col = "magenta", pch = ".")
[Package wk version 0.9.2 Index]