gdal_calc: Run gdal_calc.py

Description Usage Arguments Value Note

Description

Allows gdal_calc.py to be run, with limited options, for arbitrary calculations

Usage

1
2
gdal_calc(cstr, x, filename, type = "UInt16", gdformat = "GTiff",
  overwrite = TRUE, robject = FALSE)

Arguments

cstr

String providing the raster calculation to be performed, e.g. "(A == 1) * 10"

x

a list of rasters, or filenames of rasters, where list element names match names in cstr

filename

output filename to write, with gdal compliant filename extension

type

The gdal data type, e.g. "UInt16" (default), "Byte", etc.

gdformat

The gdal format for output. Default if "GTiff" for geotiff

overwrite

Option to overwrite existing file name. Default is TRUE

robject

Name of robject to return. Default is FALSE, meaning raster is simply written to disk

Value

The calculated raster

Note

This still has to be fixed to handle multi-band rasters gracefully


PrincetonUniversity/agroEcoTradeoff documentation built on May 8, 2019, 3:12 p.m.