raster_colors,RasterBrick-method {arcpullr}R Documentation

Convert RasterBrick into data.frame of colors that can be used for plotting

Description

This function is used internally by plot_layer to convert a RasterBrick object to a data.frame of colors for each pixel that can be used for plotting with ggplot2. Note that this function assumes that the first three bands in the RasterBrick objects are the RGB values and all additional bands are ignored.

Usage

## S4 method for signature 'RasterBrick'
raster_colors(x)

Arguments

x

A RasterBrick object

Value

A data.frame with 3 columns and length(raster_object) rows

Examples

## Not run: 
wi_leaf_off_layer <- get_image_layer(wi_leaf_off_url, wis_poly)
wi_leaf_off_data <- raster_colors(wi_leaf_off_layer)

## End(Not run)

[Package arcpullr version 0.2.5 Index]