Description Usage Arguments Value Author(s) Examples
Generate grid from raster data in a UTM projection
1 2 | genGridUTM(tilesize, extent, res, overlap = NULL, polygon = FALSE,
prj = NULL)
|
tilesize |
Numeric. Size (in # pixels) of the square tiles |
extent |
Extent. Object of type |
res |
Numeric. Resolution of the target raster |
overlap |
Numeric. Optional: size of overlap region (in # of pixels) |
polygon |
Logical. Output a SpatialPolygons object as well? |
prj |
Character. CRS projection string if |
data.frame
with extent parameters (xmin, xmax, ymin, ymax) for each tile per row or a list
containing a data.frame
and a SpatialPolygons
object if polygon
is TRUE
Ben DeVries
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(bfastSpatial)
data(tura)
tiles <- genGridUTM(50, extent(tura), 30)
print(tiles)
tiles <- genGridUTM(50, extent(tura), 30, polygon = TRUE, prj = projection(tura))
print(tiles)
plot(tura, 2)
plot(tiles$poly, add = TRUE)
tiles <- genGridUTM(50, extent(tura), 30, overlap = 5, polygon = TRUE, prj = projection(tura))
plot(tura, 2)
plot(tiles$poly, add = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.