add_raster_attributes: Add attributes to a Raster* object

Description Usage Arguments Details Author(s)

Description

Convert a Raster* object with numeric values to classes

Usage

1
add_raster_attributes(r,attribute)

Arguments

r

A Raster-class object to add attributes (or categories) to

attribute

a character vector of class names, with the same length as the number of unique numeric values in the input raster object

Details

The function uses rgdal::writeGDAL with catNames argument to write a tif file to disk with attributes and read the tif back to R

Author(s)

Antoine Stevens


antoinestevens/MODISExtra documentation built on May 10, 2019, 12:23 p.m.