genGridUTM: Generate Grid (UTM version)

Description Usage Arguments Value Author(s) Examples

Description

Generate grid from raster data in a UTM projection

Usage

1
2
genGridUTM(tilesize, extent, res, overlap = NULL, polygon = FALSE,
  prj = NULL)

Arguments

tilesize

Numeric. Size (in # pixels) of the square tiles

extent

Extent. Object of type extent from the target raster

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 polygon is TRUE

Value

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

Author(s)

Ben DeVries

Examples

 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)

bendv/rastergrid documentation built on May 12, 2019, 10:58 a.m.