tile_index: Tile index

View source: R/tile_index.R

tile_indexR Documentation

Tile index

Description

Generate a table of tile indexes from a tiling object.

Usage

tile_index(x)

Arguments

x

tiling object, created by [tiles()]

Details

A data frame with

* **tile** - index, same as raster cell number * **offset_x** - column offset of tile (index column 0-based) * **offset_y** - row offset of tile (index row 0-based, relative to top row) * **ncol** number of columns in tile (the right and bottom margins may have a dangle based on block size) * **nrow** number of rows in th tile * xmin, xmax, ymin, ymax - the exent

Note that ncol,nrow is the block size *unless* the tile is part of a dangling column or row (right or bottom) where the raster doesn't fill complete tiles.

Value

data frame, see details

Examples

tile_index(grout(c(87, 61), extent = c(0, 1, 0, 1), blocksize = c(32, 16)))
## only one tile in this weird scheme!
tile_index(grout(c(61, 87), blocksize = c(61, 87)))

hypertidy/grout documentation built on April 24, 2024, 11:32 a.m.