Learn R Programming

envirem (version 2.3)

split_raster: Split raster into tiles

Description

Splits a rasterLayer into tiles

Usage

split_raster(
  file,
  s = 2,
  outputDir,
  gdalinfoPath = NULL,
  gdal_translatePath = NULL
)

Value

Rasters are written to the output directory.

Arguments

file

full path to a raster

s

division applied to each side of the raster (s=2 -> 4 tiles)

outputDir

path and directory name for output

gdalinfoPath

path to gdalinfo binary. Set to NULL if default search path is sufficient.

gdal_translatePath

path to gdal_translate binary. Set to NULL if default search path is sufficient.

Author

Pascal Title

Details

GDAL must be installed for this function to work. To determine if the default search paths are sufficient, you can type in R Sys.which('gdalinfo') and Sys.which('gdal_translate'). If a path is returned, then you can leave those arguments as NULL.

References

GDAL. 2015. GDAL - Geospatial Data Abstraction Library: Version 1.11.3, Open Source Geospatial Foundation, https://gdal.org