createRasterTiles: Create a raster tiles object

View source: R/SOptim_RasterTiling.R

createRasterTilesR Documentation

Create a raster tiles object

Description

A function used to cut an input SpatRaster object into several tiles usable by values to read data by chunks.

Usage

createRasterTiles(rst, nd = 2)

Arguments

rst

A SpatRaster object.

nd

Number of times to slice the SpatRaster across row and column direction. The total number of tiles will be given by: N_{tiles} = nd^{2}.

Value

A SOptim.Tiles object with nd^2 tiles each with the starting row and column numbers as well as the number of rows and columns to read.

Examples


library(terra)
r <- rast(ncol = 100, nrow = 100)
rtiles <- createRasterTiles(r, nd = 3)


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.