make_tiles: make tiles from a raster

View source: R/make_tiles.R

make_tilesR Documentation

make tiles from a raster

Description

split a raster in a number of same size tiles

Usage

make_tiles(
  r,
  ncol = 2,
  nrow = 2,
  path = NULL,
  sufix = "tile_",
  format = ".tif",
  datatype = "FLT4S"
)

Arguments

r

SpatRaster

ncol

number of vertical divisions

nrow

number of horizontal divisions

path

folder to save tiles

sufix

sufix to be add to filename

format

format of file to be saved

datatype

type of data (byte, integer, float). Values for datatype are "INT1U", "INT2U", "INT2S", "INT4U", "atatype = "FLT4S"atatype = "FLT4S"", "FLT4S", "FLT8S". The first three letters indicate whether the datatype is integer (whole numbers) of a real number (decimal numbers), the fourth character indicates the number of bytes used (allowing for large numbers and/or more precision), and the "S" or "U" indicate whether the values are signed (both negative and positive) or unsigned (positive values only).

Value

SpatRaster

Author(s)

Cassio Moquedace and Elpidio Filho

Examples

# tl = make_tiles(r = r1, ncol = 2, nrow = 2,
#      path = 'tiles', sufix = 'tl', format = '.tif', datatype = "FLT4S")

elpidiofilho/mdsFuncs documentation built on April 14, 2022, 5:40 p.m.