Get Tile Centroids
Source:R/tilePlan.R, R/freeTilePlan.R, R/pointTilePlan.R, and 2 more
centroids.RdGet the centroids of the tiles. For spatialTilePlan, these will be returned
as SpatVector centroids. For non-spatial plans like pixelTileGrid, this
will be returne as a matrix.
Usage
# S4 method for class 'tilePlan'
centroids(x, fun = function(x) x, offset = c(0, 0), zero = FALSE, ...)
# S4 method for class 'freeTilePlan'
centroids(x, ...)
# S4 method for class 'pointTilePlan'
centroids(x, ...)
# S4 method for class 'pixelTilePlan'
centroids(x, fun = function(x) x, zero = TRUE, ...)
# S4 method for class 'spatialTilePlan'
centroids(x, zero = FALSE, ...)Arguments
- x
tilePlan- fun
(internal) post-processing function used to convert centroids to expected output. Such as
vect()forspatialTilePlan- offset
numeric of length 2. x and y values to offset by. Default is c(0, 0).
- zero
logical. Whether to zero out padding effects. (used by default with
pixelTilePlan)- ...
additional params to pass.
See also
Other tile* methods:
arith,
as.polygons(),
bracket,
dim(),
dollar,
double_bracket,
ext(),
intersect(),
plot()