For more useful params info and examples, see the Tile Processing Methods section.
Apply a function across spatial tiles to speed up processing and manage
memory usage for large data operations. This is a landing page for the
generic. tileApply() dispatches to different processing methods based on
the tile type.
character inputs to x and y are assumed to be {terra} readable.
SpatRaster and SpatVector must first be written to file. If provided,
they are traced to their filepaths with terra::sources() and then processed
via their filepaths for memory efficiency.
For other data types, see extending_tilework
Usage
# S4 method for class 'ANY,missing,ANY'
tileApply(x, tiles, verbose = NULL, ...)
# S4 method for class 'ANY,ANY,ANY'
tileApply(x, y, tiles, verbose = NULL, ...)
# S4 method for class 'token,ANY,ANY'
tileApply(x, y, tiles, verbose = NULL, ...)Tile Processing Methods
Basic tiling: See tileApply-plan for
spatialTilePlanandpixelTilePlanGroup processing: See tileApply-group for
tileGrouphierarchical processingIterator processing: See tileApply-iterator for
tileIteratorstreaming/batch processing
Boundary Inclusivity
Adjacent tiles share exact boundaries. Since {tilework} does not know the
format or representation of the underlying data, it provides tile bounds as
windows but does not enforce whether those boundaries are inclusive or
exclusive — that is determined by the getBoundedData() method for the
data type being processed.
For raster data this is generally not an issue (pixel snapping assigns each
cell unambiguously). For point or tabular data, features sitting exactly on
a shared tile boundary may appear in multiple tiles unless the
getBoundedData() implementation applies its own inclusive/exclusive
filtering. Implementing packages can use the tile grid position (available
via getTile()'s get_params) to determine which edges are shared and
filter accordingly.
See also
tileApply-plan, tileApply-group, tileApply-iterator
Other tile processing:
getBoundedData(),
getTile(),
tileApply-group,
tileApply-iterator,
tileApply-plan