Learn R Programming

arcpullr (version 0.3.2)

get_layer_legend: Returns a legend for a raster layer

Description

Raster layers are accompanied with legends to identify what the colors mean. This function retrieves those legend values and returns them as a data.frame with the associated RGB color values. This will likely be most useful for plotting and analysis of map layers.

Usage

get_layer_legend(url)

Value

A data.frame with two columns (color, values) and the number of rows equal to the number of values in a layer

Arguments

url

A URL to a Map or Image Service layer

Examples

Run this code
if (FALSE) {
get_layer_legend(wi_landcover_url)
}

Run the code above in your browser using DataLab