landscapetools (version 0.5.0)

util_raster2tibble: Converts raster data into tibble

Description

Writes spatial raster values into tibble and adds coordinates.

Usage

util_raster2tibble(x)

util_raster2tibble(x)

Arguments

x

Raster* object

Value

a tibble

Details

You will loose any resolution, extent or reference system. The output is raw tiles.

Examples

Run this code
# NOT RUN {
maptib <- util_raster2tibble(fractal_landscape)
# }
# NOT RUN {
library(ggplot2)
ggplot(maptib, aes(x,y)) +
    coord_fixed() +
    geom_raster(aes(fill = z))
# }

Run the code above in your browser using DataCamp Workspace